Re: best practices to bundle artifacts other generated files within a war
E.g. I use the jnlp plugin to create webstart applications (in target/jnlp). I want these webstart apps to be in my war. Should I zip this jnlp directory inside my jnlp sub-project, install this zip file as artifact in the maven local repository, then do some preGoal/postGoal magic inside the webapp project to bundle it in my war? For this particular problem, I picked up that solution. Details below. Still I don't feel that this fits well with the maven way of doing things. In my jnlp module, I've added something like goal name=myapp:dist prereqs=jnlp ant:mkdir dir=${maven.build.dir}/ ant:zip destfile=${maven.build.dir}/${maven.final.name}.zip basedir=${maven.jnlp.dir}/ artifact:install artifact=${maven.build.dir}/${maven.final.name}.zip type=zip project=${pom}/ /goal and in my webapp module dependency groupIdmyApp/groupId artifactIdmyApp-webstart-jnlp/artifactId version${pom.currentVersion}/version typezip/type /dependency postGoal name=war:webapp ant:unzip src=${pom.getDependencyPath('myApp:myApp-webstart-jnlp')} dest=${maven.war.webapp.dir}/webstart// /postGoal These maven.xml snippets would be unecessary if: - the jnlp plugin had a jnlp-zip target (or if there was a jnlp-zip plugin) - the war plugin had a way to automatically unzip zip files in particular path. See my comments in http://jira.codehaus.org/browse/MPWAR-41 Comments appreciated. Cheers, Jerome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
best practices to bundle artifacts other generated files within a war
I have a multiproject webapp and want to bundle in it several files that are artifacts of other projects. And I have trouble identifying the best practices when it comes to bundle all these files in the war. E.g. I use the jnlp plugin to create webstart applications (in target/jnlp). I want these webstart apps to be in my war. Should I zip this jnlp directory inside my jnlp sub-project, install this zip file as artifact in the maven local repository, then do some preGoal/postGoal magic inside the webapp project to bundle it in my war? Should I create my war file in 2 steps, first an incomplete war in a 'webapp' project, that I complete in a second step thanks to a 'distribution' project where I add all my missing content thanks to maven.xml? How will this fit with m2 where, if I understood, reliance on maven.xml is supposedly to be minimal? Cheers, Jerome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]