You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Robert Cole <ro...@db.com> on 2007/02/15 14:04:51 UTC

Issue with sub-dependency being wrong

Hi all,

I've got a problem that's brought our Maven adoption to a standstill. We've included a dependency in our POM that, as usual, is causing a load of other JARs and so on to be brought in. So far so good. Unfortunately, one of the files is dependent on something which doesn't appear to exist. I'm getting the following error message when I try and compile my project:

[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

Try downloading the file manually from the project website.

Then, install it using the command:
    mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-plugins \
        -Dversion=8 -Dpackaging=maven-plugin -Dfile=/path/to/file


  org.apache.maven.plugins:maven-plugins:maven-plugin:8

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  tapestry.javaforge (http://howardlewisship.com/repository),
  Apache-snapshot (http://people.apache.org/maven-snapshot-repository)

  org.apache.maven.plugins:maven-plugins:maven-plugin:8

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  tapestry.javaforge (http://howardlewisship.com/repository),
  Apache-snapshot (http://people.apache.org/maven-snapshot-repository)


The problem appears to be that something is looking for the file  org.apache.maven.plugins:maven-plugins:maven-plugin:8. Looking around the web at places like the central repository I can see that this doesn't exist but instead there is org.apache.maven.plugins:maven-plugins:8, i.e. without the maven-plugin bit. This leads me to believe that someone has loaded something into their local repository with the wrong groupId and artifactId and then published it to the world. Someone else is then depending on this, which is causing us the problem.

So, what can I do about it? Obviously I can download the right file and put it into the wrong location in my local repository but this is then perpetuating the problem. Tracking down the dependency that is causing this is going to be a major time-consuming task. So, is there a way that I can "proxy" or "mirror" a dependency so that I can say to my local Maven installation "If you get a request for org.apache.maven.plugins:maven-plugins:maven-plugin instead look for org.apache.maven.plugins:maven-plugins"? Or are there any other bright ideas?

Thanks,

Rob Cole
---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Issue with sub-dependency being wrong

Posted by Robert Cole <ro...@db.com>.
Final update!

I've tracked the problem down to Maven ignoring the <packaging> tag in the pom xml. For example in maven-plugins-8.pom we have :

<packaging>pom</packaging>

Yet my Maven instance (it was 2.0.4 but I've just tried it with 2.0.5) is still trying to download a file called maven-plugins-8.jar. Why? And how can I stop it?

Rob Cole



                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
             Robert Cole <ro...@db.com>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
             15/02/2007 14:49                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              To 
                                                                                                                                                                                                                                                                                                                                                                                                                        "Maven Users List" <us...@maven.apache.org>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           cc 
                                                                                                                                                                                                     Please respond to                                                                                                                                                                                                  users@maven.apache.org                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                        "Maven Users List" <us...@maven.apache.org>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Subject 
                                                                                                                                                                                                                                                                                                                                                                                                                        Re: Issue with sub-dependency being wrong                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              





Just a bit of an update, I've tidied up my repository and tried again. I can now see that its managing to download the POM but its then trying to download a JAR file that doesn't exist in the repository (i've checked on a couple of repositories and there's a pom.xml but no .jar file)

Downloading: http://people.apache.org/maven-snapshot-repository/org/apache/maven/plugins/maven-plugins/8/maven-plugins-8.pom
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/8/maven-plugins-8.jar
[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
Downloading: http://people.apache.org/maven-snapshot-repository/org/apache/maven/plugins/maven-plugins/8/maven-plugins-8.jar
[WARNING] Unable to get resource from repository Apache-snapshot (http://people.apache.org/maven-snapshot-repository)

Maven suggests that I download the maven-plugins-8.pom and manually add it to my local repository. I've tried this but on the next mvn command I get a nasty stack trace (below). Any useful ideas?

Downloading: http://people.apache.org/maven-snapshot-repository/org/apache/maven/plugins/maven-plugins/8/maven-plugins-8.pom
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
        at org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:292)
        at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:198)
        at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:163)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1252)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifecycle(DefaultLifecycleExecutor.java:1216)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:982)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:453)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)



Rob Cole




             Robert Cole <ro...@db.com>

             15/02/2007 13:04                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              To
                                                                                                                                                                                                                                                                                                                                                                                                                        users@maven.apache.org
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           cc
                                                                                                                                                                                                     Please respond to
                                                                                                                                                                                        "Maven Users List" <us...@maven.apache.org>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Subject
                                                                                                                                                                                                                                                                                                                                                                                                                        Issue with sub-dependency being wrong











Hi all,

I've got a problem that's brought our Maven adoption to a standstill. We've included a dependency in our POM that, as usual, is causing a load of other JARs and so on to be brought in. So far so good. Unfortunately, one of the files is dependent on something which doesn't appear to exist. I'm getting the following error message when I try and compile my project:

[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

Try downloading the file manually from the project website.

Then, install it using the command:
    mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-plugins \
        -Dversion=8 -Dpackaging=maven-plugin -Dfile=/path/to/file


  org.apache.maven.plugins:maven-plugins:maven-plugin:8

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  tapestry.javaforge (http://howardlewisship.com/repository),
  Apache-snapshot (http://people.apache.org/maven-snapshot-repository)

  org.apache.maven.plugins:maven-plugins:maven-plugin:8

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  tapestry.javaforge (http://howardlewisship.com/repository),
  Apache-snapshot (http://people.apache.org/maven-snapshot-repository)


The problem appears to be that something is looking for the file  org.apache.maven.plugins:maven-plugins:maven-plugin:8. Looking around the web at places like the central repository I can see that this doesn't exist but instead there is org.apache.maven.plugins:maven-plugins:8, i.e. without the maven-plugin bit. This leads me to believe that someone has loaded something into their local repository with the wrong groupId and artifactId and then published it to the world. Someone else is then depending on this, which is causing us the problem.

So, what can I do about it? Obviously I can download the right file and put it into the wrong location in my local repository but this is then perpetuating the problem. Tracking down the dependency that is causing this is going to be a major time-consuming task. So, is there a way that I can "proxy" or "mirror" a dependency so that I can say to my local Maven installation "If you get a request for org.apache.maven.plugins:maven-plugins:maven-plugin instead look for org.apache.maven.plugins:maven-plugins"? Or are there any other bright ideas?

Thanks,

Rob Cole
---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Issue with sub-dependency being wrong

Posted by Robert Cole <ro...@db.com>.
Just a bit of an update, I've tidied up my repository and tried again. I can now see that its managing to download the POM but its then trying to download a JAR file that doesn't exist in the repository (i've checked on a couple of repositories and there's a pom.xml but no .jar file)

Downloading: http://people.apache.org/maven-snapshot-repository/org/apache/maven/plugins/maven-plugins/8/maven-plugins-8.pom
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/8/maven-plugins-8.jar
[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
Downloading: http://people.apache.org/maven-snapshot-repository/org/apache/maven/plugins/maven-plugins/8/maven-plugins-8.jar
[WARNING] Unable to get resource from repository Apache-snapshot (http://people.apache.org/maven-snapshot-repository)

Maven suggests that I download the maven-plugins-8.pom and manually add it to my local repository. I've tried this but on the next mvn command I get a nasty stack trace (below). Any useful ideas?

Downloading: http://people.apache.org/maven-snapshot-repository/org/apache/maven/plugins/maven-plugins/8/maven-plugins-8.pom
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
        at org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:292)
        at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:198)
        at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:163)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1252)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifecycle(DefaultLifecycleExecutor.java:1216)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:982)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:453)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)



Rob Cole



                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
             Robert Cole <ro...@db.com>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
             15/02/2007 13:04                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              To 
                                                                                                                                                                                                                                                                                                                                                                                                                        users@maven.apache.org                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           cc 
                                                                                                                                                                                                     Please respond to                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                        "Maven Users List" <us...@maven.apache.org>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Subject 
                                                                                                                                                                                                                                                                                                                                                                                                                        Issue with sub-dependency being wrong                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              





Hi all,

I've got a problem that's brought our Maven adoption to a standstill. We've included a dependency in our POM that, as usual, is causing a load of other JARs and so on to be brought in. So far so good. Unfortunately, one of the files is dependent on something which doesn't appear to exist. I'm getting the following error message when I try and compile my project:

[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

Try downloading the file manually from the project website.

Then, install it using the command:
    mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-plugins \
        -Dversion=8 -Dpackaging=maven-plugin -Dfile=/path/to/file


  org.apache.maven.plugins:maven-plugins:maven-plugin:8

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  tapestry.javaforge (http://howardlewisship.com/repository),
  Apache-snapshot (http://people.apache.org/maven-snapshot-repository)

  org.apache.maven.plugins:maven-plugins:maven-plugin:8

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  tapestry.javaforge (http://howardlewisship.com/repository),
  Apache-snapshot (http://people.apache.org/maven-snapshot-repository)


The problem appears to be that something is looking for the file  org.apache.maven.plugins:maven-plugins:maven-plugin:8. Looking around the web at places like the central repository I can see that this doesn't exist but instead there is org.apache.maven.plugins:maven-plugins:8, i.e. without the maven-plugin bit. This leads me to believe that someone has loaded something into their local repository with the wrong groupId and artifactId and then published it to the world. Someone else is then depending on this, which is causing us the problem.

So, what can I do about it? Obviously I can download the right file and put it into the wrong location in my local repository but this is then perpetuating the problem. Tracking down the dependency that is causing this is going to be a major time-consuming task. So, is there a way that I can "proxy" or "mirror" a dependency so that I can say to my local Maven installation "If you get a request for org.apache.maven.plugins:maven-plugins:maven-plugin instead look for org.apache.maven.plugins:maven-plugins"? Or are there any other bright ideas?

Thanks,

Rob Cole
---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org