Take a look at onejar. There is a maven plugin as well. -------- Original Message -------- Subject: Re: Create Windows executable JAR From: Eric Kolotyluk To: Maven Users List Date: 02/07/2013 02:34 PM
> I have often built a single .jar file that will launch if you double-click > it from a desktop or folder. I have even created a single file that works > equally well on Windows, Mac and Linux. > > The catch is, however, that you have to have Java already installed, and > your desktop environment needs to associate .jar files with Java. > > For example, you can use the shade plugin to create an uber-jar this is > launch-able. > > If you do not have Java already installed, you have to resort to creating a > .exe file for use on Windows. In the good old days, you could always count > on Java being installed on OS X. > > Cheers, Eric > > On Thu, Feb 7, 2013 at 10:05 AM, Curtis Rueden <[email protected]> wrote: > >> Hi Jeff, >> >>> I want to build with Maven a Windows executable given the fact >>> that I am able to produce an executable JAR. >> >> To my knowledge, it is not a cleanly solved problem. >> >> My team solved it by writing our own cross-platform launcher application in >> C [1]. There are many technical details in the comments of the relevant >> issue in our bug tracker [2]. We use maven-nar-plugin and >> maven-assembly-plugin to enable Maven to compile, package and deploy it on >> various platforms, with the help of Windows, OS X and Linux Jenkins nodes >> [3, 4]. >> >> Horribly complicated, but it works. Maybe others know of a simpler >> solution. >> >> Regards, >> Curtis >> >> [1] https://github.com/imagej/imagej/tree/master/core/launcher >> [2] http://trac.imagej.net/ticket/832 >> [3] http://jenkins.imagej.net/job/ImageJ-launcher/ >> [4] http://jenkins.imagej.net/job/ImageJ-launcher-deploy/ >> >> >> On Thu, Feb 7, 2013 at 11:34 AM, Jeff MAURY <[email protected]> >> wrote: >> >>> Hello, >>> >>> I have the following request: >>> I want to build with Maven a Windows executable given the fact that I am >>> able to produce an executable JAR. >>> I have seen the Codehaus appasembler Maven plugin but it seems it >> produces >>> several files where I want to produce a single .exe file. >>> Do you know if such a plugin exists somewhere ? >>> >>> Thanks >>> >>> -- >>> Jeff MAURY >>> >>> >>> "Legacy code" often differs from its suggested alternative by actually >>> working and scaling. >>> - Bjarne Stroustrup >>> >>> http://www.jeffmaury.com >>> http://riadiscuss.jeffmaury.com >>> http://www.twitter.com/jeffmaury >>> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
