0

I'm using Maven with the plugin AppAssembler from CodeHaus to auto-generate my launching scripts both for Win and Unix (maybe there is a better solution??), everything works fine but the copy of the proper jar into the lib dir. Note the assemble directory is customized, but I'd like to have a "final" compiled directory that I can just tar/zip and deploy on the different installations.

I run the usual mvn clean package appassembler:assemble

The plugin conf in my pom.xml:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>appassembler-maven-plugin</artifactId>
    <version>2.1.0</version>
    <configuration>
        <configurationSourceDirectory>${project.basedir}/config</configurationSourceDirectory>
        <configurationDirectory>bin/config</configurationDirectory>
        <logsDirectory>bin/logs</logsDirectory>
        <copyConfigurationDirectory>true</copyConfigurationDirectory>
        <includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath>
        <assembleDirectory>${project.build.directory}/Report-assemble</assembleDirectory>
        <extraJvmArguments>-Xms256M</extraJvmArguments>
        <binFolder>bin</binFolder>
        <repositoryLayout>flat</repositoryLayout>
        <repositoryName>lib</repositoryName>
        <platforms>
            <platform>windows</platform>
            <platform>unix</platform>
        </platforms>
        <programs>
            <program>
                <mainClass>my.class.to.the.ReportApplication</mainClass>
                <id>Report</id>
                <!-- Only generate windows bat script for this application -->
                <platforms>
                    <platform>windows</platform>
                    <platform>unix</platform>
                </platforms>
            </program>
        </programs>
    </configuration>
</plugin>

Is there a way to do so automatically when running the assemble? The idea is to have it use my pipelines and through Jenkins-CloudBees automatically deploy everything each time an improvement or modification is done on the code.

Thanks in advance

  • Creating an archive you should use maven-assembly-plugin for that... – khmarbaise Apr 11 '22 at 20:50
  • The scripts are created as expected, as the dependency jars are copied into the lib directory of the assembly path, but the only one remaining to be copied is the proper jar from my project. – Jose Velaz Apr 12 '22 at 07:31

0 Answers0