PluginNotFoundException: Plugin could not be found in internal repository

10 views
Skip to first unread message

Jochen Hebbrecht

unread,
Mar 31, 2009, 3:13:57 AM3/31/09
to BeJUG
Hi,

I'm having a strange problem with a maven-plugin. I'm not sure this is
a bug, it could be an incorrect configuration at my side too.
We use Archiva as an internal repository and in that repository, we
stored a custom maven-plugin (it's a fork on the maven-jdev-plugin,
but it can only be used in our company, so we're not reflecting it to
the open source community). But when we want to retreive the maven-
plugin, we get the following error:

[DEBUG] Trying repository MYCOMPANY-maven-repo-internal
[DEBUG] Checking for pre-existing User-Agent configuration.
[DEBUG] Adding User-Agent configuration.
[DEBUG] Connecting to repository: 'MYCOMPANY-maven-repo-internal' with
url: 'http://mavenrepo.MYCOMPANY.be:8080/archiva/repository/internal'.
[DEBUG] Using Proxy: noauthproxy.MYCOMPANY.be
Downloading:
http://mavenrepo.MYCOMPANY.be:8080/archiva/repository/internal/org/apache/myfaces/trinidadbuild/maven-jdev-plugin/1.2.10.1/maven-jdev-plugin-1.
2.10.1.pom
[DEBUG] attempting to create parent directories for destination: maven-
jdev-plugin-1.2.10.1.pom.tmp
1K downloaded (maven-jdev-plugin-1.2.10.1.pom)
[DEBUG] Artifact resolved
[DEBUG] Trying repository central
[DEBUG] Checking for pre-existing User-Agent configuration.
[DEBUG] Adding User-Agent configuration.
[DEBUG] Connecting to repository: 'central' with url: 'http://
repo1.maven.org/maven2'.
[DEBUG] Using Proxy: noauthproxy.MYCOMPANY.be
Downloading:
http://repo1.maven.org/maven2/org/apache/myfaces/trinidadbuild/maven-jdev-plugin/1.2.10.1/maven-jdev-plugin-1.2.10.1.jar
[DEBUG] Unable to locate resource in repository
org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate
resource in repository
at
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData
(LightweightHttpWagon.java:139)
at org.apache.maven.wagon.StreamWagon.getInputStream
(StreamWagon.java:116)
at org.apache.maven.wagon.StreamWagon.getIfNewer
(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at
org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile
(DefaultWagonManager.java:491)
at
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact
(DefaultWagonManager.java:372)
at
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact
(DefaultWagonManager.java:327)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve
(DefaultArtifactResolver.java:216)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve
(DefaultArtifactResolver.java:90)
at
org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin
(DefaultPluginManager.java:205)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin
(DefaultPluginManager.java:177)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin
(DefaultLifecycleExecutor.java:1517)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor
(DefaultLifecycleExecutor.java:1722)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds
(DefaultLifecycleExecutor.java:446)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLifecycleExecutor.java:176)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
356)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
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:597)
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)


You can actually see him retreiving the POM file from Archiva, and it
tells me: "Artifact resolved". But then I tries to download the JAR
file from repo1.maven.org, which isn't there of course and it never
checks our internal repository again .

Any idea's what is going wrong here? Why does MVN download the POM
from Archiva, but not the JAR?

Regards,
Jochen

ps: also check this Jira ticket: http://jira.codehaus.org/browse/MNG-4117

Jochen Hebbrecht

unread,
Mar 31, 2009, 5:57:51 AM3/31/09
to BeJUG
Somebody helped me out on IRC. Apparently, you need to configure a
plugin repository. I don't really understand why, as I configured it
in my settings.xml

Any idea's why?



On 31 mrt, 09:13, Jochen Hebbrecht <jochenhebbre...@gmail.com> wrote:
> Hi,
>
> I'm having a strange problem with a maven-plugin. I'm not sure this is
> a bug, it could be an incorrect configuration at my side too.
> We use Archiva as an internal repository and in that repository, we
> stored a custom maven-plugin (it's a fork on the maven-jdev-plugin,
> but it can only be used in our company, so we're not reflecting it to
> the open source community). But when we want to retreive the maven-
> plugin, we get the following error:
>
> [DEBUG] Trying repository MYCOMPANY-maven-repo-internal
> [DEBUG] Checking for pre-existing User-Agent configuration.
> [DEBUG] Adding User-Agent configuration.
> [DEBUG] Connecting to repository: 'MYCOMPANY-maven-repo-internal' with
> url: 'http://mavenrepo.MYCOMPANY.be:8080/archiva/repository/internal'.
> [DEBUG] Using Proxy: noauthproxy.MYCOMPANY.be
> Downloading:http://mavenrepo.MYCOMPANY.be:8080/archiva/repository/internal/org/ap....
> 2.10.1.pom
> [DEBUG] attempting to create parent directories for destination: maven-
> jdev-plugin-1.2.10.1.pom.tmp
> 1K downloaded  (maven-jdev-plugin-1.2.10.1.pom)
> [DEBUG]   Artifact resolved
> [DEBUG] Trying repository central
> [DEBUG] Checking for pre-existing User-Agent configuration.
> [DEBUG] Adding User-Agent configuration.
> [DEBUG] Connecting to repository: 'central' with url: 'http://
> repo1.maven.org/maven2'.
> [DEBUG] Using Proxy: noauthproxy.MYCOMPANY.be
> Downloading:http://repo1.maven.org/maven2/org/apache/myfaces/trinidadbuild/maven-...

Jochen Hebbrecht

unread,
Apr 1, 2009, 4:11:54 AM4/1/09
to BeJUG
Ok, I finally got it. I assumed that if you specify "a repository" in
your settings.xml, that repository would also be used for downloading
plugins.

When I configured the "pluginRepository" in my pom.xml, it all seemed
to be working, but I couldn't figure out why.

The answer is simple: you also have to specify the <pluginRepository>
element in your settings.xml. Maven splits up 2 kinds of repo's:
artifacts and plugins.
By updating my settings.xml and removing the "pluginRepository" in my
pom, the problem was solved :-)
Reply all
Reply to author
Forward
0 new messages