In order to accomplish similar task (packaging Java WebStart within webapp)
I'm using the maven-shade-plugin to package all internal artifacts into
single jar, after that the
webstart-maven-plugin to sign and install it and the necessary 3rd party
dependencies into the repo. After that I'm using the
maven-dependency-plugin to unpack the JWS resources into the folder of the
webapp. This plugin shows an error in my pom but nevertheless it works for
me with RAD 8.5:
<!--
we unpack the zip file with the webstart app into
the corresponding folder in the webapp
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.5.1</version>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
</execution>
</executions>
<configuration>
<artifactItems>
<artifactItem>
<groupId>xxx</groupId>
<artifactId>xxx</artifactId>
<version>${project.version}</version>
<type>zip</type>
<outputDirectory>src/main/webapp/...</outputDirectory>
...
</artifactItem>
...
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e
settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-dependency-plugin
</artifactId>
<versionRange>
[2.5.1,)
</versionRange>
<goals>
<goal>unpack</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute></execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Hope this helps
On Thu, Dec 6, 2012 at 10:10 AM, Flavio Campana
<[email protected]>wrote:
> Hello everyone,
> i'm having some trouble with m2e and maven-dependency-plugin and its copy
> goal.
> i have configured the maven plugin to copy the jars needed for an applet
> in the correct directory,
> and it works wonders from the command line:
> <plugin>
> <groupId>org.apache.maven.**plugins</groupId>
> <artifactId>maven-dependency-**plugin</artifactId>
> <version>2.4</version>
> <executions>
> <execution>
> <id>copy-dependencies</id>
> <phase>generate-resources</**phase>
> <goals>
> <goal>copy</goal>
> </goals>
> <configuration>
> <artifactItems>
> <!-- CUT -->
> </artifactItems>
> <outputDirectory>${project.**build.directory}/TestProject/**applets</outputDirectory>
>
> <overWriteReleases>true</**overWriteReleases>
> <overWriteSnapshots>true</**overWriteSnapshots>
> <overWriteIfNewer>true</**overWriteIfNewer>
> </configuration>
> </execution>
> </executions>
> </plugin>
> I configured the lifecycle mappings for m2e like this:
> <pluginExecution>
> <pluginExecutionFilter>
> <groupId>
> org.apache.maven.plugins
> </groupId>
> <artifactId>
> maven-dependency-plugin
> </artifactId>
> <versionRange>
> [2.1,)
> </versionRange>
> <goals>
> <goal>
> copy
> </goal>
> </goals>
> </pluginExecutionFilter>
> <action>
> <execute>
> <runOnIncremental>true</**runOnIncremental>
> </execute>
> </action>
> </pluginExecution>
>
> but the jars are not copied in the webapp for debug in the internal
> eclipse server.
> What can i do?
> ______________________________**_________________
> m2e-users mailing list
> [email protected]
> https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users>
>
_______________________________________________
m2e-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/m2e-users