Thanks to a friend, who hopefully will post a description of the problem
later this weekend to the list, the problem was identified and a
workaround found. The problem is maven, and lack of class-loading
isolation for plugins in child modules of a parent project. In a
nutshell, the first version of a plugin loaded by any project, is the
plugin that gets used by a project, regardless of what version is
specified. So in my case, I had the following:
parent project
> child module project 1
> child module project 2
Child module project 1 had a transitive dependency to
maven-dependency-plugin version 2.0-alpha-1 (transitive by virtue that a
plugin specified depended on it), and child module project 2 was trying
to use version 2.0-alpha-4 (by explicitly putting that version in the
plugin markup). Since 2.0-alpha-1 gets loaded in child project 1 before
the version in child project 2, it gets used in building child project
2, regardless of the fact that a newer version is specified. The
workaround was to specify the maven-dependency-plugin and explicit newer
version in the parent project.
However, I think this design choice might do well to be re-thought.
Class-loader isolation within modules seems much more desirable.
B
Dennis Lundberg wrote:
You should specify a version for the plugin in your pom. That is the
only way to know for sure which version will be used.
Brad O'Hearne wrote:
It isn't the proxy. I've removed the proxy completely from the
picture and it hasn't helped. In fact, I've completely deleted the
org/apache/maven/plugins from my local repo, and for some reason it
is trying to pull the 2.0-alpha-1 version of the
maven-dependency-plugin.
Additionally, this project is a child module of another one. If I try
to package/install from within the child directory, the execution
succeeds. If I try from the parent directory, the execution fails. I
have no idea why this would be.
Any ideas?
B
Brian E. Fox wrote:
The configuration seems right and since it sporadically succeeds, seems
to imply it's correct. I'm guessing this could be a problem with your
proxy. Are you able to try it somewhere you don't need a proxy?
-----Original Message-----
From: Brad O'Hearne [mailto:[EMAIL PROTECTED] Sent: Friday, June
29, 2007 4:13 PM
To: Maven Users List
Subject: repeated problems with maven-dependency-plugin
I am having repeated problems packaging and installing a maven2
project that is trying to use the maven-dependency-plugin, despite
the fact that
I have this plugin installed in both my local repository and my
maven-proxy, and I can see it just fine online. Once in a great
while, it will sporadically succeed, but usually fails, with the
following
output:
INFO] Internal error in the plugin manager executing goal
'org.apache.maven.plu
gins:maven-dependency-plugin:2.0-alpha-4:copy-dependencies': Unable
to find the
mojo
'org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-4:copy-depen
den
cies' in the plugin 'org.apache.maven.plugins:maven-dependency-plugin'
org/codehaus/plexus/archiver/ArchiverException
Does anyone have any idea why this would be? Here's is the code in
my pom.xml that references it:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-flex-resources</id>
<phase>process-classes</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/flex-resources
</outputDirectory>
<includeTypes>swf,swc</includeTypes>
<stripVersion>true</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
Thanks in advance for your help.
Cheers,
Brad
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]