Re: jar:sign refuses to sign jar artifact of project with custom packaging type
alternatively (and probably preferably), it looks like you need to configure the ~.ArtifactHandler role (as well as the ~.LifecycleMapping one) in the components.xml. 2009/3/3 Rob Dickens arctic@googlemail.com Okay - after some google codesearching, and minimal testing, the following appears to address the problem: In the execute() of the Mojo for the goal which precedes the jar:jar one, add the following: project.getArtifact().setArtifactHandler(new MyArtifactHandler()); where MyArtifactHandler is defined as extending org.apache.maven.artifact.handler.DefaultArtifactHandler, so as to override the getLanguage() method with a version which returns java. One or two pom.xml mods are also required, to ensure that .jar is used instead of .${project.packaging}. Please could anyone knowledgeable comment on the above. I don't remember seeing this in any instructions for writing plug-ins. 2009/3/3 Wayne Fay wayne...@gmail.com same story with the new mvn 2.0.10 maven-jar-plugin is at 2.2 Has no one else seen this? In all likelihood, you're one of the first people to try using jar:sign on a custom artifact. So it might be a little painful to get it working, and may involve changing some code in the Jar plugin. Once you do, please do post back for future people who want to do the same thing, and contribute the code changes back via Jira. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Rob, Lafros.com
Re: jar:sign refuses to sign jar artifact of project with custom packaging type
same story with the new mvn 2.0.10 maven-jar-plugin is at 2.2 Has no one else seen this? 2009/3/2 Rob Dickens arctic@googlemail.com I get the following message when mvn is run with the -X option: [DEBUG] Not executing jar:sign as the project is not a Java module (Am using a custom packaging type in order to use a custom lifecycle, that invokes a custom goal before the jar:jar one.) If I change the packaging type back to jar, jar:sign does sign the artifact. Could anyone please help. Thanks. -- Rob, Lafros.com
Re: jar:sign refuses to sign jar artifact of project with custom packaging type
same story with the new mvn 2.0.10 maven-jar-plugin is at 2.2 Has no one else seen this? In all likelihood, you're one of the first people to try using jar:sign on a custom artifact. So it might be a little painful to get it working, and may involve changing some code in the Jar plugin. Once you do, please do post back for future people who want to do the same thing, and contribute the code changes back via Jira. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: jar:sign refuses to sign jar artifact of project with custom packaging type
Okay - after some google codesearching, and minimal testing, the following appears to address the problem: In the execute() of the Mojo for the goal which precedes the jar:jar one, add the following: project.getArtifact().setArtifactHandler(new MyArtifactHandler()); where MyArtifactHandler is defined as extending org.apache.maven.artifact.handler.DefaultArtifactHandler, so as to override the getLanguage() method with a version which returns java. One or two pom.xml mods are also required, to ensure that .jar is used instead of .${project.packaging}. Please could anyone knowledgeable comment on the above. I don't remember seeing this in any instructions for writing plug-ins. 2009/3/3 Wayne Fay wayne...@gmail.com same story with the new mvn 2.0.10 maven-jar-plugin is at 2.2 Has no one else seen this? In all likelihood, you're one of the first people to try using jar:sign on a custom artifact. So it might be a little painful to get it working, and may involve changing some code in the Jar plugin. Once you do, please do post back for future people who want to do the same thing, and contribute the code changes back via Jira. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Rob, Lafros.com