Maven 2.x Webstart Plugin

A Mojo for deploying/dist'ing the application could be useful

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.0-alpha-2
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

It would be useful to be able to easily deploy the application to a web server, when it is not bundled as a web app. E.g.
mvn webstart:dist
or if it could somehow be hooked up to the dist process, so it was done by a simple
mvn dist

In maven 1, we used the following goal to dist the application:

<goal name="dist" prereqs="jnlp">
<echo>Copying files from ${maven.jnlp.dir} to ${tt.jnlp.location.host}</echo>
<ant:fileScanner var="files">
<ant:fileset dir="${maven.jnlp.dir}">
<ant:include name="**"/>
</ant:fileset>
</ant:fileScanner>
<j:forEach var="file" items="${files.iterator()}">
<echo>Copying ${file} to ${tt.jnlp.location.host}</echo>
<ant:exec executable="scp" failonerror="true">
<ant:arg value="${file}"/>
<ant:arg value="maven@${tt.jnlp.location.host}:${tt.jnlp.location.dir}"/>
</ant:exec>
</j:forEach>
</goal>

Issue Links

Activity

Hide
Jerome Lacoste added a comment -

Some sort of mvn webstart:deploy could be useful.
If so, reusing wagon to support various ways of deploying and the notion of servers found in profiles/settings could be a good idea.

Show
Jerome Lacoste added a comment - Some sort of mvn webstart:deploy could be useful. If so, reusing wagon to support various ways of deploying and the notion of servers found in profiles/settings could be a good idea.
Hide
Havard Bjastad added a comment -

We've done it similar to what we did in Maven 1, using Ant:

<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>deploy</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>Releasing to maven@marple:projects/${pom.artifactId}</echo>
<scp todir="maven@marple:projects/${pom.artifactId}" keyfile="${user.home}/.ssh/id_rsa" passphrase="">
<fileset dir="${basedir}/target/jnlp">
<include name="*"/>
</fileset>
</scp>
</tasks>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.29</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-jsch</artifactId>
<version>1.6.5</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>

This works well, so writing the new mojo has not been prioritized. Just like MWEBSTART-24, I still think it makes sense to do, so let's keep this one open. Maybe wagon is the way to go - though our need is just to scp the files to a web server area.

Show
Havard Bjastad added a comment - We've done it similar to what we did in Maven 1, using Ant: <profile> <id>release</id> <build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>deploy</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <echo>Releasing to maven@marple:projects/${pom.artifactId}</echo> <scp todir="maven@marple:projects/${pom.artifactId}" keyfile="${user.home}/.ssh/id_rsa" passphrase=""> <fileset dir="${basedir}/target/jnlp"> <include name="*"/> </fileset> </scp> </tasks> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>com.jcraft</groupId> <artifactId>jsch</artifactId> <version>0.1.29</version> </dependency> <dependency> <groupId>ant</groupId> <artifactId>ant-jsch</artifactId> <version>1.6.5</version> </dependency> </dependencies> </plugin> </plugins> </build> </profile> This works well, so writing the new mojo has not been prioritized. Just like MWEBSTART-24, I still think it makes sense to do, so let's keep this one open. Maybe wagon is the way to go - though our need is just to scp the files to a web server area.
Hide
Ryan Sonnek added a comment -

+1 for this feature.

The ant plugin route is definitely a hack and can't support the various upload mechanisms like wagon (SCP, file, FTP, etc).

Show
Ryan Sonnek added a comment - +1 for this feature. The ant plugin route is definitely a hack and can't support the various upload mechanisms like wagon (SCP, file, FTP, etc).
Hide
Jerome Lacoste added a comment -

Would this be sufficient ? http://myfaces.apache.org/wagon-maven-plugin/usage.html

If so I will add it to the FAQ.

Show
Jerome Lacoste added a comment - Would this be sufficient ? http://myfaces.apache.org/wagon-maven-plugin/usage.html If so I will add it to the FAQ.

People

Vote (3)
Watch (3)

Dates

  • Created:
    Updated: