I have a question about this. I tried what you have done with the
assembly plugin for my set up. I have a webapp. In the webapp's web-inf
folder, I need the following:
web-inf/bin/*.sh
web-inf/bigbrother // this is just an empty folder. one of the
.sh files uses it.
I created the following package structure:
src/main/scripts/bin // with all the .sh files
src/main/scripts/bigbrother
I added your assembly plugin to my pom. I created the following bin.xml
file in the assembly folder:
<assembly>
<id>war</id>
<formats>
<format>war</format>
</formats>
<fileSets>
<fileSet>
<directory>src/main/scripts</directory>
<outputDirectory>/WEB-INF/bin</outputDirectory>
<includes>
<include>**/*.sh</include>
<include>**/**</include>
</includes>
</fileSet>
</fileSets>
</assembly>
I tried a couple of different things for the second include, not of
which work.
Can anyone help on this?
Thanks...
Frank Russo
Senior Developer
FX Alliance, LLC
> -----Original Message-----
Thanks for all the replies.
I actually got most of what I wanted from the jar and
assembly plugin.
I configured the following in my pom.xml:
...
<build>
...
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptor>src/main/assembly/bin.xml</descriptor>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>net.sf.toolinstaller.ui.cli.Main</mainClass>
<packageName>net.sf.toolinstaller</packageName>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
...
</build>
...
The jar plugin generates the manifest so that the
classpath is generated and the mainclass is specified.
This means that my run script merely contains:
java.exe -jar ../lib/toolinstaller-0.2-SNAPSHOT.jar %*
The only thing missing here is automatic substitution
of the version in the jar filename - but I can handle
doing that manually for now.
Then, I've configured the assembly plugin with
src/main/assembly/bin.xml which copies the required
artifacts into the assembled artifact for
distribution.
Awesome - great work from the maven developers.
If you want to look at the full pom.xml and
src/main/assembly/bin.xml files have a look at my
files in the CVS repository:
http://cvs.sourceforge.net/viewcvs.py/toolinstaller/toolinstaller/
<http://cvs.sourceforge.net/viewcvs.py/toolinstaller/toolinstaller/>
I wonder if it would be a good idea to enable
substitutions when the assembly plugin copies
resources.
Thanks again,
Paul.
--- Paul Rule <[EMAIL PROTECTED]> wrote:
> I often write stand alone apps, and I've often
> thought
> it would be good to have a plugin to bundle up a
> build
> complete with all the dependent jars, scripts,
> config
> files etc - and to even generate the run.bat &
> run.sh
> scripts.
>
> Is there anything like this currently (I talking
> maven2) - if I wrote it would anyone else find it
> useful?
>
> Also, would anyone find a plugin that generated the
> java service wrapper configuration useful?
>
>
>
> ____________________________________________________
>
> Do you Yahoo!?
> The New Yahoo! Movies: Check out the Latest
> Trailers, Premiere Photos and full Actor Database.
> http://au.movies.yahoo.com <http://au.movies.yahoo.com/>
>
Send instant messages to your online friends
http://au.messenger.yahoo.com <http://au.messenger.yahoo.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]