Maven AppAssembler not copying the own jar

68 views Asked by At

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

0

There are 0 answers