On 12/10/2012 03:11, Russell Gold wrote:
> I have an idea about what might be happening. There's some explicit
> plexus code that takes different paths based on environment, and I think
> that a dependency in the POM that made sense years ago probably no
> longer does. So I have uploaded a snapshot version for you to try.
> 1.2.1-SNAPSHOT. Could you see if that fixes the problem for you? 

Hi Russel,

My apologies for the late reply, I was away on vacation. Thank you for
the updated plugin.

I have built a bare test Maven project to reproduce this issue. It seems
it still happens with 1.2.1-SNAPSHOT (which, by the way, does not have a
POM file in Codehaus' repository, making it difficult to install). I get
the following error:

$ mvn clean compile rmic:package
[INFO] Scanning for projects...
[INFO]

[INFO]
------------------------------------------------------------------------
[INFO] Building rmic-test 0.0.1-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rmic-test ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
rmic-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/home/edysli/rmic-test/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @
rmic-test ---
[INFO] Compiling 1 source file to /home/edysli/rmic-test/target/classes
[INFO]
[INFO] --- rmic-maven-plugin:1.2.1-SNAPSHOT:rmic (rmic-process-classes)
@ rmic-test ---
[INFO] Compiling 1 remote classes
[INFO]
[INFO] --- rmic-maven-plugin:1.2.1-SNAPSHOT:package (default-cli) @
rmic-test ---
[INFO] Building RMI stub jar:
/home/edysli/rmic-test/target/rmic-test-0.0.1-SNAPSHOT-client.jar
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2.171s
[INFO] Finished at: Mon Oct 29 11:27:21 SGT 2012
[INFO] Final Memory: 8M/118M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.codehaus.mojo:rmic-maven-plugin:1.2.1-SNAPSHOT:package (default-cli)
on project rmic-test: Execution default-cli of goal
org.codehaus.mojo:rmic-maven-plugin:1.2.1-SNAPSHOT:package failed: An
API incompatibility was encountered while executing
org.codehaus.mojo:rmic-maven-plugin:1.2.1-SNAPSHOT:package:
java.lang.NoSuchMethodError:
org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLineAsCallable(Lorg/codehaus/plexus/util/cli/Commandline;Ljava/io/InputStream;Lorg/codehaus/plexus/util/cli/StreamConsumer;Lorg/codehaus/plexus/util/cli/StreamConsumer;I)Lorg/codehaus/plexus/util/cli/CommandLineCallable;
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.codehaus.mojo:rmic-maven-plugin:1.2.1-SNAPSHOT
[ERROR] strategy =
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] =
file:.m2/repository/org/codehaus/mojo/rmic-maven-plugin/1.2.1-SNAPSHOT/rmic-maven-plugin-1.2.1-SNAPSHOT.jar
[ERROR] urls[1] =
file:.m2/repository/org/codehaus/plexus/plexus-utils/1.4.1/plexus-utils-1.4.1.jar
[ERROR] urls[2] =
file:.m2/repository/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.jar
[ERROR] urls[3] =
file:.m2/repository/org/codehaus/plexus/plexus-io/2.0.3/plexus-io-2.0.3.jar
[ERROR] urls[4] =
file:.m2/repository/plexus/plexus-compiler-api/1.5/plexus-compiler-api-1.5.jar
[ERROR] urls[5] =
file:.m2/repository/plexus/plexus-utils/1.0.2/plexus-utils-1.0.2.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent:
null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

I also attach the effective POM, Maven debug output and my test project
so you can try it.

Cheers,
  Etienne

Attachment: effectivepom.xml.gz
Description: GNU Zip compressed data

Attachment: rmicpackage_debug.log.gz
Description: GNU Zip compressed data

Attachment: rmic-test.tar.gz
Description: GNU Zip compressed data

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to