> 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>
      <groupId>myApp</groupId>
      <artifactId>myApp-webstart-jnlp</artifactId>
      <version>${pom.currentVersion}</version>
      <type>zip</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]

Reply via email to