You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Peter De Maeyer (JIRA)" <ji...@codehaus.org> on 2009/12/05 01:13:55 UTC

[jira] Issue Comment Edited: (MECLIPSE-624) M2Eclipse does not always pass configuration correctly to plugins

    [ http://jira.codehaus.org/browse/MECLIPSE-624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=201332#action_201332 ] 

Peter De Maeyer edited comment on MECLIPSE-624 at 12/4/09 6:13 PM:
-------------------------------------------------------------------

MOJO-1468 is the symptom you'll get as a result of this issue.

Because the configuration is not correctly passed onto NativeJavaMojo, it reverts to the defaults, which is "try and find all native classes in classpath". M2Eclipse workspace resolution apparently passes an artifact of type "jar" onto the NativeJavaMojo. But because of workspace resolution, the artifact of type "jar" is in fact a real directory, but the mojo doesn't know this and tries to parse it as a jar (zip) file, which of course fails.

      was (Author: peterdm):
    Although a bug in its own right, MOJO-1468 is the symptom you'll get as a result of this issue.

Because the configuration is not correctly passed onto NativeJavaMojo, it reverts to the defaults, which is "try and find all native classes in classpath". M2Eclipse workspace resolution apparently passes a an artifact of type "jar" onto the NativeJavaMojo. But because of workspace resolution, the artifact of type "jar" is in fact a real directory, but the mojo doesn't know this and tries to parse it as a jar (zip) file, which of course fails.
  
> M2Eclipse does not always pass configuration correctly to plugins
> -----------------------------------------------------------------
>
>                 Key: MECLIPSE-624
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-624
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>            Reporter: Peter De Maeyer
>            Priority: Blocker
>         Attachments: project.tar.gz
>
>
> I am using M2Eclipse with the native-maven-plugin.
> However, the configuration of the native-maven-plugin is not correcly passed onto the mojo: NativeJavahMojo is created with all fields to default, even though some of them are configured!
> Eg. given the following configuration section of the pom.xml:
> ...
>   <executions>
>     <execution>
>       <id>javah</id>
>       <phase>generate-sources</phase>
>       <configuration>
>         <outputDirectory>my-custom-output-dir</outputDirectory>
>         <classNames>
>           <className>org.MyClassName</className>
>         </classNames>
>         <outputFileName>MyCustomOutputFileName.h</outputFileName>
>       </configuration>
>       <goals>
>         <goal>javah</goal>
>       </goals>
>     </execution>
>   </executions>
> ...
> When I execute the native:javah Maven goal I expect these custom configuration settings to be picked up, but they aren't. The debug output I get is the following:
> ---
> [DEBUG] Configuring mojo 'org.codehaus.mojo:native-maven-plugin:1.0-alpha-4-SNAPSHOT:javah' with basic configurator -->
> [DEBUG]   (f) implementation = default
> [DEBUG]   (f) outputDirectory = /home/peter/workspace/de-maeyer/search/native/linux/target/native/javah
> [DEBUG]   (f) project = MavenProject: de.maeyer:search-native-linux:0.0.1-SNAPSHOT @ /home/peter/workspace/de-maeyer/search/native/linux/pom.xml
> [DEBUG]   (f) verbose = false
> [DEBUG]   (f) workingDirectory = /home/peter/workspace/de-maeyer/search/native/linux
> [DEBUG] -- end configuration --
> ---
> Another report can be found here:
> http://old.nabble.com/m2eclipse-does-not-configure-mojo-from-pom.xml-td22940611.html
> It describes a workaround involves unchecking "Skip Maven compiler plugin when processing resources" and disabling workspace resolution, which is not an option for me: workspace resolution is the main reason I use M2Eclipse (and Maven) in the first place! I'm dead in the water as long as I can't configure the native-maven-plugin.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira