Check out the CustomArtifactHandler part of this guide [1]. I think what you're missing is an "extension" [2] element in your POM.
-Nathan [1] http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html [2] http://maven.apache.org/ref/current/maven-model/maven.html#class_extension On 10/6/06, Swenson, Eric <[EMAIL PROTECTED]> wrote:
Well, I've made progress since my post. However, I still have an issue. I now have a maven-wsr-plugin, which I based on maven-war-plugin and I'm able to compile my project with: mvn compiler:compile and package my project (into a .wsr file) with: mvn wsr:wsr However, what I can't do is perform the compile/package/install automatically by simply doing: mvn install This works for jar and war files. But for my wsr files, it doesn't. When I attempt either an: mvn compile or mvn install I get the error: $ mvn compile [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ ---- [INFO] Building NemoPersonalizationService [INFO] task-segment: [compile] [INFO] ------------------------------------------------------------------------ ---- [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Cannot find lifecycle mapping for packaging: 'wsr'. Component descriptor cannot be found in the component repository: org.apache.maven.lifecycle.mapping.LifecycleMappingwsr. or $ mvn install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ ---- [INFO] Building NemoPersonalizationService [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ ---- [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Cannot find lifecycle mapping for packaging: 'wsr'. Component descriptor cannot be found in the component repository: org.apache.maven.lifecycle.mapping.LifecycleMappingwsr. If my pom uses <packaging>jar</packaging> I'm able to use "mvn compile" or "mvn package" or "mvn install". How can I enable this for my maven-wsr-plugin (e.g. pom files with <packaging>wsr</packaging>? -- Eric -----Original Message----- From: Swenson, Eric Sent: Friday, October 06, 2006 5:53 PM To: dev@maven.apache.org Subject: Creating a .wsr file artifact I'm using Maven 2.0.4 and need to produce a .wsr file. A .wsr file is a jboss web service archive and is very similar to a .war file, a .sar file, and an .ear file. I've tried two tacts so far, neither successful. The first approach was to take the mavin-war-plugin sources, renaming all instances of "war" to "wsr" and using it. I had to make a copy of the WarArchiver class (org.codehaus.plexus.archiver.WarArchiver) and rename it, too, to WsrArchiver in order to get the generated plugin.xml to not refer to WarArchiver. However, I was never able to get this plugin to work. I kept getting errors telling me that the life cycle manager could not find a mapping for "wsr". I gave up and tried to figure out how to get maven to simply rename the artifact after the package goal - I went back to using war files. I wanted to simply rename this from a war file to a wsr file. But I could never figure out how to do that. It would appear that the <format> in an <assembly> (I used "zip") also dictated the file extension placed on the output of the assembly. Can someone give me some hints on how to accomplish what I need to do? I would actually like to get the mavin-wsr-plugin to work because I'd like to be able to add more wsr-related smarts to the packaging (there are additional files in a wsr that are not in a war). But I can't figure out how to get a copy of mavin-war-plugin to work with the *only* change being that the file extension of the artifact is changed to "wsr" (from "war"). Can anyone help? -- Eric --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]