Reputation: 2436
I have strange problem. I have own remote repository and upload their plugin. Then I try to download it while packaging project. Maven start to download from own_remote_repo but downloading 1 file start to search another files at repo1.maven.org/maven2 and of course could not found plugin and fails.
I have used this repo many times before without problems.
[edit]
output:
Downloading: http://repo1.maven.org/maven2/com/my/maven/plugin/maven-plugin/1.1.3/maven-plugin-1.1.3.pom
[INFO] Unable to find resource 'com.my.maven.plugin:maven-plugin:pom:1.1.3' in repository central (http://repo1.maven.org/maven2)
Downloading: http://<server>:<port>/nexus/content/groups/public/com/my/maven/plugin/maven-plugin/1.1.3/maven-plugin-1.1.3.pom
3K downloaded (maven-plugin-1.1.3.pom)
Downloading: http://repo1.maven.org/maven2/com/my/maven/plugin/maven-plugin/1.1.3/maven-plugin-1.1.3.jar
[INFO] Unable to find resource 'com.my.maven.plugin:maven-plugin:maven-plugin:1.1.3' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] A required plugin was not found: Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository
So as you can see after dowloading of the maven-plugin-1.1.3.pom maven try to download jar file from the maven central repo....
The jar file with plugin located in the same directory on the nexus, and the name equalse to jar file that maven try to find. The maven-plugin-1.1.3.pom dowloaded from nexus is correct.
Any ideas?
Upvotes: 2
Views: 2350
Reputation: 68992
What I understand from your question is that you have only issues with plugins, we use nexus as proxy and had to configure
$USER_HOME/.m2/settings.xml
Please check your configuration for the pluginrepositories
section showed below.
<settings>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorof>*</mirrorof>
<url>http://nexusurl/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<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>
<activeprofile>nexus</activeprofile>
</activeprofiles>
</settings>
Upvotes: 3