logo Appassembler :: Maven Plug-In

A Mojo for generating bin scripts for Java applications.

homepage: mojo.codehaus.org
fresh index:
last release: 3 years ago, first release: 2 decades ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
appassembler:assemble (phase: package)

Assembles the artifacts and generates bin scripts for the configured applications

appassembler:create-repository (phase: package)

Creates an appassembler repository. Note that this is deliberately a bit more specific than the assembly plugin version - if that could generate a flat layout and exclude JARs, it may be a suitable replacement.

appassembler:generate-daemons (phase: package)

Generates JSW based daemon wrappers.

appassembler:help

Display help information on appassembler-maven-plugin. Call mvn appassembler:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

Often used code snippets:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>appassembler-maven-plugin</artifactId>
  <version>1.1.1</version>
  <configuration>
    <assembleDirectory>target</assembleDirectory>
    <programs>
      <program>
        <mainClass>launch.Main</mainClass>
        <name>webapp</name>
      </program>
    </programs>
  </configuration>
  <executions>
    <execution>
      <phase>package</phase>
      <goals>
        <goal>assemble</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>appassembler-maven-plugin</artifactId>
  <version>1.1.1</version>
  <configuration>
    <assembleDirectory>target</assembleDirectory>
    <programs>
      <program>
        <mainClass>MainGlassfish</mainClass>
        <name>webapp</name>
      </program>
    </programs>
  </configuration>
  <executions>
    <execution>
      <phase>package</phase>
      <goals>
        <goal>assemble</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>appassembler-maven-plugin</artifactId>
  <version>2.0.0</version>
  <configuration>
    <assembleDirectory>target</assembleDirectory>
    <programs>
      <program>
        <mainClass>launch.Main</mainClass>
        <name>webapp</name>
      </program>
    </programs>
  </configuration>
  <executions>
    <execution>
      <phase>package</phase>
      <goals>
        <goal>assemble</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>appassembler-maven-plugin</artifactId>
  <version>${appassembler.version}</version>
  <configuration>
    <assembleDirectory>target</assembleDirectory>
    <programs>
      <program>
        <mainClass>launch.Main</mainClass>
        <name>webapp</name>
      </program>
    </programs>
  </configuration>
  <executions>
    <execution>
      <phase>package</phase>
      <goals>
        <goal>assemble</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>appassembler-maven-plugin</artifactId>
  <version>1.1.1</version>
  <configuration>
    <assembleDirectory>target</assembleDirectory>
    <programs>
      <program>
        <mainClass>Main</mainClass>
        <name>webapp</name>
      </program>
    </programs>
  </configuration>
  <executions>
    <execution>
      <id>execution1</id>
      <phase>package</phase>
      <goals>
        <goal>assemble</goal>
      </goals>
    </execution>
  </executions>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.