Re: plugin and executable jar

2016-03-01 Thread Jason van Zyl
https://github.com/brianm/really-executable-jars-maven-plugin

> On Mar 1, 2016, at 4:44 PM, Philipp Kraus  
> wrote:
> 
> Hallo,
> 
> I have created my first Maven plugin with Mojo, but I would like to create 
> also a executable Jar.
> The plugin should be run as a standalone program and also as a Maven plugin. 
> The Pom
> can be found here https://github.com/flashpixx/RRD-AntLR4/blob/master/pom.xml
> so my question is how can I create two different Jar files one with the 
> packaging jar (and
> all dependencies) and one with the packaging „maven-plugin“?
> 
> Thanks a lot 
> 
> Phil
> 
> 

Thanks,

Jason

--
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
-



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: plugin and executable jar

2016-03-01 Thread Manfred Moser
And


Learn about multi module projects .. this is essential Maven knowledge.


http://books.sonatype.com/mvnex-book/reference/multimodule.html

Manfred


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: plugin and executable jar

2016-03-01 Thread Philipp Kraus
Hi,

Am 01.03.2016 um 23:00 schrieb Manfred Moser :

> 1 pom that acts as parent and aggregator to tie it all together

thanks for your answer, but this is the problem how can I create the 
„aggregated pom file“

Phil
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: plugin and executable jar

2016-03-01 Thread Manfred Moser
do NOT use profiles.. therin lies madness


youssef boujallab wrote on 2016-03-01 14:06:
> You can't do it with a standard approach.
> You should use two distinct Maven projects or use profiles with two
> differents configurations ( one for executable jar and other for your
> mojo)
> Le 1 mars 2016 22:04, "Philipp Kraus"  a
> écrit :
> 
> > Hi,
> >
> > Am 01.03.2016 um 22:47 schrieb youssef boujallab <
> > youssef.boujal...@gmail.com>:
> >
> > > Did you have a look on shade plugin?
> >
> > thanks for your answer, I’m using the shade plugin at the moment, but I
> > cannot
> > create the different Jar files
> >
> > Phil
> > -
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
> 
>


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: plugin and executable jar

2016-03-01 Thread youssef boujallab
You can't do it with a standard approach.
You should use two distinct Maven projects or use profiles with two
differents configurations  ( one for executable jar and other for your mojo)
Le 1 mars 2016 22:04, "Philipp Kraus"  a
écrit :

> Hi,
>
> Am 01.03.2016 um 22:47 schrieb youssef boujallab <
> youssef.boujal...@gmail.com>:
>
> > Did you have a look on shade plugin?
>
> thanks for your answer, I’m using the shade plugin at the moment, but I
> cannot
> create the different Jar files
>
> Phil
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: plugin and executable jar

2016-03-01 Thread Philipp Kraus
Hi,

Am 01.03.2016 um 22:47 schrieb youssef boujallab :

> Did you have a look on shade plugin?

thanks for your answer, I’m using the shade plugin at the moment, but I cannot
create the different Jar files

Phil
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: plugin and executable jar

2016-03-01 Thread Manfred Moser
Just do this

1 jar project with the functionality

1 maven-plugin project that uses the jar and wraps it in a maven plugin

1 jar project that has the main() method wrapper and command line parser=
 or whatever for the executable

1 pom that acts as parent and aggregator to tie it all together


Manfred

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: plugin and executable jar

2016-03-01 Thread youssef boujallab
Hi,

Did you have a look on shade plugin?

Wishes
Le 1 mars 2016 21:44, "Philipp Kraus"  a
écrit :

> Hallo,
>
> I have created my first Maven plugin with Mojo, but I would like to create
> also a executable Jar.
> The plugin should be run as a standalone program and also as a Maven
> plugin. The Pom
> can be found here
> https://github.com/flashpixx/RRD-AntLR4/blob/master/pom.xml
> so my question is how can I create two different Jar files one with the
> packaging jar (and
> all dependencies) and one with the packaging „maven-plugin“?
>
> Thanks a lot
>
> Phil
>
>
>


plugin and executable jar

2016-03-01 Thread Philipp Kraus
Hallo,

I have created my first Maven plugin with Mojo, but I would like to create also 
a executable Jar.
The plugin should be run as a standalone program and also as a Maven plugin. 
The Pom
can be found here https://github.com/flashpixx/RRD-AntLR4/blob/master/pom.xml
so my question is how can I create two different Jar files one with the 
packaging jar (and
all dependencies) and one with the packaging „maven-plugin“?

Thanks a lot

Phil




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Add third party jars from the file system to final executable jar without adding the third party jars in local maven repo

2015-10-27 Thread Stephen Connolly
The new link is
https://www.cloudbees.com/blog/playing-trade-offs-maven *BUT* somebody
managed to completely screw up the XML formatting when migrating from
the old blog hosting to the new blog hosting...

On 26 October 2015 at 17:21, Curtis Rueden  wrote:
> Hi Reena,
>
> Stephen Connelly wrote a great blog post a couple of years ago addressing
> similar use cases. The URL is/was:
>
> http://developer-blog.cloudbees.com/2013/03/playing-trade-offs-with-maven.html
>
> Unfortunately, it seems the CloudBees Developer Blog is currently not
> working (it redirects to the main CloudBees page). But you can use Google's
> cache to read it:
>
> http://webcache.googleusercontent.com/search?q=cache:g6o4OFBnC9wJ:developer-blog.cloudbees.com/2013/03/playing-trade-offs-with-maven.html+&cd=1&hl=en&ct=clnk&gl=us
>
> HTH,
> Curtis
>
> On Mon, Oct 26, 2015 at 11:50 AM, Wayne Fay  wrote:
>
>> Sounds like you know the answer. Use the "mvn install" file command.
>>
>> Wayne
>>
>> On Mon, Oct 26, 2015 at 9:53 AM, reena upadhyay 
>> wrote:
>> > Can you please provide some code snippet, how to add it to local repo
>> > through pom.xml. I don't want it add to my local maven repo using mvn
>> > install file command.
>> >
>> > On Mon, Oct 26, 2015 at 8:21 PM, Anders Hammar 
>> wrote:
>> >
>> >> The system scope is deprecated and the issues you're running into is
>> likely
>> >> due to that. The solution is to add the library to your internal
>> (remote)
>> >> repo or at least your local repo.
>> >>
>> >> /Anders
>> >>
>> >> On Mon, Oct 26, 2015 at 3:26 PM, reena upadhyay 
>> >> wrote:
>> >>
>> >> > I want dependencies that are having system scope to be part of my
>> project
>> >> > final executable jar. I tried maven-assembly, maven-shade and
>> >> > maven-dependency plugin. But using these plugins, only those
>> dependency
>> >> of
>> >> > my project which were present in my local maven repository were
>> getting
>> >> > added. Dependency with system scope (not present in my local maven
>> repo)
>> >> > are not getting added in the final executable jar.
>> >> >
>> >> > I tried searching over google, but most of the links are suggesting to
>> >> add
>> >> > it local maven repo first. I have some limitations so I cannot add
>> those
>> >> > dependency on local repo. I want it to picked from file system
>> directly,
>> >> > and wanted it to be part of final executable jar.
>> >> >
>> >> > 
>> >> > 
>> >> > org.teradata
>> >> > teradata
>> >> > 4.0
>> >> > system
>> >> >
>> >> >
>> >>
>> ${basedir}/../../../lib/terajdbc4.jar
>> >> >
>> >> > Above dependency is not getting added in the final jar that maven is
>> >> > building.
>> >> >
>> >> > Please suggest me the right plugin with its usage for this use case.
>> >> >
>> >> > Any help on this would be really appreciated.
>> >> >
>> >>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Add third party jars from the file system to final executable jar without adding the third party jars in local maven repo

2015-10-26 Thread Curtis Rueden
Hi Reena,

Stephen Connelly wrote a great blog post a couple of years ago addressing
similar use cases. The URL is/was:

http://developer-blog.cloudbees.com/2013/03/playing-trade-offs-with-maven.html

Unfortunately, it seems the CloudBees Developer Blog is currently not
working (it redirects to the main CloudBees page). But you can use Google's
cache to read it:

http://webcache.googleusercontent.com/search?q=cache:g6o4OFBnC9wJ:developer-blog.cloudbees.com/2013/03/playing-trade-offs-with-maven.html+&cd=1&hl=en&ct=clnk&gl=us

HTH,
Curtis

On Mon, Oct 26, 2015 at 11:50 AM, Wayne Fay  wrote:

> Sounds like you know the answer. Use the "mvn install" file command.
>
> Wayne
>
> On Mon, Oct 26, 2015 at 9:53 AM, reena upadhyay 
> wrote:
> > Can you please provide some code snippet, how to add it to local repo
> > through pom.xml. I don't want it add to my local maven repo using mvn
> > install file command.
> >
> > On Mon, Oct 26, 2015 at 8:21 PM, Anders Hammar 
> wrote:
> >
> >> The system scope is deprecated and the issues you're running into is
> likely
> >> due to that. The solution is to add the library to your internal
> (remote)
> >> repo or at least your local repo.
> >>
> >> /Anders
> >>
> >> On Mon, Oct 26, 2015 at 3:26 PM, reena upadhyay 
> >> wrote:
> >>
> >> > I want dependencies that are having system scope to be part of my
> project
> >> > final executable jar. I tried maven-assembly, maven-shade and
> >> > maven-dependency plugin. But using these plugins, only those
> dependency
> >> of
> >> > my project which were present in my local maven repository were
> getting
> >> > added. Dependency with system scope (not present in my local maven
> repo)
> >> > are not getting added in the final executable jar.
> >> >
> >> > I tried searching over google, but most of the links are suggesting to
> >> add
> >> > it local maven repo first. I have some limitations so I cannot add
> those
> >> > dependency on local repo. I want it to picked from file system
> directly,
> >> > and wanted it to be part of final executable jar.
> >> >
> >> > 
> >> > 
> >> > org.teradata
> >> > teradata
> >> > 4.0
> >> > system
> >> >
> >> >
> >>
> ${basedir}/../../../lib/terajdbc4.jar
> >> >
> >> > Above dependency is not getting added in the final jar that maven is
> >> > building.
> >> >
> >> > Please suggest me the right plugin with its usage for this use case.
> >> >
> >> > Any help on this would be really appreciated.
> >> >
> >>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Add third party jars from the file system to final executable jar without adding the third party jars in local maven repo

2015-10-26 Thread Wayne Fay
Sounds like you know the answer. Use the "mvn install" file command.

Wayne

On Mon, Oct 26, 2015 at 9:53 AM, reena upadhyay  wrote:
> Can you please provide some code snippet, how to add it to local repo
> through pom.xml. I don't want it add to my local maven repo using mvn
> install file command.
>
> On Mon, Oct 26, 2015 at 8:21 PM, Anders Hammar  wrote:
>
>> The system scope is deprecated and the issues you're running into is likely
>> due to that. The solution is to add the library to your internal (remote)
>> repo or at least your local repo.
>>
>> /Anders
>>
>> On Mon, Oct 26, 2015 at 3:26 PM, reena upadhyay 
>> wrote:
>>
>> > I want dependencies that are having system scope to be part of my project
>> > final executable jar. I tried maven-assembly, maven-shade and
>> > maven-dependency plugin. But using these plugins, only those dependency
>> of
>> > my project which were present in my local maven repository were getting
>> > added. Dependency with system scope (not present in my local maven repo)
>> > are not getting added in the final executable jar.
>> >
>> > I tried searching over google, but most of the links are suggesting to
>> add
>> > it local maven repo first. I have some limitations so I cannot add those
>> > dependency on local repo. I want it to picked from file system directly,
>> > and wanted it to be part of final executable jar.
>> >
>> > 
>> > 
>> > org.teradata
>> > teradata
>> > 4.0
>> > system
>> >
>> >
>> ${basedir}/../../../lib/terajdbc4.jar
>> >
>> > Above dependency is not getting added in the final jar that maven is
>> > building.
>> >
>> > Please suggest me the right plugin with its usage for this use case.
>> >
>> > Any help on this would be really appreciated.
>> >
>>

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Add third party jars from the file system to final executable jar without adding the third party jars in local maven repo

2015-10-26 Thread Anders Hammar
Sorry, I don't have such a solution handy as it's not anything that is
adviced from a Maven perspective. However, most likely Google is your
friend here and could find some solution.
The "Maven way" is to add the library to your internal (remote) repo so
that you can declare a dependency that will work for all your team mates
without any additional magic.

/Anders

On Mon, Oct 26, 2015 at 3:53 PM, reena upadhyay  wrote:

> Can you please provide some code snippet, how to add it to local repo
> through pom.xml. I don't want it add to my local maven repo using mvn
> install file command.
>
> On Mon, Oct 26, 2015 at 8:21 PM, Anders Hammar  wrote:
>
> > The system scope is deprecated and the issues you're running into is
> likely
> > due to that. The solution is to add the library to your internal (remote)
> > repo or at least your local repo.
> >
> > /Anders
> >
> > On Mon, Oct 26, 2015 at 3:26 PM, reena upadhyay 
> > wrote:
> >
> > > I want dependencies that are having system scope to be part of my
> project
> > > final executable jar. I tried maven-assembly, maven-shade and
> > > maven-dependency plugin. But using these plugins, only those dependency
> > of
> > > my project which were present in my local maven repository were getting
> > > added. Dependency with system scope (not present in my local maven
> repo)
> > > are not getting added in the final executable jar.
> > >
> > > I tried searching over google, but most of the links are suggesting to
> > add
> > > it local maven repo first. I have some limitations so I cannot add
> those
> > > dependency on local repo. I want it to picked from file system
> directly,
> > > and wanted it to be part of final executable jar.
> > >
> > > 
> > > 
> > > org.teradata
> > > teradata
> > > 4.0
> > > system
> > >
> > >
> >
> ${basedir}/../../../lib/terajdbc4.jar
> > >
> > > Above dependency is not getting added in the final jar that maven is
> > > building.
> > >
> > > Please suggest me the right plugin with its usage for this use case.
> > >
> > > Any help on this would be really appreciated.
> > >
> >
>


Re: Add third party jars from the file system to final executable jar without adding the third party jars in local maven repo

2015-10-26 Thread reena upadhyay
Can you please provide some code snippet, how to add it to local repo
through pom.xml. I don't want it add to my local maven repo using mvn
install file command.

On Mon, Oct 26, 2015 at 8:21 PM, Anders Hammar  wrote:

> The system scope is deprecated and the issues you're running into is likely
> due to that. The solution is to add the library to your internal (remote)
> repo or at least your local repo.
>
> /Anders
>
> On Mon, Oct 26, 2015 at 3:26 PM, reena upadhyay 
> wrote:
>
> > I want dependencies that are having system scope to be part of my project
> > final executable jar. I tried maven-assembly, maven-shade and
> > maven-dependency plugin. But using these plugins, only those dependency
> of
> > my project which were present in my local maven repository were getting
> > added. Dependency with system scope (not present in my local maven repo)
> > are not getting added in the final executable jar.
> >
> > I tried searching over google, but most of the links are suggesting to
> add
> > it local maven repo first. I have some limitations so I cannot add those
> > dependency on local repo. I want it to picked from file system directly,
> > and wanted it to be part of final executable jar.
> >
> > 
> > 
> > org.teradata
> > teradata
> > 4.0
> > system
> >
> >
> ${basedir}/../../../lib/terajdbc4.jar
> >
> > Above dependency is not getting added in the final jar that maven is
> > building.
> >
> > Please suggest me the right plugin with its usage for this use case.
> >
> > Any help on this would be really appreciated.
> >
>


Re: Add third party jars from the file system to final executable jar without adding the third party jars in local maven repo

2015-10-26 Thread Anders Hammar
The system scope is deprecated and the issues you're running into is likely
due to that. The solution is to add the library to your internal (remote)
repo or at least your local repo.

/Anders

On Mon, Oct 26, 2015 at 3:26 PM, reena upadhyay  wrote:

> I want dependencies that are having system scope to be part of my project
> final executable jar. I tried maven-assembly, maven-shade and
> maven-dependency plugin. But using these plugins, only those dependency of
> my project which were present in my local maven repository were getting
> added. Dependency with system scope (not present in my local maven repo)
> are not getting added in the final executable jar.
>
> I tried searching over google, but most of the links are suggesting to add
> it local maven repo first. I have some limitations so I cannot add those
> dependency on local repo. I want it to picked from file system directly,
> and wanted it to be part of final executable jar.
>
> 
> 
> org.teradata
> teradata
> 4.0
> system
>
> ${basedir}/../../../lib/terajdbc4.jar
>
> Above dependency is not getting added in the final jar that maven is
> building.
>
> Please suggest me the right plugin with its usage for this use case.
>
> Any help on this would be really appreciated.
>


Add third party jars from the file system to final executable jar without adding the third party jars in local maven repo

2015-10-26 Thread reena upadhyay
I want dependencies that are having system scope to be part of my project
final executable jar. I tried maven-assembly, maven-shade and
maven-dependency plugin. But using these plugins, only those dependency of
my project which were present in my local maven repository were getting
added. Dependency with system scope (not present in my local maven repo)
are not getting added in the final executable jar.

I tried searching over google, but most of the links are suggesting to add
it local maven repo first. I have some limitations so I cannot add those
dependency on local repo. I want it to picked from file system directly,
and wanted it to be part of final executable jar.



org.teradata
teradata
4.0
system
${basedir}/../../../lib/terajdbc4.jar

Above dependency is not getting added in the final jar that maven is
building.

Please suggest me the right plugin with its usage for this use case.

Any help on this would be really appreciated.


Re: [Failsafe] How to properly conduct integration tests on executable jar files

2014-03-19 Thread Alex Karasulu
On Thu, Mar 13, 2014 at 4:54 AM, Alex Karasulu  wrote:

> Hello,
>
> I've got a module that builds an executable jar file using the Maven
> Assembly Plugin. I'm trying to setup an integration test (in the same
> module) that runs this executable jar file as a separate process and
> interacts with it. To fire up the executable jar file, my integration test
> requires the path to the executable jar file.
>
> I'm trying to achieve this by passing a property to the integration-test
> via system properties. This makes me feel really really dirty though and it
> has issues: although the test runs on the CLI it does not in any IDE
> without requiring further configuration (i.e. the property has to be
> manually added to a run configuration).
>
> After googling around a bit and reading the documentation there seems to
> be no other option for this scenario. In case I'm overlooking something, I
> wanted to ask here if there is a better way to start up this executable jar
> file or pass in the needed parameters to do so in the integration test?
>
>
Thanks for the feedback. I eventually used Stephen's suggestion (test
resource filtering) and it works like a champ for both the IDE and the CLI.

-- 
Best Regards,
-- Alex


Re: [Failsafe] How to properly conduct integration tests on executable jar files

2014-03-13 Thread Mirko Friedenhagen
Well with Netbeans you just add the following:


org.apache.maven.plugins
maven-surefire-plugin
${surefire.version}



${project.build.directory}/${project.artifactId}-${project.version}-shaded.jar




org.apache.maven.plugins
maven-failsafe-plugin
${surefire.version}


default-integration-test

integration-test






${project.build.directory}/${project.artifactId}-${project.version}-shaded.jar




and using the Java-task from Ant:

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.ExitStatusException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Java;
import org.apache.tools.ant.types.Commandline;

public class ShadedIT {
@Test
   public void testShaded() throws Exception {
Java java = new Java();
java.setProject(new Project());
java.setFailonerror(true);
java.setFork(true);
java.setJar(shadedJar);
Commandline.Argument arg = java.createArg();
arg.setFile(csvFile);
java.execute();
}
}

This will be executed by failsafe from the CLI and you may run the
class from Netbeans without any special settings.
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/


On Thu, Mar 13, 2014 at 10:50 AM, Adrien Rivard  wrote:
> If you are using Eclipse you could also pass the system property directly
> to the JRE. ( Windows/Preferences/installed JRE/ edit /default VM arguments)
> It require less work than putting it in all run configuration, but all your
> process will have it.
>
>
>
> On Thu, Mar 13, 2014 at 8:56 AM, Stephen Connolly <
> stephen.alan.conno...@gmail.com> wrote:
>
>> You could use test resource filtering to put the path into a resource file
>> on the test classpath.
>>
>> That way the IDE will pick up the same path.
>>
>> On Thursday, 13 March 2014, Alex Karasulu  wrote:
>>
>> > Hello,
>> >
>> > I've got a module that builds an executable jar file using the Maven
>> > Assembly Plugin. I'm trying to setup an integration test (in the same
>> > module) that runs this executable jar file as a separate process and
>> > interacts with it. To fire up the executable jar file, my integration
>> test
>> > requires the path to the executable jar file.
>> >
>> > I'm trying to achieve this by passing a property to the integration-test
>> > via system properties. This makes me feel really really dirty though and
>> it
>> > has issues: although the test runs on the CLI it does not in any IDE
>> > without requiring further configuration (i.e. the property has to be
>> > manually added to a run configuration).
>> >
>> > After googling around a bit and reading the documentation there seems to
>> be
>> > no other option for this scenario. In case I'm overlooking something, I
>> > wanted to ask here if there is a better way to start up this executable
>> jar
>> > file or pass in the needed parameters to do so in the integration test?
>> >
>> > --
>> > Best Regards,
>> > -- Alex
>> >
>>
>>
>> --
>> Sent from my phone
>>
>
>
>
> --
> Adrien Rivard

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: [Failsafe] How to properly conduct integration tests on executable jar files

2014-03-13 Thread Adrien Rivard
If you are using Eclipse you could also pass the system property directly
to the JRE. ( Windows/Preferences/installed JRE/ edit /default VM arguments)
It require less work than putting it in all run configuration, but all your
process will have it.



On Thu, Mar 13, 2014 at 8:56 AM, Stephen Connolly <
stephen.alan.conno...@gmail.com> wrote:

> You could use test resource filtering to put the path into a resource file
> on the test classpath.
>
> That way the IDE will pick up the same path.
>
> On Thursday, 13 March 2014, Alex Karasulu  wrote:
>
> > Hello,
> >
> > I've got a module that builds an executable jar file using the Maven
> > Assembly Plugin. I'm trying to setup an integration test (in the same
> > module) that runs this executable jar file as a separate process and
> > interacts with it. To fire up the executable jar file, my integration
> test
> > requires the path to the executable jar file.
> >
> > I'm trying to achieve this by passing a property to the integration-test
> > via system properties. This makes me feel really really dirty though and
> it
> > has issues: although the test runs on the CLI it does not in any IDE
> > without requiring further configuration (i.e. the property has to be
> > manually added to a run configuration).
> >
> > After googling around a bit and reading the documentation there seems to
> be
> > no other option for this scenario. In case I'm overlooking something, I
> > wanted to ask here if there is a better way to start up this executable
> jar
> > file or pass in the needed parameters to do so in the integration test?
> >
> > --
> > Best Regards,
> > -- Alex
> >
>
>
> --
> Sent from my phone
>



-- 
Adrien Rivard


Re: [Failsafe] How to properly conduct integration tests on executable jar files

2014-03-13 Thread Stephen Connolly
You could use test resource filtering to put the path into a resource file
on the test classpath.

That way the IDE will pick up the same path.

On Thursday, 13 March 2014, Alex Karasulu  wrote:

> Hello,
>
> I've got a module that builds an executable jar file using the Maven
> Assembly Plugin. I'm trying to setup an integration test (in the same
> module) that runs this executable jar file as a separate process and
> interacts with it. To fire up the executable jar file, my integration test
> requires the path to the executable jar file.
>
> I'm trying to achieve this by passing a property to the integration-test
> via system properties. This makes me feel really really dirty though and it
> has issues: although the test runs on the CLI it does not in any IDE
> without requiring further configuration (i.e. the property has to be
> manually added to a run configuration).
>
> After googling around a bit and reading the documentation there seems to be
> no other option for this scenario. In case I'm overlooking something, I
> wanted to ask here if there is a better way to start up this executable jar
> file or pass in the needed parameters to do so in the integration test?
>
> --
> Best Regards,
> -- Alex
>


-- 
Sent from my phone


[Failsafe] How to properly conduct integration tests on executable jar files

2014-03-12 Thread Alex Karasulu
Hello,

I've got a module that builds an executable jar file using the Maven
Assembly Plugin. I'm trying to setup an integration test (in the same
module) that runs this executable jar file as a separate process and
interacts with it. To fire up the executable jar file, my integration test
requires the path to the executable jar file.

I'm trying to achieve this by passing a property to the integration-test
via system properties. This makes me feel really really dirty though and it
has issues: although the test runs on the CLI it does not in any IDE
without requiring further configuration (i.e. the property has to be
manually added to a run configuration).

After googling around a bit and reading the documentation there seems to be
no other option for this scenario. In case I'm overlooking something, I
wanted to ask here if there is a better way to start up this executable jar
file or pass in the needed parameters to do so in the integration test?

-- 
Best Regards,
-- Alex


Re: Create Windows executable JAR

2013-02-07 Thread David Karr
If you're just trying to build a windows executable, I've been able to use
"launch4j" to make this happen. It works perfectly fine for what I've used
it for.


On Thu, Feb 7, 2013 at 9:34 AM, Jeff MAURY  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
>


Re: Create Windows executable JAR

2013-02-07 Thread hanasaki
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  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 
>> 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: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Create Windows executable JAR

2013-02-07 Thread Eric Kolotyluk
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  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 
> 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
> >
>


Re: Create Windows executable JAR

2013-02-07 Thread Curtis Rueden
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  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
>


Create Windows executable JAR

2013-02-07 Thread Jeff MAURY
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


Re: Executable Jar Creation Help

2010-03-02 Thread Brian Fox
http://www.sonatype.com/people/2009/08/how-to-make-an-executable-jar-in-maven/

On Tue, Mar 2, 2010 at 5:19 PM, Sufie Seifoddini  wrote:
> Hello,
>
> In order to create an exectuable jar file, I have added the below to my pom.  
> This does package all the dependencies in the jar but does not put the main 
> class or class path in the manifest file.  Please advise.  Do I need to hand 
> create and add the manifest?  I am using maven 2
>
> 
>         
>            
>               maven-compiler-plugin
>               
>                  ${jdk.version}
>                  ${jdk.version}
>                  UTF-8
>                  true
>                  false
>               
>            
>
>            
>               org.apache.maven.plugins
>               maven-jar-plugin
>               
>                  
>                     
>                        true
>                        path.to.main
>                     
>                  
>                
>            
>            
>               org.apache.maven.plugins
>               maven-assembly-plugin
>               
>                  
>                     jar-with-dependencies
>                  
>               
>
>              
>                  
>                    make-my-jar-with-dependencies
>                    package
>                    
>                       single
>                  
>                 
>              
>            
>         
>      

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Executable Jar Creation Help

2010-03-02 Thread Sufie Seifoddini
Hello,

In order to create an exectuable jar file, I have added the below to my pom.  
This does package all the dependencies in the jar but does not put the main 
class or class path in the manifest file.  Please advise.  Do I need to hand 
create and add the manifest?  I am using maven 2


 

   maven-compiler-plugin
   
  ${jdk.version}
  ${jdk.version}
  UTF-8
  true
  false


 

   org.apache.maven.plugins
   maven-jar-plugin

  
 
true
path.to.main
 
   



   org.apache.maven.plugins
   maven-assembly-plugin
   
  
 jar-with-dependencies
  
   

  
  
make-my-jar-with-dependencies
package

   single
  
 
  

 
  

Re: HOWTO: Maven project for Pivot with executable jar

2009-12-22 Thread Greg Brown
I'm no Maven expert myself, but putting the WTKX files in the resources 
directory seems like a good idea. Cross-posting to the Maven user list in case 
anyone has any suggestions!
Greg

On Dec 22, 2009, at 8:02 PM, Michael Bushe wrote:

> I posted this HOWTO on developing with Pivot using Maven and making an 
> executable jar.  Comments welcome, especially with respect to a common 
> project structure.  Should wtkx files be under src/main/resources?
> 
> http://michaelbushe.wordpress.com/2009/12/22/creating-an-executable-apache-pivot-app-using-maven/
> 
> Michael Bushe
> Software Architect/Developer
> mich...@bushe.com
> www.bushe.com



Re: Maven build assembly manifest executable jar not working

2008-07-02 Thread David Brown
12 CDT 2008 com/fds/ar/
> > 0 Wed Jul 02 13:30:12 CDT 2008 com/fds/ar/apps/
> > 0 Wed Jul 02 13:30:12 CDT 2008 com/fds/ar/apps/util/
> > 0 Wed Jul 02 13:30:12 CDT 2008 com/fds/ar/apps/util/fileupload/
> > 0 Wed Jul 02 13:30:12 CDT 2008 
> > com/fds/ar/apps/util/fileupload/XSFileUploadApp/
> >   622 Wed Jul 02 13:30:12 CDT 2008 
> > com/fds/ar/apps/util/fileupload/XSFileUploadApp/XSFileUploadApp$1.class
> >  2250 Wed Jul 02 13:30:12 CDT 2008 
> > com/fds/ar/apps/util/fileupload/XSFileUploadApp/XSFileUploadApp$MultipartFileUploadFrame$1.class
> >  5307 Wed Jul 02 13:30:12 CDT 2008 
> > com/fds/ar/apps/util/fileupload/XSFileUploadApp/XSFileUploadApp$MultipartFileUploadFrame$2.class
> >  5633 Wed Jul 02 13:30:12 CDT 2008 
> > com/fds/ar/apps/util/fileupload/XSFileUploadApp/XSFileUploadApp$MultipartFileUploadFrame.class
> >  1690 Wed Jul 02 13:30:12 CDT 2008 
> > com/fds/ar/apps/util/fileupload/XSFileUploadApp/XSFileUploadApp.class
> > 0 Wed Jul 02 13:30:16 CDT 2008 META-INF/maven/
> > 0 Wed Jul 02 13:30:16 CDT 2008 
> > META-INF/maven/com.fds.ar.apps.util.fileupload/
> > 0 Wed Jul 02 13:30:16 CDT 2008 
> > META-INF/maven/com.fds.ar.apps.util.fileupload/XSFileUploadApp/
> >  2123 Wed Jul 02 13:24:50 CDT 2008 
> > META-INF/maven/com.fds.ar.apps.util.fileupload/XSFileUploadApp/pom.xml
> >   134 Wed Jul 02 13:30:16 CDT 2008 
> > META-INF/maven/com.fds.ar.apps.util.fileupload/XSFileUploadApp/pom.properties
> >
> > C:\Documents and Settings\dwbrown\My 
> > Documents\dev\java\XSFileUploadApp\target>java
> -jar XSFileUploadApp-1.0.jar
> > Exception in thread "main" java.lang.NoClassDefFoundError:  
> > com/fds/ar/apps/util/fileupload/XSFileUploadApp
> > Caused by: java.lang.ClassNotFoundException:  
> > com.fds.ar.apps.util.fileupload.XSFileUploadApp
> >at java.net.URLClassLoader$1.run(Unknown Source)
> >at java.security.AccessController.doPrivileged(Native Method)
> >at java.net.URLClassLoader.findClass(Unknown Source)
> >at java.lang.ClassLoader.loadClass(Unknown Source)
> >at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> >at java.lang.ClassLoader.loadClass(Unknown Source)
> >at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> >
> > C:\Documents and Settings\dwbrown\My 
> > Documents\dev\java\XSFileUploadApp\target>type
> ..\src\main\java\com\fds\ar\apps\util\fileupload\XSFileUploadApp\M
> > ANIFEST.MF
> > Manifest-Version: 1.0
> > Archiver-Version: Plexus Archiver
> > Created-By: Apache Maven
> > Built-By: dwbrown
> > Package: com.fds.ar.apps.util.fileupload.XSFileUploadApp
> > Build-Jdk:  1.6.0-b09
> > Extension-Name: XSFileUploadApp
> > Specification-Vendor: FA
> > Implementation-Vendor: FA
> > Implementation-Title: XSFileUploadApp
> > Implementation-Version: 1.0-SNAPSHOT
> > Main-Class:  com.fds.ar.apps.util.fileupload.XSFileUploadApp
> > Class-Path: XSFileUploadApp-1.0.jar
> > mode: development
> > url: http://www.flooddata.com
> > *
> >
> >
> >
> > Wayne Fay wrote ..
> > > Are you sure that file exists in the jar? I've had zero problems
> > > constructing executable jars with Maven.
> > >
> > > Unzip the jar and check things out. Adjust the manifest file and
> > > rezip, then test again, until you get it working. Then you know what
> > > you need to adjust in Maven.
> > >
> > > Wayne
> > >
> > > On 7/2/08, David Brown <[EMAIL PROTECTED]> wrote:
> > > > Hello Maven dev, gurus and users. I have a curious situation where I 
> > > > want
> to
> > > make my Swing App into an executable jar. I went to the Maven guides site:
> http://maven.apache.org/guides/mini/guide-manifest.html
> > > and I used the build snippet displayed below. I inserted the snippet and 
> > > edited
> > > the MANIFEST.MF as displayed below. Lo-and-behold: it returns the usual 
> > > (follows)
> > > NoClassDefFoundError when I try to exectue. I have successfully hand built
> executable
> > > jars in the past but I would like to have Maven doing this job. The 
> > > particulars
> > > follow. TIA and please advise, David.
> > > >
> > > > OS: Ubuntu 2.6.24-17-generic GNU/LINUX
> > > > Arch: i686 SMP
> > > > Error condition:
> > > >
> > > > java -jar XSFileUploadApp-1.0.jar
> &g

Re: Maven build assembly manifest executable jar not working

2008-07-02 Thread Wayne Fay
gt;at java.security.AccessController.doPrivileged(Native Method)
>at java.net.URLClassLoader.findClass(Unknown Source)
>at java.lang.ClassLoader.loadClass(Unknown Source)
>at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>at java.lang.ClassLoader.loadClass(Unknown Source)
>at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>
> C:\Documents and Settings\dwbrown\My 
> Documents\dev\java\XSFileUploadApp\target>type 
> ..\src\main\java\com\fds\ar\apps\util\fileupload\XSFileUploadApp\M
> ANIFEST.MF
> Manifest-Version: 1.0
> Archiver-Version: Plexus Archiver
> Created-By: Apache Maven
> Built-By: dwbrown
> Package: com.fds.ar.apps.util.fileupload.XSFileUploadApp
> Build-Jdk:  1.6.0-b09
> Extension-Name: XSFileUploadApp
> Specification-Vendor: FA
> Implementation-Vendor: FA
> Implementation-Title: XSFileUploadApp
> Implementation-Version: 1.0-SNAPSHOT
> Main-Class:  com.fds.ar.apps.util.fileupload.XSFileUploadApp
> Class-Path: XSFileUploadApp-1.0.jar
> mode: development
> url: http://www.flooddata.com
> *
>
>
>
> Wayne Fay wrote ..
> > Are you sure that file exists in the jar? I've had zero problems
> > constructing executable jars with Maven.
> >
> > Unzip the jar and check things out. Adjust the manifest file and
> > rezip, then test again, until you get it working. Then you know what
> > you need to adjust in Maven.
> >
> > Wayne
> >
> > On 7/2/08, David Brown <[EMAIL PROTECTED]> wrote:
> > > Hello Maven dev, gurus and users. I have a curious situation where I want 
> > > to
> > make my Swing App into an executable jar. I went to the Maven guides site: 
> > http://maven.apache.org/guides/mini/guide-manifest.html
> > and I used the build snippet displayed below. I inserted the snippet and 
> > edited
> > the MANIFEST.MF as displayed below. Lo-and-behold: it returns the usual 
> > (follows)
> > NoClassDefFoundError when I try to exectue. I have successfully hand built 
> > executable
> > jars in the past but I would like to have Maven doing this job. The 
> > particulars
> > follow. TIA and please advise, David.
> > >
> > > OS: Ubuntu 2.6.24-17-generic GNU/LINUX
> > > Arch: i686 SMP
> > > Error condition:
> > >
> > > java -jar XSFileUploadApp-1.0.jar
> > > Exception in thread "main" java.lang.NoClassDefFoundError:  
> > > com/fds/ar/apps/util/fileupload/XSFileUploadApp
> > > Caused by: java.lang.ClassNotFoundException:  
> > > com.fds.ar.apps.util.fileupload.XSFileUploadApp
> > >
> > > MANIFEST.MF:
> > >
> > > Manifest-Version: 1.0
> > > Archiver-Version: Plexus Archiver
> > > Created-By: Apache Maven
> > > Built-By: dwbrown
> > > Package: com.fds.ar.apps.util.fileupload.XSFileUploadApp
> > > Build-Jdk:  1.6.0-b09
> > > Extension-Name: XSFileUploadApp
> > > Specification-Vendor: FA
> > > Implementation-Vendor: FA
> > > Implementation-Title: XSFileUploadApp
> > > Implementation-Version: 1.0-SNAPSHOT
> > > Main-Class:  com.fds.ar.apps.util.fileupload.XSFileUploadApp
> > > mode: development
> > > url: http://www.flooddata.com
> > >
> > >
> > > Yet some, not wise, go to the other side of the globe, to barbarous and 
> > > unhealthy
> > regions, and devote ten or twenty years, in that they may live,-that is, 
> > keep comfortably
> > warm,- and die in New England at last.
> > >
> > > Henry David Thoreau - Walden - 1845
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> Yet some, not wise, go to the other side of the globe, to barbarous and 
> unhealthy regions, and devote ten or twenty years, in that they may 
> live,-that is, keep comfortably warm,- and die in New England at last.
>
> Henry David Thoreau - Walden - 1845
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven build assembly manifest executable jar not working

2008-07-02 Thread David Brown
upload.XSFileUploadApp
Build-Jdk:  1.6.0-b09
Extension-Name: XSFileUploadApp
Specification-Vendor: FA
Implementation-Vendor: FA
Implementation-Title: XSFileUploadApp
Implementation-Version: 1.0-SNAPSHOT
Main-Class:  com.fds.ar.apps.util.fileupload.XSFileUploadApp
Class-Path: XSFileUploadApp-1.0.jar
mode: development
url: http://www.flooddata.com
*



Wayne Fay wrote ..
> Are you sure that file exists in the jar? I've had zero problems
> constructing executable jars with Maven.
> 
> Unzip the jar and check things out. Adjust the manifest file and
> rezip, then test again, until you get it working. Then you know what
> you need to adjust in Maven.
> 
> Wayne
> 
> On 7/2/08, David Brown <[EMAIL PROTECTED]> wrote:
> > Hello Maven dev, gurus and users. I have a curious situation where I want to
> make my Swing App into an executable jar. I went to the Maven guides site: 
> http://maven.apache.org/guides/mini/guide-manifest.html
> and I used the build snippet displayed below. I inserted the snippet and 
> edited
> the MANIFEST.MF as displayed below. Lo-and-behold: it returns the usual 
> (follows)
> NoClassDefFoundError when I try to exectue. I have successfully hand built 
> executable
> jars in the past but I would like to have Maven doing this job. The 
> particulars
> follow. TIA and please advise, David.
> >
> > OS: Ubuntu 2.6.24-17-generic GNU/LINUX
> > Arch: i686 SMP
> > Error condition:
> >
> > java -jar XSFileUploadApp-1.0.jar
> > Exception in thread "main" java.lang.NoClassDefFoundError:  
> > com/fds/ar/apps/util/fileupload/XSFileUploadApp
> > Caused by: java.lang.ClassNotFoundException:  
> > com.fds.ar.apps.util.fileupload.XSFileUploadApp
> >
> > MANIFEST.MF:
> >
> > Manifest-Version: 1.0
> > Archiver-Version: Plexus Archiver
> > Created-By: Apache Maven
> > Built-By: dwbrown
> > Package: com.fds.ar.apps.util.fileupload.XSFileUploadApp
> > Build-Jdk:  1.6.0-b09
> > Extension-Name: XSFileUploadApp
> > Specification-Vendor: FA
> > Implementation-Vendor: FA
> > Implementation-Title: XSFileUploadApp
> > Implementation-Version: 1.0-SNAPSHOT
> > Main-Class:  com.fds.ar.apps.util.fileupload.XSFileUploadApp
> > mode: development
> > url: http://www.flooddata.com
> >
> >
> > Yet some, not wise, go to the other side of the globe, to barbarous and 
> > unhealthy
> regions, and devote ten or twenty years, in that they may live,-that is, keep 
> comfortably
> warm,- and die in New England at last.
> >
> > Henry David Thoreau - Walden - 1845
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
Yet some, not wise, go to the other side of the globe, to barbarous and 
unhealthy regions, and devote ten or twenty years, in that they may live,-that 
is, keep comfortably warm,- and die in New England at last. 

Henry David Thoreau - Walden - 1845


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven build assembly manifest executable jar not working

2008-07-02 Thread Wayne Fay
Are you sure that file exists in the jar? I've had zero problems
constructing executable jars with Maven.

Unzip the jar and check things out. Adjust the manifest file and
rezip, then test again, until you get it working. Then you know what
you need to adjust in Maven.

Wayne

On 7/2/08, David Brown <[EMAIL PROTECTED]> wrote:
> Hello Maven dev, gurus and users. I have a curious situation where I want to 
> make my Swing App into an executable jar. I went to the Maven guides site: 
> http://maven.apache.org/guides/mini/guide-manifest.html and I used the build 
> snippet displayed below. I inserted the snippet and edited the MANIFEST.MF as 
> displayed below. Lo-and-behold: it returns the usual (follows) 
> NoClassDefFoundError when I try to exectue. I have successfully hand built 
> executable jars in the past but I would like to have Maven doing this job. 
> The particulars follow. TIA and please advise, David.
>
> OS: Ubuntu 2.6.24-17-generic GNU/LINUX
> Arch: i686 SMP
> Error condition:
>
> java -jar XSFileUploadApp-1.0.jar
> Exception in thread "main" java.lang.NoClassDefFoundError:  
> com/fds/ar/apps/util/fileupload/XSFileUploadApp
> Caused by: java.lang.ClassNotFoundException:  
> com.fds.ar.apps.util.fileupload.XSFileUploadApp
>
> MANIFEST.MF:
>
> Manifest-Version: 1.0
> Archiver-Version: Plexus Archiver
> Created-By: Apache Maven
> Built-By: dwbrown
> Package: com.fds.ar.apps.util.fileupload.XSFileUploadApp
> Build-Jdk:  1.6.0-b09
> Extension-Name: XSFileUploadApp
> Specification-Vendor: FA
> Implementation-Vendor: FA
> Implementation-Title: XSFileUploadApp
> Implementation-Version: 1.0-SNAPSHOT
> Main-Class:  com.fds.ar.apps.util.fileupload.XSFileUploadApp
> mode: development
> url: http://www.flooddata.com
>
>
> Yet some, not wise, go to the other side of the globe, to barbarous and 
> unhealthy regions, and devote ten or twenty years, in that they may 
> live,-that is, keep comfortably warm,- and die in New England at last.
>
> Henry David Thoreau - Walden - 1845
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Maven build assembly manifest executable jar not working

2008-07-02 Thread David Brown
Hello Maven dev, gurus and users. I have a curious situation where I want to 
make my Swing App into an executable jar. I went to the Maven guides site: 
http://maven.apache.org/guides/mini/guide-manifest.html and I used the build 
snippet displayed below. I inserted the snippet and edited the MANIFEST.MF as 
displayed below. Lo-and-behold: it returns the usual (follows) 
NoClassDefFoundError when I try to exectue. I have successfully hand built 
executable jars in the past but I would like to have Maven doing this job. The 
particulars follow. TIA and please advise, David.

OS: Ubuntu 2.6.24-17-generic GNU/LINUX
Arch: i686 SMP
Error condition:

java -jar XSFileUploadApp-1.0.jar
Exception in thread "main" java.lang.NoClassDefFoundError:  
com/fds/ar/apps/util/fileupload/XSFileUploadApp
Caused by: java.lang.ClassNotFoundException:  
com.fds.ar.apps.util.fileupload.XSFileUploadApp

MANIFEST.MF:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: dwbrown
Package: com.fds.ar.apps.util.fileupload.XSFileUploadApp
Build-Jdk:  1.6.0-b09
Extension-Name: XSFileUploadApp
Specification-Vendor: FA
Implementation-Vendor: FA
Implementation-Title: XSFileUploadApp
Implementation-Version: 1.0-SNAPSHOT
Main-Class:  com.fds.ar.apps.util.fileupload.XSFileUploadApp
mode: development
url: http://www.flooddata.com


Yet some, not wise, go to the other side of the globe, to barbarous and 
unhealthy regions, and devote ten or twenty years, in that they may live,-that 
is, keep comfortably warm,- and die in New England at last. 

Henry David Thoreau - Walden - 1845

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Executable jar with extra directory for configuration files [ASGI]

2008-03-14 Thread Naftulin, Henry BGI SF
Figured it out: you can specify manifest entry and configure class path
at the same time. The result will be additive:


org.apache.maven.plugins
maven-jar-plugin



config/ 


true
lib/
 
com.barclaysglobal.asgintl.cmdlnfrmwrk.CommandProcessor




Produces
Class-Path: config/ lib/commons-lang-2.3.jar lib/log4j-1.2. Etc.
which is exaclty what I need.

> _ 
> From: Naftulin, Henry BGI SF  
> Sent: Friday, March 14, 2008 12:10 PM
> To:   'users@maven.apache.org'
> Subject:  Executable jar with extra directory for configuration
> files [ASGI]
> 
> I have a rather simple, common problems, that probably was solved
> before. I looked at both jar and assembly plug-in and did not find the
> answer.
> I have to produce an executable jar with dependencies and with
> configuration files that I'd like to be stored outside of the jar,
> like the following:
> exec.jar 
> lib/dependecy.jar 
> config/configfile.prop 
> I was able to produce the structure, but I can't seem to figure out
> how to add/modify manifest.mf file inside the exec.jar to have config
> directory (which is external to all jars since we need to be able to
> change the configuration) be added to the path. I have no problem
> listing all the dependencies in lib directory, but is there a way to
> prepend or append that extra config directory to manifest.mf? 
> Is there an option I can use in either jar plug-in or assembly
> plug-in? Is there any other plug-in that I can use for this purpose?
> Thank you, 
> Henry 
> 
 
-- 
 
This message and any attachments are confidential, proprietary, and may be 
privileged.  If this message was misdirected, Barclays Global Investors (BGI) 
does not waive any confidentiality or privilege.  If you are not the intended 
recipient, please notify us immediately and destroy the message without 
disclosing its contents to anyone.  Any distribution, use or copying of this 
e-mail or the information it contains by other than an intended recipient is 
unauthorized.  The views and opinions expressed in this e-mail message are the 
author's own and may not reflect the views and opinions of BGI, unless the 
author is authorized by BGI to express such views or opinions on its behalf.  
All email sent to or from this address is subject to electronic storage and 
review by BGI.  Although BGI operates anti-virus programs, it does not accept 
responsibility for any damage whatsoever caused by viruses being passed.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Executable jar with extra directory for configuration files [ASGI]

2008-03-14 Thread Naftulin, Henry BGI SF
I have a rather simple, common problems, that probably was solved
before. I looked at both jar and assembly plug-in and did not find the
answer.
I have to produce an executable jar with dependencies and with
configuration files that I'd like to be stored outside of the jar, like
the following:
exec.jar 
lib/dependecy.jar 
config/configfile.prop 
I was able to produce the structure, but I can't seem to figure out how
to add/modify manifest.mf file inside the exec.jar to have config
directory (which is external to all jars since we need to be able to
change the configuration) be added to the path. I have no problem
listing all the dependencies in lib directory, but is there a way to
prepend or append that extra config directory to manifest.mf? 
Is there an option I can use in either jar plug-in or assembly plug-in?
Is there any other plug-in that I can use for this purpose?
Thank you, 
Henry 
 
-- 
 
This message and any attachments are confidential, proprietary, and may be 
privileged.  If this message was misdirected, Barclays Global Investors (BGI) 
does not waive any confidentiality or privilege.  If you are not the intended 
recipient, please notify us immediately and destroy the message without 
disclosing its contents to anyone.  Any distribution, use or copying of this 
e-mail or the information it contains by other than an intended recipient is 
unauthorized.  The views and opinions expressed in this e-mail message are the 
author's own and may not reflect the views and opinions of BGI, unless the 
author is authorized by BGI to express such views or opinions on its behalf.  
All email sent to or from this address is subject to electronic storage and 
review by BGI.  Although BGI operates anti-virus programs, it does not accept 
responsibility for any damage whatsoever caused by viruses being passed.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Does it make sense to have a shared library deployed in an executable jar file assembly?

2007-11-08 Thread Ed
Wayne,

Thank you. This is very helpful.

Ed

On Nov 7, 2007 10:29 AM, Wayne Fay <[EMAIL PROTECTED]> wrote:

> You may find some useful info here:
> http://java.freehep.org/freehep-nar-plugin/
>
> Wayne
>
> On 11/7/07, Ed <[EMAIL PROTECTED]> wrote:
> > This may not be a maven question, however I'm wondering someone on this
> list
> > can help me.
> >
> > I'd like to deploy an executable jar file for use by our group, but
> avoid
> > having them install the dependent shared library on their linux box.
> >
> > I've created the assembly and placed the shared library in the correct
> > classpath. I've included the library in it's classpath in the resources
> > directory. The relevant contents of the jar file looks like this:
> >
> >  -rw-r--r--  2281   7-Nov-2007  09:23:06
> > org/subtid/socket/UnixSocketImpl.class
> >  -rw-r--r--  1150   7-Nov-2007  09:23:06
> > orgs/subtid/socket/UnixServerSocket.class
> >  -rw-r--r--  1563   7-Nov-2007  09:23:06
> > org/subtid/socket/UnixSocket.class
> >  -rw-r--r--  9676   7-Nov-2007  09:23:06
> > org/subtid/socket/libjunixsocket.so
> >  -rw-r--r--  1238   7-Nov-2007  09:23:06
> > org/subtid/socket/UnixSocketInputStream.class
> >  -rw-r--r--  1275   7-Nov-2007  09:23:06
> > org/subtid/socket/UnixSocketOutputStream.class
> >
> > It seems to me that this should work, but I get:
> > libname: libjunixsocket.so
> > libpath:
> file:/storage/workspace/stbcontrolinterface-TRUNK/target/subtid-
> >
> stbcontrolinterface-parent-1.0-SNAPSHOT-jar-with-dependencies.jar!/org/subtid/socket/libjunixsocket.so
> > Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError:
> > Expecting an absolute path of the library:
> > file:/storage/workspace/stbcontrolinterface-TRUNK/target/subtid-
> >
> stbcontrolinterface-parent-1.0-SNAPSHOT-jar-with-dependencies.jar!/org/subtid/socket/libjunixsocket.so
> >
> >
> > Any help is appreciated.
> >
> > --
> > Ed
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Ed


Re: Does it make sense to have a shared library deployed in an executable jar file assembly?

2007-11-07 Thread Wayne Fay
You may find some useful info here:
http://java.freehep.org/freehep-nar-plugin/

Wayne

On 11/7/07, Ed <[EMAIL PROTECTED]> wrote:
> This may not be a maven question, however I'm wondering someone on this list
> can help me.
>
> I'd like to deploy an executable jar file for use by our group, but avoid
> having them install the dependent shared library on their linux box.
>
> I've created the assembly and placed the shared library in the correct
> classpath. I've included the library in it's classpath in the resources
> directory. The relevant contents of the jar file looks like this:
>
>  -rw-r--r--  2281   7-Nov-2007  09:23:06
> org/subtid/socket/UnixSocketImpl.class
>  -rw-r--r--  1150   7-Nov-2007  09:23:06
> orgs/subtid/socket/UnixServerSocket.class
>  -rw-r--r--  1563   7-Nov-2007  09:23:06
> org/subtid/socket/UnixSocket.class
>  -rw-r--r--  9676   7-Nov-2007  09:23:06
> org/subtid/socket/libjunixsocket.so
>  -rw-r--r--  1238   7-Nov-2007  09:23:06
> org/subtid/socket/UnixSocketInputStream.class
>  -rw-r--r--  1275   7-Nov-2007  09:23:06
> org/subtid/socket/UnixSocketOutputStream.class
>
> It seems to me that this should work, but I get:
> libname: libjunixsocket.so
> libpath: file:/storage/workspace/stbcontrolinterface-TRUNK/target/subtid-
> stbcontrolinterface-parent-1.0-SNAPSHOT-jar-with-dependencies.jar!/org/subtid/socket/libjunixsocket.so
> Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError:
> Expecting an absolute path of the library:
> file:/storage/workspace/stbcontrolinterface-TRUNK/target/subtid-
> stbcontrolinterface-parent-1.0-SNAPSHOT-jar-with-dependencies.jar!/org/subtid/socket/libjunixsocket.so
>
>
> Any help is appreciated.
>
> --
> Ed
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Does it make sense to have a shared library deployed in an executable jar file assembly?

2007-11-07 Thread Ed
This may not be a maven question, however I'm wondering someone on this list
can help me.

I'd like to deploy an executable jar file for use by our group, but avoid
having them install the dependent shared library on their linux box.

I've created the assembly and placed the shared library in the correct
classpath. I've included the library in it's classpath in the resources
directory. The relevant contents of the jar file looks like this:

 -rw-r--r--  2281   7-Nov-2007  09:23:06
org/subtid/socket/UnixSocketImpl.class
  -rw-r--r--  1150   7-Nov-2007  09:23:06
orgs/subtid/socket/UnixServerSocket.class
  -rw-r--r--  1563   7-Nov-2007  09:23:06
org/subtid/socket/UnixSocket.class
  -rw-r--r--  9676   7-Nov-2007  09:23:06
org/subtid/socket/libjunixsocket.so
  -rw-r--r--  1238   7-Nov-2007  09:23:06
org/subtid/socket/UnixSocketInputStream.class
  -rw-r--r--  1275   7-Nov-2007  09:23:06
org/subtid/socket/UnixSocketOutputStream.class

It seems to me that this should work, but I get:
libname: libjunixsocket.so
libpath: file:/storage/workspace/stbcontrolinterface-TRUNK/target/subtid-
stbcontrolinterface-parent-1.0-SNAPSHOT-jar-with-dependencies.jar!/org/subtid/socket/libjunixsocket.so
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError:
Expecting an absolute path of the library:
file:/storage/workspace/stbcontrolinterface-TRUNK/target/subtid-
stbcontrolinterface-parent-1.0-SNAPSHOT-jar-with-dependencies.jar!/org/subtid/socket/libjunixsocket.so


Any help is appreciated.

-- 
Ed


Re: shared library in executable jar file

2007-11-07 Thread Heinrich Nirschl
On Nov 6, 2007 11:17 PM, Ed <[EMAIL PROTECTED]> wrote:
> Where do I configure to have a shared library file included correctly in an
> executable assembly file?
> I've been looking in the assembly plugin area with no luck.
>
> When I try to run the executable jar file I get an
> UnsatisfiedLinkError:Expecting an absolute path of the library:
>
> I'm assembling an executable jar file and I need a shared library to be
> assembled in the file and effectively in the LD_LIBRARY_PATH.
>
> When I run
> mvn package assembly:assembly
>
> I'd like the libmylib.so file to be in the executable assembly and in the
> load path.
>
> In eclipse, I simply put the file in the
> mylib/src/main/java/resources/org/mylib/socket directory and maven places
> the file in the
> mylib/target/classes/org/mylib/socket/ directory when I run
> mvn compile
>
> I can the execute the file.
>
> When I try to run the executable jar file I get an
> UnsatisfiedLinkError:Expecting an absolute path of the library:

I don't think that what you want is possible. The native library has
to be loaded by the OS and therefore cannot be placed inside the jar.

- Henry

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



shared library in executable jar file

2007-11-06 Thread Ed
Where do I configure to have a shared library file included correctly in an
executable assembly file?
I've been looking in the assembly plugin area with no luck.

When I try to run the executable jar file I get an
UnsatisfiedLinkError:Expecting an absolute path of the library:

I'm assembling an executable jar file and I need a shared library to be
assembled in the file and effectively in the LD_LIBRARY_PATH.

When I run
mvn package assembly:assembly

I'd like the libmylib.so file to be in the executable assembly and in the
load path.

In eclipse, I simply put the file in the
mylib/src/main/java/resources/org/mylib/socket directory and maven places
the file in the
mylib/target/classes/org/mylib/socket/ directory when I run
mvn compile

I can the execute the file.

When I try to run the executable jar file I get an
UnsatisfiedLinkError:Expecting an absolute path of the library:

Thanks in advance,

-- 
Ed


Re: Executable jar : lib inclusion

2007-08-01 Thread Jo Vandermeeren
Hi Jean-Philippe,

Of course the dependencies are not packaged with your jar.
What do you expect? An executable jar is simply a jar with a Main-Class
property in its manifest.
In fact, a jar can not include other jars, unless you supply a custom jar
classloader to actually load the resources inside those jars.

If you want to include jar files in a jar file, there is a workaround
though.. Classworlds provides a custom classloader (which is used in
maven1's uberjar).

If you just want all classes of your dependencies, along with your own code
in a single jar, without providing a custom classloader.. You have to unpack
all dependencies and create a new jar file that wraps them all up.
The maven-assembly-plugin can do this for you, cf.
http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies

Cheers
Jo

On 8/1/07, CARUANA JEAN-PHILIPPE <[EMAIL PROTECTED]>
wrote:
>
> Hi,
>
> I try to write a small swing client to test our EJB. The Ejb is deployed
> on a Weblogic 8.1 server.
> I made an executable jar file (thanks to
> <http://maven.apache.org/plugins/maven-jar-plugin/examples/executable-ja
> r.html>) so when I run java -jar myJar.jar, it works fine. But the
> generated jar file is very lightweight and doesn't include needed jar
> (commons-lang, weblogic-8.1.jar). How can I do that ?
>
> The generated manifest file tells that the classpath is easy (as if all
> jar files were in the current directory, witch is not true : all jar are
> in the repository)
>
> --
> Jean-Philippe CARUANA
> site http://perso.enstimac.fr/~caruana/
> blog http://demostene.tumblr.com/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Executable jar : lib inclusion

2007-08-01 Thread CARUANA JEAN-PHILIPPE
Hi,

I try to write a small swing client to test our EJB. The Ejb is deployed
on a Weblogic 8.1 server.
I made an executable jar file (thanks to
<http://maven.apache.org/plugins/maven-jar-plugin/examples/executable-ja
r.html>) so when I run java -jar myJar.jar, it works fine. But the
generated jar file is very lightweight and doesn't include needed jar
(commons-lang, weblogic-8.1.jar). How can I do that ?

The generated manifest file tells that the classpath is easy (as if all
jar files were in the current directory, witch is not true : all jar are
in the repository)

-- 
Jean-Philippe CARUANA
site http://perso.enstimac.fr/~caruana/
blog http://demostene.tumblr.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to access a file that's inside an executable jar assembly, programatically

2007-04-27 Thread Ed Young

Thanks guys! That did the trick.

On 4/27/07, Wayne Fay <[EMAIL PROTECTED]> wrote:

John Casey sent this method a while ago that might be useful:

private File getFile( String resourceName )
{
   ClassLoader cloader = Thread.currentThread().getContextClassLoader();
   URL resource = cloader.getResource( resourceName );

   if ( resource == null )
   {
   throw new IllegalArgumentException( "Could not get resource: " +
resourceName );
   }

   return new File( resource.getPath() );
}

Wayne

On 4/27/07, Heinrich Nirschl <[EMAIL PROTECTED]> wrote:
> On 4/27/07, Ed Young <[EMAIL PROTECTED]> wrote:
> > I'd like to display the license information contained in a file that
> > has been assembled into an executable jar file assembly when the user
> > passes a command line parameter.
> >
> > I'm not sure if this is a maven issue, really, but the executable
> > assembly was created using the maven assembly plugin.
>
> Indeed not a maven issue. You have to load it as a resource. This link
> should help:
> 
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html#getResourceAsStream(java.lang.String)
>
> - Henry
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Ed

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to access a file that's inside an executable jar assembly, programatically

2007-04-27 Thread Wayne Fay

John Casey sent this method a while ago that might be useful:

private File getFile( String resourceName )
{
  ClassLoader cloader = Thread.currentThread().getContextClassLoader();
  URL resource = cloader.getResource( resourceName );

  if ( resource == null )
  {
  throw new IllegalArgumentException( "Could not get resource: " +
resourceName );
  }

  return new File( resource.getPath() );
}

Wayne

On 4/27/07, Heinrich Nirschl <[EMAIL PROTECTED]> wrote:

On 4/27/07, Ed Young <[EMAIL PROTECTED]> wrote:
> I'd like to display the license information contained in a file that
> has been assembled into an executable jar file assembly when the user
> passes a command line parameter.
>
> I'm not sure if this is a maven issue, really, but the executable
> assembly was created using the maven assembly plugin.

Indeed not a maven issue. You have to load it as a resource. This link
should help:
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html#getResourceAsStream(java.lang.String)

- Henry

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to access a file that's inside an executable jar assembly, programatically

2007-04-27 Thread Heinrich Nirschl

On 4/27/07, Ed Young <[EMAIL PROTECTED]> wrote:

I'd like to display the license information contained in a file that
has been assembled into an executable jar file assembly when the user
passes a command line parameter.

I'm not sure if this is a maven issue, really, but the executable
assembly was created using the maven assembly plugin.


Indeed not a maven issue. You have to load it as a resource. This link
should help:
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html#getResourceAsStream(java.lang.String)

- Henry

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to access a file that's inside an executable jar assembly, programatically

2007-04-27 Thread Ed Young

I'd like to display the license information contained in a file that
has been assembled into an executable jar file assembly when the user
passes a command line parameter.

I'm not sure if this is a maven issue, really, but the executable
assembly was created using the maven assembly plugin.

When viewing the jar file contents, the file appears in the top level
of the jar:
...
 -rw-r--r--   137  27-Apr-2007  10:24:08
META-INF/maven/com.mycompany/crawler-common/pom.properties
 -rw-r--r--   967  23-Apr-2007  14:05:36
META-INF/maven/com.mycompany/crawler-common/pom.xml
 -rw-r--r-- 14918  27-Apr-2007  10:24:08
com/mycompany/crawler/console/ConsoleApp.class
 -rw-r--r--  2827  27-Apr-2007  10:24:08  LICENSE.apache_1.1.txt
 -rw-r--r-- 10317  27-Apr-2007  10:24:08  LICENSE.apache_2.0.txt
 -rw-r--r-- 11950  27-Apr-2007  10:24:08  LICENSE.cpl_1.0.txt
 -rw-r--r--  4083  27-Apr-2007  10:24:08  LICENSE.dom-documentation.txt
 -rw-r--r--  3595  27-Apr-2007  10:24:08  LICENSE.dom-software.txt
 -rw-r--r--   804  27-Apr-2007  10:24:08  LICENSE.sax.txt
 -rw-r--r--   731  27-Apr-2007  10:24:08  log4j.properties
 -rw-r--r--   138  27-Apr-2007  10:24:08
META-INF/maven/com.mycompany/mycompany-console/pom.properties

If I want to display the LICENSE.apache_1.1.txt file, how can I access
it programatically?

I tried the simple
   File testFilePresence = new File("LICENSE.apache_1.1.txt");
   if(testFilePresence.exists())
   {
   logger.info("file " + testFilePresence.getName()+" is visible");
   }
   else
   {
   logger.info("file " + testFilePresence.getAbsolutePath()+"
is NOT visible");
   logger.info("file " + testFilePresence.getName()+" is NOT
visible");
   }

and it is not visible.

Thanks in advance.

--
Ed

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (big) Problems using assembly plugin to create executable jar

2007-03-23 Thread Pierre-Yves Saumont
Thanks ! I knew that the lines could be broken, but I did not know that 
they could be broken in the middle of a jar name! So I thought this was 
one cause of my problem. In fact, it is not. The problem is with the 
assembly descriptors. But I think I will eventually find a solution know 
I "know" where to look for;-)


Pierre-Yves



Thorsten Heit a écrit :

Hi,

  
- Even worst if possible, the plugin creates broken manifest. The lines 
are cut after 70 characters, in the middle of a jar name. This makes the 
true option completely useless. I though I 
could use 
src/main/resources/META-INF/MANIFEST.MF 
instead, using my own manifest. This would be an inconvenient, because I 
would have to update this file each time a dependency is added to the 
application, but at least it would work. Not at all. the plugin still 
breaks the line after 70 characters.



>From the Jar file specification:

(...)
Notes on Manifest and Signature Files
(...)
* Line length:

No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. If a value would make the initial line longer than this, it should be continued on extra lines (each starting with a single SPACE). 



HTH

Thorsten

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  


Re: (big) Problems using assembly plugin to create executable jar

2007-03-23 Thread Thorsten Heit
Hi,

> - Even worst if possible, the plugin creates broken manifest. The lines 
> are cut after 70 characters, in the middle of a jar name. This makes the 
> true option completely useless. I though I 
> could use 
> src/main/resources/META-INF/MANIFEST.MF 
> instead, using my own manifest. This would be an inconvenient, because I 
> would have to update this file each time a dependency is added to the 
> application, but at least it would work. Not at all. the plugin still 
> breaks the line after 70 characters.

>From the Jar file specification:

(...)
Notes on Manifest and Signature Files
(...)
* Line length:

No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. 
If a value would make the initial line longer than this, it should be continued 
on extra lines (each starting with a single SPACE). 


HTH

Thorsten

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



(big) Problems using assembly plugin to create executable jar

2007-03-23 Thread Pierre-Yves Saumont

Hi,

I am trying to use maven2 assembly plug-in. It seems to be completely 
broken:


- First, a small problem: the standard assembly descriptor is not usable 
because of it very strange name. If the app is called "myapp", the 
resulting jar will be called myapp-jar-with-dependencies.jar. It seems 
there is no way to change the name of the resulting jar except by 
creating another descriptor with a different id. So, I copied the 
standard descriptor and change the id to "app" and the application name 
to "my", resulting in a file called my-app.jar. Not exactly what I 
wanted, but better than the default name. Does anybody know an option to 
choose the file name?


- Now, a bigger broblem : when using the jar-with-dependencies external 
assembly descriptor described on Maven site, it works only if the 
assembly workdir from previous internal assembly is broken. In other 
word, if I use :


 
   maven-assembly-plugin
   
 
   jar-with-dependencies
 
  

It works.

If I then use

 
   maven-assembly-plugin
   
 
   assembly.xml
 
  ...

it works using the previously created assembly directory. So I can have 
a resulting jar named from the assembly descriptor id.


But if I delete the assembly directory and run mvn assembly:assembly 
again, it does not work. It include only one dependencies in the 
assembly. In my case, I am using Spring and it includes only Avallon, 
which is a transitive dependency of Spring.



Looks like a bug ?


- Even worst if possible, the plugin creates broken manifest. The lines 
are cut after 70 characters, in the middle of a jar name. This makes the 
true option completely useless. I though I 
could use 
src/main/resources/META-INF/MANIFEST.MF 
instead, using my own manifest. This would be an inconvenient, because I 
would have to update this file each time a dependency is added to the 
application, but at least it would work. Not at all. the plugin still 
breaks the line after 70 characters.




Pierre-Yves



Re: executable jar

2007-02-08 Thread franz see

Good day to you, Jane,

For a war ( assuming you delcared your  as "war" ), all your
dependencies ( except dependencies with the scope "provided" ) would be
copied to WEB-INF\lib automatically, before assembling the war.

So that's


  ...
  ...
  ...
  war

  ...


See [1] for more info.

Cheers,
Franz

[1] http://maven.apache.org/ref/2.0.4/maven-model/maven.html


Lan-6 wrote:
> 
> Hi, Wayne,
> 
>  Thanks for your reply.
> 
>   How can I package all the necessary libraries into the output
> jar?For
> a war, the lib will under the web-inf. In a maven project, the dependent
> jars are all in my own repositories, aren't they? When I perform "mvn
> package", it hasn't included them.
>       If another computer has the java environment, shall I run the
> executable jar with the same repository? I can't imagin it.
> 
>  I am confusing it.Thanks again.
> Jane
> 
> 2007/2/8, Wayne Fay <[EMAIL PROTECTED]>:
>>
>> NoClassDefFoundError usually means that you haven't packaged all the
>> necessary libraries etc up into your output jar, or perhaps their JVM
>> does not have the proper libraries available which you have installed
>> in your machine.
>>
>> Check your CLASSPATH environment variable on your machine, and the
>> jars you've manually installed into your JVM/JRE vs the CLASSPATH and
>> jars available on the other computer(s).
>>
>> Wayne
>>
>> On 2/7/07, Lan <[EMAIL PROTECTED]> wrote:
>> > Hi,Franz,
>> >
>> >Thanks for your quick reply.
>> >
>> >The error shows:
>> > Exception in thread "main" java.lang.NoClassDefFoundError:
>> > javax/media/NoPlayerException
>> >
>> > Actually, I have difined the MainClass in POM. But in my own machine,
>> it
>> > runs correctly.
>> >
>> > Jane
>> >
>> > 2007/2/7, franz see <[EMAIL PROTECTED]>:
>> > >
>> > >
>> > > Good day to you, Jane,
>> > >
>> > > What do you mean by it can only be used in your machine? What error
>> are
>> > > you
>> > > getting when used in another machine?
>> > >
>> > > Cheers,
>> > > Franz
>> > >
>> > >
>> > > Lan-6 wrote:
>> > > >
>> > > > Hi, all
>> > > >
>> > > > I have generated an executable jar by using maven, (mvn
>> package).
>> > > The
>> > > > jar includes the generated classes and main class.
>> > > > But it can only be used in my own machine. Shall I do some more
>> > > > settings
>> > > > to the project? What can I do?
>> > > >
>> > > > Thanks advance!
>> > > >
>> > > > Jane
>> > > >
>> > > >
>> > >
>> > > --
>> > > View this message in context:
>> > > http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369
>> > > Sent from the Maven - Users mailing list archive at Nabble.com.
>> > >
>> > >
>> > > -
>> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > > For additional commands, e-mail: [EMAIL PROTECTED]
>> > >
>> > >
>> >
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/executable-jar-tf3186039s177.html#a8867084
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: executable jar

2007-02-08 Thread franz see

Good day to you, Jane,

Maybe you only had the jmf installed in your machine and not declared as a
dependency ( you can check your dependencies by doing mvn
project-info-reports:dependencies and opening
target\site\dependencies.html...either that or the easier to remember mvn
site then open target\site\index.html and navigate to the dependencies page
:) ).

If so, you may want to declare that as a dependency. 

Cheers,
Franz


Jane-24 wrote:
> 
> Hi, markku,
> Thanks for your reply.
> 
>Maybe the reason is like 1 just you said.
>The project I aims to package has a dependeny for jmf.jar. But it
> hasn't
> included in the jar. How can I include it?
> 
> Jane
> 
> 
> 2007/2/8, Markku Saarela <[EMAIL PROTECTED]>:
>>
>> Hi,
>>
>> There are at least two way to get this exception.
>>
>> 1. at other machines you dont have JMF api available for executable jar.
>> 2. Somehow at other machine you MediaLocator constructor get wrong
>> parameter.
>>
>> - markku
>>
>> Lan wrote:
>> > Hi,Franz,
>> >
>> >Thanks for your quick reply.
>> >
>> >The error shows:
>> > Exception in thread "main" java.lang.NoClassDefFoundError:
>> > javax/media/NoPlayerException
>> >
>> > Actually, I have difined the MainClass in POM. But in my own machine,
>> it
>> > runs correctly.
>> >
>> > Jane
>> >
>> > 2007/2/7, franz see <[EMAIL PROTECTED]>:
>> >>
>> >>
>> >> Good day to you, Jane,
>> >>
>> >> What do you mean by it can only be used in your machine? What error
>> are
>> >> you
>> >> getting when used in another machine?
>> >>
>> >> Cheers,
>> >> Franz
>> >>
>> >>
>> >> Lan-6 wrote:
>> >> >
>> >> > Hi, all
>> >> >
>> >> > I have generated an executable jar by using maven, (mvn
>> package).
>> >> The
>> >> > jar includes the generated classes and main class.
>> >> > But it can only be used in my own machine. Shall I do some more
>> >> > settings
>> >> > to the project? What can I do?
>> >> >
>> >> > Thanks advance!
>> >> >
>> >> > Jane
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369
>> >> Sent from the Maven - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/executable-jar-tf3186039s177.html#a8866934
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: executable jar

2007-02-08 Thread Markku Saarela
Include true element to manifest 
configuration if not allready done.


Package deliverable zip file  witch have all these classpath dependency 
jars with assembly plugin.


- markku

Jane wrote:

Hi, markku,
   Thanks for your reply.

  Maybe the reason is like 1 just you said.
  The project I aims to package has a dependeny for jmf.jar. But it 
hasn't

included in the jar. How can I include it?

Jane


2007/2/8, Markku Saarela <[EMAIL PROTECTED]>:


Hi,

There are at least two way to get this exception.

1. at other machines you dont have JMF api available for executable jar.
2. Somehow at other machine you MediaLocator constructor get wrong
parameter.

- markku

Lan wrote:
> Hi,Franz,
>
>Thanks for your quick reply.
>
>The error shows:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> javax/media/NoPlayerException
>
> Actually, I have difined the MainClass in POM. But in my own 
machine, it

> runs correctly.
>
> Jane
>
> 2007/2/7, franz see <[EMAIL PROTECTED]>:
>>
>>
>> Good day to you, Jane,
>>
>> What do you mean by it can only be used in your machine? What 
error are

>> you
>> getting when used in another machine?
>>
>> Cheers,
>> Franz
>>
>>
>> Lan-6 wrote:
>> >
>> > Hi, all
>> >
>> > I have generated an executable jar by using maven, (mvn 
package).

>> The
>> > jar includes the generated classes and main class.
>> > But it can only be used in my own machine. Shall I do some more
>> > settings
>> > to the project? What can I do?
>> >
>> > Thanks advance!
>> >
>> > Jane
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: executable jar

2007-02-07 Thread Jane

Hi, markku,
   Thanks for your reply.

  Maybe the reason is like 1 just you said.
  The project I aims to package has a dependeny for jmf.jar. But it hasn't
included in the jar. How can I include it?

Jane


2007/2/8, Markku Saarela <[EMAIL PROTECTED]>:


Hi,

There are at least two way to get this exception.

1. at other machines you dont have JMF api available for executable jar.
2. Somehow at other machine you MediaLocator constructor get wrong
parameter.

- markku

Lan wrote:
> Hi,Franz,
>
>Thanks for your quick reply.
>
>The error shows:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> javax/media/NoPlayerException
>
> Actually, I have difined the MainClass in POM. But in my own machine, it
> runs correctly.
>
> Jane
>
> 2007/2/7, franz see <[EMAIL PROTECTED]>:
>>
>>
>> Good day to you, Jane,
>>
>> What do you mean by it can only be used in your machine? What error are
>> you
>> getting when used in another machine?
>>
>> Cheers,
>> Franz
>>
>>
>> Lan-6 wrote:
>> >
>> > Hi, all
>> >
>> > I have generated an executable jar by using maven, (mvn package).
>> The
>> > jar includes the generated classes and main class.
>> > But it can only be used in my own machine. Shall I do some more
>> > settings
>> > to the project? What can I do?
>> >
>> > Thanks advance!
>> >
>> > Jane
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: executable jar

2007-02-07 Thread Lan

Hi, Wayne,

Thanks for your reply.

 How can I package all the necessary libraries into the output jar?For
a war, the lib will under the web-inf. In a maven project, the dependent
jars are all in my own repositories, aren't they? When I perform "mvn
package", it hasn't included them.
 If another computer has the java environment, shall I run the
executable jar with the same repository? I can't imagin it.

I am confusing it.Thanks again.
Jane

2007/2/8, Wayne Fay <[EMAIL PROTECTED]>:


NoClassDefFoundError usually means that you haven't packaged all the
necessary libraries etc up into your output jar, or perhaps their JVM
does not have the proper libraries available which you have installed
in your machine.

Check your CLASSPATH environment variable on your machine, and the
jars you've manually installed into your JVM/JRE vs the CLASSPATH and
jars available on the other computer(s).

Wayne

On 2/7/07, Lan <[EMAIL PROTECTED]> wrote:
> Hi,Franz,
>
>Thanks for your quick reply.
>
>The error shows:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> javax/media/NoPlayerException
>
> Actually, I have difined the MainClass in POM. But in my own machine, it
> runs correctly.
>
> Jane
>
> 2007/2/7, franz see <[EMAIL PROTECTED]>:
> >
> >
> > Good day to you, Jane,
> >
> > What do you mean by it can only be used in your machine? What error
are
> > you
> > getting when used in another machine?
> >
> > Cheers,
> > Franz
> >
> >
> > Lan-6 wrote:
> > >
> > > Hi, all
> > >
> > > I have generated an executable jar by using maven, (mvn
package).
> > The
> > > jar includes the generated classes and main class.
> > > But it can only be used in my own machine. Shall I do some more
> > > settings
> > > to the project? What can I do?
> > >
> > > Thanks advance!
> > >
> > > Jane
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: executable jar

2007-02-07 Thread Markku Saarela

Hi,

There are at least two way to get this exception.

1. at other machines you dont have JMF api available for executable jar.
2. Somehow at other machine you MediaLocator constructor get wrong 
parameter.


- markku

Lan wrote:

Hi,Franz,

   Thanks for your quick reply.

   The error shows:
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/media/NoPlayerException

Actually, I have difined the MainClass in POM. But in my own machine, it
runs correctly.

Jane

2007/2/7, franz see <[EMAIL PROTECTED]>:



Good day to you, Jane,

What do you mean by it can only be used in your machine? What error are
you
getting when used in another machine?

Cheers,
Franz


Lan-6 wrote:
>
> Hi, all
>
> I have generated an executable jar by using maven, (mvn package).
The
> jar includes the generated classes and main class.
> But it can only be used in my own machine. Shall I do some more
> settings
> to the project? What can I do?
>
> Thanks advance!
>
> Jane
>
>

--
View this message in context:
http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: executable jar

2007-02-07 Thread Wayne Fay

NoClassDefFoundError usually means that you haven't packaged all the
necessary libraries etc up into your output jar, or perhaps their JVM
does not have the proper libraries available which you have installed
in your machine.

Check your CLASSPATH environment variable on your machine, and the
jars you've manually installed into your JVM/JRE vs the CLASSPATH and
jars available on the other computer(s).

Wayne

On 2/7/07, Lan <[EMAIL PROTECTED]> wrote:

Hi,Franz,

   Thanks for your quick reply.

   The error shows:
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/media/NoPlayerException

Actually, I have difined the MainClass in POM. But in my own machine, it
runs correctly.

Jane

2007/2/7, franz see <[EMAIL PROTECTED]>:
>
>
> Good day to you, Jane,
>
> What do you mean by it can only be used in your machine? What error are
> you
> getting when used in another machine?
>
> Cheers,
> Franz
>
>
> Lan-6 wrote:
> >
> > Hi, all
> >
> > I have generated an executable jar by using maven, (mvn package).
> The
> > jar includes the generated classes and main class.
> > But it can only be used in my own machine. Shall I do some more
> > settings
> > to the project? What can I do?
> >
> > Thanks advance!
> >
> > Jane
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: executable jar

2007-02-07 Thread Lan

Hi,Franz,

   Thanks for your quick reply.

   The error shows:
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/media/NoPlayerException

Actually, I have difined the MainClass in POM. But in my own machine, it
runs correctly.

Jane

2007/2/7, franz see <[EMAIL PROTECTED]>:



Good day to you, Jane,

What do you mean by it can only be used in your machine? What error are
you
getting when used in another machine?

Cheers,
Franz


Lan-6 wrote:
>
> Hi, all
>
> I have generated an executable jar by using maven, (mvn package).
The
> jar includes the generated classes and main class.
> But it can only be used in my own machine. Shall I do some more
> settings
> to the project? What can I do?
>
> Thanks advance!
>
> Jane
>
>

--
View this message in context:
http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: executable jar

2007-02-07 Thread franz see

Good day to you, Jane,

What do you mean by it can only be used in your machine? What error are you
getting when used in another machine?

Cheers,
Franz


Lan-6 wrote:
> 
> Hi, all
> 
> I have generated an executable jar by using maven, (mvn package). The
> jar includes the generated classes and main class.
> But it can only be used in my own machine. Shall I do some more
> settings
> to the project? What can I do?
> 
> Thanks advance!
> 
> Jane
> 
> 

-- 
View this message in context: 
http://www.nabble.com/executable-jar-tf3186039s177.html#a8845369
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



executable jar

2007-02-07 Thread Lan

Hi, all

   I have generated an executable jar by using maven, (mvn package). The
jar includes the generated classes and main class.
   But it can only be used in my own machine. Shall I do some more settings
to the project? What can I do?

   Thanks advance!

Jane


Re: executable jar with all dependencies

2006-10-30 Thread John Casey

You might start by looking here:

http://maven.apache.org/plugins/maven-assembly-plugin

You might be able to achieve this using the built-in jar-with-dependencies
descriptorRef, along with a custom manifest entry...for the manifest
customizations, you could add this to the assembly plugin configuration:


 
   
 some.class.Main
   
 


If the jar-with-dependencies assembly type doesn't work, you might have to
create your own assembly descriptor, specify a dependencySet within that,
and specify true.

HTH,

John

On 10/30/06, Enda Ridge <[EMAIL PROTECTED]> wrote:


Hi,
I'd be grateful for help with the following please.
I've looked at similar threads but cannot get the results to apply in my
own circumstances.

I am using Maven2 with a multiple module project. The package command
works fine, placing a jar in each module's target directory.

I would like to produce a single executable jar for the whole project,
including all dependent jars from my repository and all generated jars
from my own project.

I've seen posts mentioning the assembly and jar plugins but cannot find
any instructions on the project's web site.

Thanks in advance,
Enda

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




executable jar with all dependencies

2006-10-30 Thread Enda Ridge

Hi,
I'd be grateful for help with the following please.
I've looked at similar threads but cannot get the results to apply in my 
own circumstances.


I am using Maven2 with a multiple module project. The package command 
works fine, placing a jar in each module's target directory.


I would like to produce a single executable jar for the whole project, 
including all dependent jars from my repository and all generated jars 
from my own project.


I've seen posts mentioning the assembly and jar plugins but cannot find 
any instructions on the project's web site.


Thanks in advance,
Enda

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to include dependencies in an executable jar?

2006-09-24 Thread franz see



Alexander Sack-3 wrote:
> 
> I'm trying to build an executable jar and I want to include some of the
> dependencies of my project in the jar itself for runtime.  Is there a way
> to
> do this?  The following page was somewhat helpful:
> 
> http://maven.apache.org/plugins/maven-jar-plugin/examples/executable-jar.html
> 
> But it doesn't discuss including the JARs.  I mean I could add a resources
> directory and include the JARs there I believe but I was hopeing for
> something more automatic.
> 
> Thanks!
> 
> -aps
> 
> -- 
> "What lies behind us and what lies in front of us is of little concern to
> what lies within us." -Ralph Waldo Emerson
> 
> 

Good day to you, aps,

Regarding the copying of dependencies, you might try to use
maven-dependency-plugin. You can try and take a look at [1] for an example
on this, and [2] for more information regarding the goal. 

However, that plugin docu is not yet released, and it's still being
reviewed. If you have any comments about it, please do let us know so that
we can improve it. 

Thanks,
Franz

[1]
http://people.apache.org/~aramirez/maven-dependency-plugin/examples/copy-direct-dependencies.html
[2]
http://people.apache.org/~aramirez/maven-dependency-plugin/copy-dependencies-mojo.html
-- 
View this message in context: 
http://www.nabble.com/How-to-include-dependencies-in-an-executable-jar--tf2318681.html#a6478457
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Offtopic] RE: How to include dependencies in an executable jar?

2006-09-22 Thread Ryan Slobojan
Hi,

If I may toss in a point of irony about this:

* Your complaint is that people don't search before they send out a
question
* Therefore, your response is to flame those that do in the hope that
the fear^H^H^H^Hencouragement will spread to others

Logical Flaw:

* The people that don't search before posting aren't going to see these
flames, and thus will not be "encouraged"

Happy Friday!

Thanks,

Ryan Slobojan

-Original Message-
From: Wayne Fay [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 22, 2006 11:20 AM
To: Maven Users List
Subject: Re: How to include dependencies in an executable jar?

Its OK... I just have to flame every now and then for things like that
in an effort to encourage others to search before sending. Sorry you
were the target in this case. ;-)

[snip]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to include dependencies in an executable jar?

2006-09-22 Thread Alexander Sack

No flame away.  I make it point on all forums (work and play) to search
FIRST ask SECOND but in these case I was flying blind (still getting used to
Gmail's labeling feature).  Anyway, the assembly plugin isn't that bad
(feels like ANT).

Now I just need this name thing sorted out? (finalName should be FINAL
NAME!!!)

-aps

On 9/22/06, Wayne Fay <[EMAIL PROTECTED]> wrote:


Its OK... I just have to flame every now and then for things like that
in an effort to encourage others to search before sending. Sorry you
were the target in this case. ;-)

I'm not building executable jars personally so I'm afraid I'm not much
help on this topic...

Wayne

On 9/22/06, Alexander Sack <[EMAIL PROTECTED]> wrote:
> Okay found the thread (again my bad Wayne)...thanks Valerio...
>
> However, just like the last thread, this seems like a very awkward way
of
> handling it (an assembly plugin to just assemble binaries and various
> files.  I mean one of the anchor item features of maven is its
dependency
> handling.  Be nice to exploit that to just include the dependencies I
need
> like the WAR and EAR plugins via some scope parameter, no? :D
>
> The POmstrap is cool but not acceptable for production (adding an
external
> jar to run a jaruggh).
>
> -aps
>
> On 9/22/06, Valerio Schiavoni <[EMAIL PROTECTED]> wrote:
> >
> > Hello Alexander,
> >
> > On 9/22/06, Alexander Sack <[EMAIL PROTECTED]> wrote:
> >
> > > I'm trying to build an executable jar and I want to include some of
the
> > > dependencies of my project in the jar itself for runtime.  Is there
a
> > > way to  do this?
> > >
> >
> > try to use the assembly plugin:
> > http://maven.apache.org/plugins/maven-assembly-plugin/
> >
> > --
> > http://valerioschiavoni.blogspot.com
> > http://jroller.com/page/vschiavoni
> >
> >
>
>
> --
> "What lies behind us and what lies in front of us is of little concern
to
> what lies within us." -Ralph Waldo Emerson
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson


Re: How to include dependencies in an executable jar?

2006-09-22 Thread Valerio Schiavoni

to exclude the id you can use:
false



On 9/22/06, Alexander Sack <[EMAIL PROTECTED]> wrote:


Alright, I have this owrking minus I can't seem to set the final name of
my
zipped assembly.

It seems that the assembly name concat's the  tage with the

tage of my assembly file.  I want to call it .zip, how do I do
this?  If I leave off final name and just use ID, that doesn't work, if I
use  but no ID, then I get name-null.zip.

Thanks!

-aps

On 9/22/06, Alexander Sack <[EMAIL PROTECTED]> wrote:
>
> Okay found the thread (again my bad Wayne)...thanks Valerio...
>
> However, just like the last thread, this seems like a very awkward way
of
> handling it (an assembly plugin to just assemble binaries and various
> files.  I mean one of the anchor item features of maven is its
dependency
> handling.  Be nice to exploit that to just include the dependencies I
need
> like the WAR and EAR plugins via some scope parameter, no? :D
>
> The POmstrap is cool but not acceptable for production (adding an
external
> jar to run a jaruggh).
>
> -aps
>
> On 9/22/06, Valerio Schiavoni <[EMAIL PROTECTED]> wrote:
> >
> > Hello Alexander,
> >
> > On 9/22/06, Alexander Sack <[EMAIL PROTECTED]> wrote:
> >
> > > I'm trying to build an executable jar and I want to include some of
> > the
> > > dependencies of my project in the jar itself for runtime.  Is there
a
> > > way to  do this?
> > >
> >
> > try to use the assembly plugin:
> > http://maven.apache.org/plugins/maven-assembly-plugin/
> >
> > --
> > http://valerioschiavoni.blogspot.com
> > http://jroller.com/page/vschiavoni
> >
> >
>
>
> --
> "What lies behind us and what lies in front of us is of little concern
to
> what lies within us." -Ralph Waldo Emerson
>



--
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson





--
http://valerioschiavoni.blogspot.com
http://jroller.com/page/vschiavoni


Re: How to include dependencies in an executable jar?

2006-09-22 Thread Wayne Fay

Its OK... I just have to flame every now and then for things like that
in an effort to encourage others to search before sending. Sorry you
were the target in this case. ;-)

I'm not building executable jars personally so I'm afraid I'm not much
help on this topic...

Wayne

On 9/22/06, Alexander Sack <[EMAIL PROTECTED]> wrote:

Okay found the thread (again my bad Wayne)...thanks Valerio...

However, just like the last thread, this seems like a very awkward way of
handling it (an assembly plugin to just assemble binaries and various
files.  I mean one of the anchor item features of maven is its dependency
handling.  Be nice to exploit that to just include the dependencies I need
like the WAR and EAR plugins via some scope parameter, no? :D

The POmstrap is cool but not acceptable for production (adding an external
jar to run a jaruggh).

-aps

On 9/22/06, Valerio Schiavoni <[EMAIL PROTECTED]> wrote:
>
> Hello Alexander,
>
> On 9/22/06, Alexander Sack <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to build an executable jar and I want to include some of the
> > dependencies of my project in the jar itself for runtime.  Is there a
> > way to  do this?
> >
>
> try to use the assembly plugin:
> http://maven.apache.org/plugins/maven-assembly-plugin/
>
> --
> http://valerioschiavoni.blogspot.com
> http://jroller.com/page/vschiavoni
>
>


--
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to include dependencies in an executable jar?

2006-09-22 Thread Alexander Sack

Alright, I have this owrking minus I can't seem to set the final name of my
zipped assembly.

It seems that the assembly name concat's the  tage with the 
tage of my assembly file.  I want to call it .zip, how do I do
this?  If I leave off final name and just use ID, that doesn't work, if I
use  but no ID, then I get name-null.zip.

Thanks!

-aps

On 9/22/06, Alexander Sack <[EMAIL PROTECTED]> wrote:


Okay found the thread (again my bad Wayne)...thanks Valerio...

However, just like the last thread, this seems like a very awkward way of
handling it (an assembly plugin to just assemble binaries and various
files.  I mean one of the anchor item features of maven is its dependency
handling.  Be nice to exploit that to just include the dependencies I need
like the WAR and EAR plugins via some scope parameter, no? :D

The POmstrap is cool but not acceptable for production (adding an external
jar to run a jaruggh).

-aps

On 9/22/06, Valerio Schiavoni <[EMAIL PROTECTED]> wrote:
>
> Hello Alexander,
>
> On 9/22/06, Alexander Sack <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to build an executable jar and I want to include some of
> the
> > dependencies of my project in the jar itself for runtime.  Is there a
> > way to  do this?
> >
>
> try to use the assembly plugin:
> http://maven.apache.org/plugins/maven-assembly-plugin/
>
> --
> http://valerioschiavoni.blogspot.com
> http://jroller.com/page/vschiavoni
>
>


--
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson





--
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson


Re: How to include dependencies in an executable jar?

2006-09-22 Thread Alexander Sack

Okay found the thread (again my bad Wayne)...thanks Valerio...

However, just like the last thread, this seems like a very awkward way of
handling it (an assembly plugin to just assemble binaries and various
files.  I mean one of the anchor item features of maven is its dependency
handling.  Be nice to exploit that to just include the dependencies I need
like the WAR and EAR plugins via some scope parameter, no? :D

The POmstrap is cool but not acceptable for production (adding an external
jar to run a jaruggh).

-aps

On 9/22/06, Valerio Schiavoni <[EMAIL PROTECTED]> wrote:


Hello Alexander,

On 9/22/06, Alexander Sack <[EMAIL PROTECTED]> wrote:

> I'm trying to build an executable jar and I want to include some of the
> dependencies of my project in the jar itself for runtime.  Is there a
> way to  do this?
>

try to use the assembly plugin:
http://maven.apache.org/plugins/maven-assembly-plugin/

--
http://valerioschiavoni.blogspot.com
http://jroller.com/page/vschiavoni





--
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson


Re: How to include dependencies in an executable jar?

2006-09-22 Thread Valerio Schiavoni

Hello Alexander,

On 9/22/06, Alexander Sack <[EMAIL PROTECTED]> wrote:


I'm trying to build an executable jar and I want to include some of the
dependencies of my project in the jar itself for runtime.  Is there a
way to  do this?



try to use the assembly plugin:
http://maven.apache.org/plugins/maven-assembly-plugin/

--
http://valerioschiavoni.blogspot.com
http://jroller.com/page/vschiavoni


Re: How to include dependencies in an executable jar?

2006-09-22 Thread Alexander Sack

Ahh you know what...my email for this list got deleted yesterday (I was
doing some cleaning and I screwed up)!!!  My bad...I will try to search the
archives on the website...

-aps

On 9/22/06, Wayne Fay <[EMAIL PROTECTED]> wrote:


Looking through my archive, this topic comes up nearly every week... I
guess you didn't search for the answer prior to sending this question?

It was even discussed just yesterday! Look at the thread titled
"Creating a Java application" for some options...

Wayne

On 9/22/06, Alexander Sack <[EMAIL PROTECTED]> wrote:
> I'm trying to build an executable jar and I want to include some of the
> dependencies of my project in the jar itself for runtime.  Is there a
way to
> do this?  The following page was somewhat helpful:
>
>
http://maven.apache.org/plugins/maven-jar-plugin/examples/executable-jar.html
>
> But it doesn't discuss including the JARs.  I mean I could add a
resources
> directory and include the JARs there I believe but I was hopeing for
> something more automatic.
>
> Thanks!
>
> -aps
>
> --
> "What lies behind us and what lies in front of us is of little concern
to
> what lies within us." -Ralph Waldo Emerson
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson


Re: How to include dependencies in an executable jar?

2006-09-22 Thread Wayne Fay

Looking through my archive, this topic comes up nearly every week... I
guess you didn't search for the answer prior to sending this question?

It was even discussed just yesterday! Look at the thread titled
"Creating a Java application" for some options...

Wayne

On 9/22/06, Alexander Sack <[EMAIL PROTECTED]> wrote:

I'm trying to build an executable jar and I want to include some of the
dependencies of my project in the jar itself for runtime.  Is there a way to
do this?  The following page was somewhat helpful:

http://maven.apache.org/plugins/maven-jar-plugin/examples/executable-jar.html

But it doesn't discuss including the JARs.  I mean I could add a resources
directory and include the JARs there I believe but I was hopeing for
something more automatic.

Thanks!

-aps

--
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to include dependencies in an executable jar?

2006-09-22 Thread Alexander Sack

I'm trying to build an executable jar and I want to include some of the
dependencies of my project in the jar itself for runtime.  Is there a way to
do this?  The following page was somewhat helpful:

http://maven.apache.org/plugins/maven-jar-plugin/examples/executable-jar.html

But it doesn't discuss including the JARs.  I mean I could add a resources
directory and include the JARs there I believe but I was hopeing for
something more automatic.

Thanks!

-aps

--
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson


Re: m2 executable jar file

2006-09-04 Thread Sha Jiang

Hello,
This link
http://maven.apache.org/guides/mini/guide-manifest.html
may help you in MANIFEST.
I think you can write a MANIFEST firstly, the file includes all entries you
required.
Then add the MANIFEST to your jar.

 org.apache.maven.plugins
 maven-jar-plugin
 
 
   Your_MANIFEST
 
  


2006/9/3, nepso <[EMAIL PROTECTED]>:


Hi,

is there any way how to add jar dependencies to generated .jar file with
mvn install?
Or how can I add normal Class-Path to MANIFEST.MF file?
becouse with true it adds only name of
dependency f.e.: commons-net-1.4.1.jar but I need c:\...\commons-
net-1.4.1.jar.

Thanks for help
Regards Martin




m2 executable jar file

2006-09-04 Thread nepso
Hi,

is there any way how to add jar dependencies to generated .jar file with mvn 
install?
Or how can I add normal Class-Path to MANIFEST.MF file? 
becouse with true it adds only name of dependency 
f.e.: commons-net-1.4.1.jar but I need c:\...\commons-net-1.4.1.jar.

Thanks for help
Regards Martin


Re: Jar with depenencies or Executable jar - summary

2006-03-07 Thread Brett Porter
Used in this way, the assembly plugin is like the m1 javaapp plugin.
There is no equivalent of uberjar in m2 (because it really didn't work
very well). jarjar and minijar (also in the mojo sandbox), do similar
things to the assembly plugin but also cull out unused classes and
rewrite the packages so they don't conflict with other dependencies.

- Brett

On 3/8/06, Geoffrey De Smet <[EMAIL PROTECTED]> wrote:
> I use the assembly plugin like this:
>
>  
>  maven-assembly-plugin
>  
>  jar-with-dependencies
>  
>  
>  ggg.MainApp
>  
>  
>  
>  
>
>
> Because I have dependency on some signed jars (acegi for one),
> I still need to delete /META-INF/*.SF *.RSA files with winrar
> afterwards. There is an issue for that in JIRA.
>
> Artamonov, Juri wrote:
> > Hi All,
> >
> > Guys, could you please give a summary of what plugin is recommended for
> > using to have executable jar?
> >
> > As I see (per comments in IRC) the result jar that I get after using
> > assembly plugin in m2 is not the same as result jar that I get after
> > using uberjar plugin in m1.
> >
> > Also seems uberjar is available only for m1. Someone mentioned javaapp
> > plugin but as I see it's available for m1 as well only.
> >
> > Emmanuel Venisse pointed me in IRC to jarjar-maven-plugin but according
> > to him seems the plugin is in not working state.
> >
> > http://svn.codehaus.org/trunk/mojo/mojo-sandbox/jarjar-maven-plugin/?roo
> > t=mojo
> >
> > So, could you please recommend the plugin for m2, which will result the
> > same executable jar as get after using uberjar plugin in m1, of cource
> > if it's exists?
> >
> > Best regards,
> > Juri.
>
> --
> With kind regards,
> Geoffrey De Smet
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Jar with depenencies or Executable jar - summary

2006-03-07 Thread Geoffrey De Smet

I use the assembly plugin like this:


maven-assembly-plugin

jar-with-dependencies


ggg.MainApp






Because I have dependency on some signed jars (acegi for one),
I still need to delete /META-INF/*.SF *.RSA files with winrar 
afterwards. There is an issue for that in JIRA.


Artamonov, Juri wrote:

Hi All,

Guys, could you please give a summary of what plugin is recommended for
using to have executable jar?

As I see (per comments in IRC) the result jar that I get after using
assembly plugin in m2 is not the same as result jar that I get after
using uberjar plugin in m1.

Also seems uberjar is available only for m1. Someone mentioned javaapp
plugin but as I see it's available for m1 as well only.

Emmanuel Venisse pointed me in IRC to jarjar-maven-plugin but according
to him seems the plugin is in not working state.

http://svn.codehaus.org/trunk/mojo/mojo-sandbox/jarjar-maven-plugin/?roo
t=mojo

So, could you please recommend the plugin for m2, which will result the
same executable jar as get after using uberjar plugin in m1, of cource
if it's exists?

Best regards, 
Juri.


--
With kind regards,
Geoffrey De Smet


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Jar with depenencies or Executable jar - summary

2006-03-07 Thread Artamonov, Juri
Hi All,

Guys, could you please give a summary of what plugin is recommended for
using to have executable jar?

As I see (per comments in IRC) the result jar that I get after using
assembly plugin in m2 is not the same as result jar that I get after
using uberjar plugin in m1.

Also seems uberjar is available only for m1. Someone mentioned javaapp
plugin but as I see it's available for m1 as well only.

Emmanuel Venisse pointed me in IRC to jarjar-maven-plugin but according
to him seems the plugin is in not working state.

http://svn.codehaus.org/trunk/mojo/mojo-sandbox/jarjar-maven-plugin/?roo
t=mojo

So, could you please recommend the plugin for m2, which will result the
same executable jar as get after using uberjar plugin in m1, of cource
if it's exists?

Best regards, 
Juri.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to make executable jar file with dependency?

2005-01-28 Thread Andy Lawrence
I've had better luck with this:
http://maven-plugins.sourceforge.net/maven-javaapp-plugin/index.html

with uberjar, it packaged just fine, but there was a *long* delay in
starting up.  I don't exactly remember the reasons anymore, but
basically, to get dependent jars into your classpath (and those jars are
inside your uberjar) they use a custom classloader to do the trickery.

javaapp works a bit differently to make the classpath work:  at
generation time, it unpacks ALL of the dependent jars into one big tree,
and then jars that up.

HTH

On Fri, 2005-01-28 at 20:47 -0100, Pascal Thivent wrote:

> Hi,
> 
> I think this is what you're looking for :
> http://maven.apache.org/reference/plugins/uberjar/
> 
> On Fri, 28 Jan 2005 16:35:51 -0500, Chen, Andrew .
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> > 
> > Our codes depend on some external libraries, such as xerces.jar, xalan.jar,
> > ..
> > 
> > How to make an executable jar that include everything?
> > 
> > My end command is expected to be:
> >  java -jar myprj.jar
> > 
> > What is the best practice in Maven to deploy pure non-j2ee java code?
> > Should I pack everything into one big jar, or deploy all different jar files
> > into one directory?
> > 
> > We have tried the manifest in project.properties, and the resource in
> > project.xml.
> > 
> > Thanks
> > Andrew H. Chen
> > Engineering Computing & US BWR
> > Westinghouse Electric Company
> > 
> > (+1)-412-374-2316
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 


Re: How to make executable jar file with dependency?

2005-01-28 Thread Pascal Thivent
Hi,

I think this is what you're looking for :
http://maven.apache.org/reference/plugins/uberjar/

On Fri, 28 Jan 2005 16:35:51 -0500, Chen, Andrew .
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Our codes depend on some external libraries, such as xerces.jar, xalan.jar,
> ..
> 
> How to make an executable jar that include everything?
> 
> My end command is expected to be:
>  java -jar myprj.jar
> 
> What is the best practice in Maven to deploy pure non-j2ee java code?
> Should I pack everything into one big jar, or deploy all different jar files
> into one directory?
> 
> We have tried the manifest in project.properties, and the resource in
> project.xml.
> 
> Thanks
> Andrew H. Chen
> Engineering Computing & US BWR
> Westinghouse Electric Company
> 
> (+1)-412-374-2316
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
Pascal

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to make executable jar file with dependency?

2005-01-28 Thread Chen, Andrew .
Hi,

Our codes depend on some external libraries, such as xerces.jar, xalan.jar,
..

How to make an executable jar that include everything?

My end command is expected to be:
 java -jar myprj.jar 

What is the best practice in Maven to deploy pure non-j2ee java code?
Should I pack everything into one big jar, or deploy all different jar files
into one directory?

We have tried the manifest in project.properties, and the resource in
project.xml.

Thanks
Andrew H. Chen
Engineering Computing & US BWR
Westinghouse Electric Company

(+1)-412-374-2316

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]