Hi, I got into a very strange problem. I think this is an issue, but I would like to have your opinion first.
In the following pom.xml file, I have got 2 calls to the maven-jar-plugin. I need to do that, because there are other plugins working on the generated jar before it is signed, and all this at the same lifecycle phase. You will also see that the configuration, for the second call, is in the execution section. This again is needed, because I have more executions to do with different configurations. But anyway, if I put configuration directly under the plugin definition, this does not change anything to my problem. If you wonder about the profiles, this is because lot of things must only be done while in "integration" mode. To test the pom, I run "mvn -Dintegration clean install". The problem I have is that for the second call of the jar plugin, the configuration I give is totally ignored. I can put whatever I want, Maven will never consider it. As a result, I have got an error that says that the "alias" parameter is not set… More strange: if I run a "help:effective-pom", and use the generated pom instead of my original one, it works as expected, i.e. Maven "sees" the parameters! I did the tests on different computers with Maven 2.0.7, Maven 2.0.5, Java 1.4.2, Java 6, and always have the same result. Does anyone have an idea? Thank you very much. ***** Here is the pom file I use: ***** <project> <modelVersion>4.0.0</modelVersion> <groupId>com.axway</groupId> <artifactId>SimpleMavenProject</artifactId> <version>1.0</version> <packaging>jar</packaging> <name>A Simple Maven Test Project</name> <profiles> <profile> <id>integration</id> <activation> <property> <name>integration</name> </property> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <executions> <execution> <id>build-jar</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <!-- Calls to other plugins here --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <executions> <execution> <id>sign-jar</id> <configuration> <alias>myalias</alias> <storepass>mypass</storepass> <keystore>/path/to/my/keystore</keystore> </configuration> <goals> <goal>sign</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> </project> *************************************** Kore, S. Veyret [Ce message a été écrit sur un clavier BÉPO - http://www.clavier-dvorak.org/] --- "Dès que quelqu'un comprend qu'il est contraire à sa dignité d'homme d'obéir à des lois injustes, aucune tyrannie ne peut l'asservir." (Mohandas Karamchand Gandhi)