I have Eclipse Luna and Maven 3.2.3 installed on a Windows 7 machine behind a corporate firewall.
Trying to create a project from an archetype results in the following error:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE
Failed to resolve version for org.apache.maven.archetypes:maven-archetype- quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (C:\Users\xxxx.m2\repository)
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (C:\Users\xxxx.m2\repository)
Proxy details are configured in .m2/settings.xml
and generating a maven project from an archtype works fine in command line.
I tried to apply the solutions from here but none worked. The remote catalog is not acessible as well. I reckon it's a problem with the network settings of Eclipse. I also looked at this bug report to try and find some clues and couldn't really understand how to implement the workaround.
here is my settings.xml file:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <server> <id>nexus</id> <username>[email protected]</username> <password>{XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX}</password> </server> <server> <id>deployment</id> <username>[email protected]</username> <password>{XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX}</password> </server> </servers> <mirrors> <mirror> <!--This sends everything else to /public --> <id>nexus</id> <mirrorOf>*</mirrorOf> <url>https://nexus-int.xxxx.xxxx.com/nexus/content/groups/public</url> </mirror> </mirrors> <profiles> <profile> <id>nexus</id> <!--Enable snapshots for the built in central repo to direct --> <!--all requests to nexus via the mirror --> <repositories> <repository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <!--make the profile active all the time --> <activeProfile>nexus</activeProfile> </activeProfiles> </settings>
Any ideas?
Thanks
Tomer
Create a new Maven project in Eclipse. From the File menu, choose New, and then choose Project. In the New Project window, choose Maven Project. In the New Maven Project window, choose Create a simple project, and leave other default selections.
The error message indicates that Maven is unable to find the Java compiler, which comes only with a JDK and not with a JRE.
For me the solution was a bit simpler, I just had to clean the repository : .m2/repository/org/apache/maven/archetypes
Same problem here, solved.
I will explain the problem and the solution, to help others.
My software is:
Windows 7 Eclipse 4.4.1 (Luna SR1) m2e 1.5.0.20140606-0033 (from eclipse repository: http://download.eclipse.org/releases/luna)
And I'm accessing internet through a proxy.
My problem was the same:
After a lot of try-and-error, and reading a lot of pages, I've finally found a solution to fix it. Some important points of the solution:
The solution is:
<settings> <proxies> <proxy> <active>true</active> <protocol>http</protocol> <host>YOUR.PROXY.IP.OR.NAME</host> <port>YOUR PROXY PORT</port> <username>YOUR PROXY USERNAME (OR EMPTY IF NOT REQUIRED)</username> <password>YOUR PROXY PASSWORD (OR EMPTY IF NOT REQUIRED)</password> <nonProxyHosts>YOUR PROXY EXCLUSION HOST LIST (OR EMPTY)</nonProxyHosts> </proxy> </proxies> </settings>
Finally, I would like to give a suggestion to m2e developers, to make config easier. After installing m2e from the internet (from a repository), m2e should check if Eclipse is using a proxy (Preferences > General > Network Connections). If Eclipse is using a proxy, the m2e should show a dialog to the user:
m2e has detected that Eclipse is using a proxy to access to the internet. Would you like me to create a User settings file (settings.xml) for the embedded Maven software? [ Yes ] [ No ]
If the user clicks on Yes, then m2e should create automatically the "settings.xml" file by copying proxy values from Eclipse preferences.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With