Results 1 to 3 of 3
Thread: creating executable with maven
- 01-23-2011, 08:32 PM #1
Member
- Join Date
- Jan 2011
- Posts
- 10
- Rep Power
- 0
creating executable with maven
Hi,
I'm trying to create an executable jar from a swing application using maven and its maven-assembly-plugin. It builds ok, I saw in the jar it packs the dependent jars, but it contains non of my own programmed classes, resulting in a classnotfound exception when double clicking on the jar.
Can anyone help me out? Is this the easiest way for creating an excecutable for a swing application or are there better ways?
I don't find a usable example on the internet. Does anyone has a simple example (or url)?
the configuration I used is:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
<descriptorRef>src</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>be.....presentation.MyApp</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>attach-assembly-to-package</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
This plugin is in the parent class containing the modules. It has 6 modules, from which the presentation module contains the main class. The other modules are dependencies of the presentation module.Last edited by GlWy; 01-24-2011 at 06:37 PM.
- 01-23-2011, 11:10 PM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,545
- Rep Power
- 11
Also posted at OTN Discussion Forums : creating executable with maven ...
- 01-24-2011, 09:20 AM #3
Member
- Join Date
- Jan 2011
- Posts
- 10
- Rep Power
- 0
Similar Threads
-
creating executable .jar for linux, mac, and windows
By JohnST in forum New To JavaReplies: 3Last Post: 01-21-2010, 01:51 AM -
Creating an executable jar file in IntelliJ IDEA
By turanan in forum IntelliJ IDEAReplies: 0Last Post: 12-04-2009, 03:06 PM -
Need help for creating executable xml
By patilsubh in forum XMLReplies: 3Last Post: 10-01-2009, 10:54 AM -
Creating a java program that acts like a normal windows executable?
By rolls in forum New To JavaReplies: 3Last Post: 08-10-2009, 06:34 AM -
creating executable jars from Swing programs
By gotenks05 in forum New To JavaReplies: 2Last Post: 09-19-2008, 01:51 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks