BINGO!!!!!

Thanks so much, Dennis for pointing me in the RIGHT direction!!

This is simple, just what I wanted.

The last piece of the puzzle was the need to use the flat <repositoryLayout>

Just what I wanted in under 2 hours, as opposed to two days fighting with the complexities of the assembler plugin!

Happy New Year, to all who helped me here!!  You're the best!


Steve



On 12/30/2010 05:41 PM, Dennis Lundberg wrote:
On 2010-12-31 00:08, Steve Cohen wrote:
I think this is going to work.

I absolutely don't need any of the shellscript generation (it would be
nice to be able to turn it off) but I can ignore that.  The creation of
the repository inside the target is slick, and I assume I can use that
to suck all the jars into the assembly plugin.

Yep, here's the assembly descriptor I use:

<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
http://maven.apache.org/xsd/assembly-1.1.0.xsd";>
   <id>dist</id>
   <formats>
     <format>zip</format>
   </formats>
   <includeBaseDirectory>false</includeBaseDirectory>
   <fileSets>
     <fileSet>
       <directory>target/appassembler</directory>
       <outputDirectory></outputDirectory>
       <excludes>
         <exclude>lib/maven-metadata-appassembler.xml</exclude>

<exclude>lib/${project.artifactId}-${project.version}-site.xml</exclude>
       </excludes>
     </fileSet>
   </fileSets>
</assembly>


and the relevant parts of the POM:


       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>appassembler-maven-plugin</artifactId>
         <version>1.0</version>
         <configuration>
           <programs>
             <program>
               <mainClass>my.class.name</mainClass>
               <name>MyProgram</name>
             </program>
           </programs>
           <repositoryLayout>flat</repositoryLayout>
           <repositoryName>lib</repositoryName>
         </configuration>
         <executions>
           <execution>
             <goals>
               <goal>assemble</goal>
             </goals>
           </execution>
         </executions>
       </plugin>
       <!-- Must come after appassembler-maven-plugin -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-assembly-plugin</artifactId>
         <configuration>
           <descriptors>
             <descriptor>src/main/assembly/assembly.xml</descriptor>
           </descriptors>
           <tarLongFileMode>gnu</tarLongFileMode>
         </configuration>
         <executions>
           <execution>
             <id>make-assembly</id>
             <phase>package</phase>
             <goals>
               <goal>single</goal>
             </goals>
           </execution>
         </executions>
       </plugin>





On 12/30/2010 04:23 PM, Steve Cohen wrote:
Thanks again, Dennis. I've now read the documentation more carefully and
this doesn't look as though it does any actual packaging into an archive
(be it zip, jar, tar, etc.) It seems to be ALL about the launch script
and might have been the way to go before I developed all this by hand
with commons-daemon and NOT AT ALL about the actual packaging.

Is the idea then to assemble everything in a directory and THEN pass
this as a fileSet to the assembly plugin?

Or am I missing something?


On 12/30/2010 02:37 PM, Dennis Lundberg wrote:
Hi Steve

May I suggest that you have a look at the Appassembler Maven Plugin for
your batch processing application.

http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/usage-program.html



On 2010-12-30 21:16, Steve Cohen wrote:
After a very frustrating couple of days trying to understand the new



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]






---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to