rmic-maven-plugin NoSuchMethodError in rmic:package

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

rmic-maven-plugin NoSuchMethodError in rmic:package

Etienne Dysli-2
Hi all,

I am using rmic-maven-plugin 1.2.0 with Maven 3 and encountered an API
incompatibility error while running the rmic:package goal.

[ERROR] Failed to execute goal
org.codehaus.mojo:rmic-maven-plugin:1.2.0:package (default-cli) on
project MyProject: Execution default-cli of goal
org.codehaus.mojo:rmic-maven-plugin:1.2.0:package failed: An API
incompatibility was encountered while executing
org.codehaus.mojo:rmic-maven-plugin:1.2.0: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;

Is that plugin supposed to work with Maven 3?

Cheers,
   Etienne

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: rmic-maven-plugin NoSuchMethodError in rmic:package

russgold
It should, yes. I'm using it with Maven 3, in fact.

What happens if you run with -X?

On Sep 25, 2012, at 11:12 PM, Etienne Dysli wrote:

Hi all,

I am using rmic-maven-plugin 1.2.0 with Maven 3 and encountered an API
incompatibility error while running the rmic:package goal.

[ERROR] Failed to execute goal
org.codehaus.mojo:rmic-maven-plugin:1.2.0:package (default-cli) on
project MyProject: Execution default-cli of goal
org.codehaus.mojo:rmic-maven-plugin:1.2.0:package failed: An API
incompatibility was encountered while executing
org.codehaus.mojo:rmic-maven-plugin:1.2.0: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;

Is that plugin supposed to work with Maven 3?

Cheers,
  Etienne

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



-----------------
Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.gold-family.us/audio/misfile.html>!




Reply | Threaded
Open this post in threaded view
|

Re: rmic-maven-plugin NoSuchMethodError in rmic:package

Etienne Dysli-2
On 27/09/2012 12:32, Russell Gold wrote:
> It should, yes. I'm using it with Maven 3, in fact.
>
> What happens if you run with -X?

I've ran it in debug mode (and the error still happens). Here is the log
and the effective POM.

  Etienne



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

rmicpackage_debug.log.gz (4K) Download Attachment
effectivepom.xml.gz (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: rmic-maven-plugin NoSuchMethodError in rmic:package

Etienne Dysli-2
In reply to this post by russgold
On 27/09/2012 12:32, Russell Gold wrote:
> It should, yes. I'm using it with Maven 3, in fact.

Hi Russel,

Any findings on this issue? Do you need more information?

Regards,
   Etienne


signature.asc (563 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: rmic-maven-plugin NoSuchMethodError in rmic:package

russgold
Hi Etienne,

You seem to have the same versions of the jars that I do, but it's working for me. I wonder what code path you could be using that is different from mine. Is there a way that you can make a minimal Maven project that has the bug? Maybe with just a single POM and a single trivial java class on which to run the plugin?

Regards,
Russ

On Oct 10, 2012, at 6:28 AM, Etienne Dysli wrote:

On 27/09/2012 12:32, Russell Gold wrote:
It should, yes. I'm using it with Maven 3, in fact.

Hi Russel,

Any findings on this issue? Do you need more information?

Regards,
  Etienne


-----------------
Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.gold-family.us/audio/misfile.html>!




Reply | Threaded
Open this post in threaded view
|

Re: rmic-maven-plugin NoSuchMethodError in rmic:package

russgold
Hi Etienne,

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? 

Thanks,
Russ

On Oct 11, 2012, at 1:54 PM, Russell Gold wrote:

Hi Etienne,

You seem to have the same versions of the jars that I do, but it's working for me. I wonder what code path you could be using that is different from mine. Is there a way that you can make a minimal Maven project that has the bug? Maybe with just a single POM and a single trivial java class on which to run the plugin?

Regards,
Russ

On Oct 10, 2012, at 6:28 AM, Etienne Dysli wrote:

On 27/09/2012 12:32, Russell Gold wrote:
It should, yes. I'm using it with Maven 3, in fact.

Hi Russel,

Any findings on this issue? Do you need more information?

Regards,
  Etienne


-----------------
Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.gold-family.us/audio/misfile.html>!





-----------------
Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.gold-family.us/audio/misfile.html>!




Reply | Threaded
Open this post in threaded view
|

Re: rmic-maven-plugin NoSuchMethodError in rmic:package

Etienne Dysli-2
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

effectivepom.xml.gz (1K) Download Attachment
rmicpackage_debug.log.gz (13K) Download Attachment
rmic-test.tar.gz (1K) Download Attachment
signature.asc (563 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: rmic-maven-plugin NoSuchMethodError in rmic:package

Etienne Dysli-2
Hi Russel,

Were you able to reproduce the issue with my example project?

Cheers,
   Etienne


signature.asc (565 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: rmic-maven-plugin NoSuchMethodError in rmic:package

Etienne Dysli-2
On 22/12/2012 03:18, Russell Gold wrote:
> Sorry for the delay. Yes, I was able to reproduce the issue. This same
> issue was reported as MRMIC-33, and a workaround was posted. I have
> incorporated the suggestion as the fix, and verified that it solved your
> issue. I hope to have version 1.2.1 release early next week.

Hi Russell,

This does indeed resolve my issue. Thank you very much for the fix and
the release! :)

Cheers,
   Etienne


signature.asc (565 bytes) Download Attachment