The simplest possible configuration

If you want to create the application bundle as a part of Maven's build cycle you must configure the plugin in your POM.

This example show the simplest possible configuration. The <mainClass> configuration property isn't required, the plugin will try to find a main class in your classes and dependencies. However, it's probably smart to be explicit about which class to run.

 <project>
    ...
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>osxappbundle-maven-plugin</artifactId>
                <version>1.0-alpha-1</version>
                <configuration>
                    <mainClass>com.example.Main</mainClass>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>bundle</goal>
                        </goals>
                    </execution>
               </executions>
           </plugin>
           ...
       </plugins>
   <build>
   ...
 </project>

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.