I recently upgraded my Eclipse from Kepler to Luna. I now have problems resolving Maven dependencies in my projects. Specifically, the projects with problems use a repository I need to authenticate to, and the error I'm getting is HTTP 401 Not Authorized error.
If I attempt to run a maven build from the command line, all of the dependencies resolve just fine, so it appears to be a problem with Eclipse or one of its plugins. Has anyone else encountered this problem? How did you fix it?
Related
I have been working on a Java Maven project and my way of using it in Eclipse was to build it on command line and then import in Eclipse. The problem that I was facing is even though the project built successfully, eclipse was not able to resolve dependencies correctly.
This problem would usually go by cleaning, Maven updating and deleting and importing. However, this time it did not get resolved by following these steps. I tried a lot of already existing answers but nothing worked for me. However, I observed that the classpath is not getting created correctly:
I'm seeing that one of the dependency jars is marked as missing
I tried to create the Eclipse .classpath file using:
mvn eclipse:clean
mvn eclipse:eclipse
But mvn eclipse:eclipse fails with the following message:
Failed to execute goal on project consultation: Could not resolve
dependencies for project
company.compliance:consultation:jar:1.0-SNAPSHOT: Failure to find
company.compliance:commons:jar:1.0-SNAPSHOT in
http://maven.ia55.net/company was cached in the local repository,
resolution will not be reattempted until the update interval of
company-mvn-repository has elapsed or updates are forced -> [Help 1]
I read in some of the answers that this can also happen if m2e is not configured properly (it should be pointing to the commandline maven and not embedded maven). When I checked I saw that I don't even have m2e so in installed it. I don't know how to configure it to point to my Maven.
However, I doubt that this problem is because of the plugin not working otherwise I would not have been able to work in Eclipse peacefully till now.
So my other question is, isn't the success of mvn clean package enough to warrant that eclipse should not have any compilation errors regarding dependencies or does scope of dependency also plays a role and that I should work on getting the jar in the repo.
Is there any other possible issue that I am missing?
The issue got resolved. Earlier i was only importing the project that i wanted to work on. After importing all the projects in the directory which contained the pom, eclipse resolved the dependencies. Have no clue how this worked but it did.
I was working with a Java project in the IntelliJ platform and started over after reinstalling the Mac OS again. The project structure looks slightly weird now with BitCoinWalletApp[1] and BitCoinWalletApp[2],
When I run with the Tomcat 8, I get the following error,
Error:Cannot build artifact 'BitcoinWalletApp (2):war exploded' because it is included into a circular dependency (artifact 'BitcoinWalletApp (2):war exploded', artifact 'BitcoinWalletApp (1):war exploded')
Whats the issue here and how to solve it?
turns out this happened because the project has more than one pom.xml file which intelliJ detected as another source of valid pom.xml, in this case its pom.xml.back, to fix it, delete the backup version of your pom.xml
I have a maven project and I'm getting this error in Eclipse:
Description Resource Path Location Type
org.codehaus.plexus.archiver.jar.Manifest.write(java.io.PrintWriter) pom.xml /rpc-server line
1 Maven Configuration Problem
I can to run mvn clean install with no problems on command line.
This is just annoying and I'm hoping someone else already tackled this.
Using Eclipse Java EE IDE version 2.0.2.20140224,
with m2e connector for mavenarchiver pom properties version 0.17.1.201605251832.
Thanks
Your problem can be solved via
https://otto.takari.io/content/sites/m2e.extras/m2eclipse-mavenarchiver/0.17.2/N/LATEST/
I am using Eclipse Luna with Maven 3.0.2, when i try to do mvn install through command prompt on my project , its working fine.
But when i run mvn install through eclipse , its failing with the below error
plugin - maven jar plugin or one of its dependencies could not be resolved ,
failed to read the maven-jar 2.4 artifact.
can not access the maven repository using the registered transporter factories
WagonTransportFactory: java.util.NoSuchElementException
Can anyone help on this if you have faced this before or having knowledge on this.
Thanks for your response...
I tried settings.xml and proxy , it didnt happen.
Then i tried with Kepler eclipse , its working fine now.
I think Luna has some issues.
I've added a Maven dependency into my Grails project, and I'm trying to get that reflected on my Eclipse setup. I've already run grails compile --refresh-dependencies and grails refresh-dependencies (I don't know the difference) but neither got the job done. There are no errors, and I can see that the dependency is correctly reported in grails dependency-report.
I don't know what the difference is, but after running refresh-dependencies using GGTS in Eclipse [project context ("right click") > Grails Tools > Refresh Dependencies], the jars appeared in the classpath.