PDA

View Full Version : maven repo is unable to find



muhkah
Oct 7th, 2009, 04:06 AM
Hi all,
I'm testing the wedding sample from spring blog (http://blog.springsource.com/2009/05/27/roo-part-2/), when I run the "perform test" command, errors appear, one of them is :



[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building wedding
[INFO] task-segment: [test]
[INFO] ------------------------------------------------------------------------
Downloading: http://repository.springsource.com/maven/bundles/release/org/apache
/maven/plugins/maven-resources-plugin/2.2/maven-resources-plugin-2.2.pom
[INFO] Unable to find resource 'org.apache.maven.plugins:maven-resources-plugin:pom:2.2' in repository com.springsource.repository.bundles.release (http://repository.springsource.com/maven/bundles/release)
...


any other have the same issue?
Really thanks in advance.

Regards,

Kahlil

Fireball
Oct 7th, 2009, 05:47 AM
I got much of these, but if the projects builds or executes AFAIK you can ignore these message.

muhkah
Oct 7th, 2009, 06:48 AM
it still doesn't work when I run the project using command "mvn tomcat:run".
Another error appears :


[INFO] -----------------------------------------------------
[ERROR] BUILD ERROR
[INFO] -----------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: org.apache.maven.plugins
ArtifactId: maven-war-plugin
Version: 2.0.2

Reason: Unable to download the artifact from any repository

org.apache.maven.plugins:maven-war-plugin:pom:2.0.2


do you already build the project successully?
should I try to run / deploy the project using STS or Eclipse IDE ?

Really thanks in advance

Kahlil

Ben Alex
Oct 7th, 2009, 06:18 PM
Maybe try a mvn -up tomcat:run. It will update your Maven plugins that way.

muhkah
Oct 7th, 2009, 10:41 PM
it still doesn't work, updating process of plugin is still unable to find.
my big question is, why I can't update the plugin from the location that maven located by themselves?:confused:

or how about this error :


[INFO] Scanning for projects...
Downloading: http://repository.springsource.com/maven/bundles/release/org/apache
/maven/plugins/maven-war-plugin/2.0.2/maven-war-plugin-2.0.2.pom
[INFO] Unable to find resource 'org.apache.maven.plugins:maven-war-plugin:pom:2.
0.2' in repository com.springsource.repository.bundles.release (http://repositor
y.springsource.com/maven/bundles/release)


is there any issue when downloading from springsource repository?

Really thanks in advance.

Ben Alex
Oct 7th, 2009, 11:30 PM
Maven tries all your plugin repositories one-by-one until it locates an artifact it's looking for. It first tries plug repositories defined explicitly in your pom.xml. In a normal Maven installation that you have not adjusted with special Maven configurations in your home directory, it will eventually fallback to a download from Maven central (repo1.maven.org). I just checked and the plugin you're having trouble downloading is indeed available at http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.0.2/.

muhkah
Oct 8th, 2009, 02:54 AM
I got the alternative solution from http://techtutorials.vox.com/library/post/6a011015e7cf40860b011017a8be1a860e.html#comment-6a011015e7cf40860b0123f16971ec860f



Reason: Unable to download the artifact from any repository

org.apache.maven.plugins:maven-resources-plugin:pom:2.2 from the specified remote repositories: central (http://repo1.maven.org/maven2)

Problem Resolution

To remove this error go to your maven home directory, you will find a directory with the name “Conf”. Under “Conf”, you will find a file “settings.xml “. Open the file and uncomment the following portion and provide your proxy IP/Port to make maven work.

<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host>192.168.200.16</host>
<port>8080</port>
<nonProxyHosts>127.0.0.1</nonProxyHosts>
</proxy>
</proxies>



but the trouble is "I don't know the proxy configuration from my internet provider" is there any option to solve this problem?

should I ask to them detailly :rolleyes:

Thanks

Ben Alex
Oct 8th, 2009, 07:38 PM
When you did a mvn -up, did it successfully download anything? If so, it indicates your proxy server settings are correct. In 99% of cases you will not need proxy server settings unless you're on some sort of corporate network. Home users generally have either no proxy servers used at all, or the ISPs automatically intercept HTTP requests and proxy it without requiring end user configuration.

I think I'd start by removing the settings.xml under your home directory, in case they have something odd in them that is causing problems. Also check you have the latest Maven installed. Sorry I can't be more help, but it looks like a Maven-related error (or configuration issue) to me.