tag:blogger.com,1999:blog-5638372.post116722803428280521..comments2023-10-10T05:22:56.347-05:00Comments on binkley's BLOG: Making a one-jar with MavenBrian Oxleyhttp://www.blogger.com/profile/06617364377560752378noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-5638372.post-49921925356573029952011-08-12T04:00:54.640-05:002011-08-12T04:00:54.640-05:00OK, great.
But how do you do this in netbeans7 WI...OK, great.<br /><br />But how do you do this in netbeans7 WITHOUT manual work? After all, it is 2011...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5638372.post-49053162279907164772011-08-07T05:29:34.209-05:002011-08-07T05:29:34.209-05:00Doesn't work with CDI - breaks Weld's clas...Doesn't work with CDI - breaks Weld's classloadng.Amatérský Investorhttps://www.blogger.com/profile/13852458975919987330noreply@blogger.comtag:blogger.com,1999:blog-5638372.post-12117894451133812922011-08-07T05:29:01.560-05:002011-08-07T05:29:01.560-05:00Note: Doesn't work with CDI - at least Weld - ...Note: Doesn't work with CDI - at least Weld - screws it's classloading.Amatérský Investorhttps://www.blogger.com/profile/13852458975919987330noreply@blogger.comtag:blogger.com,1999:blog-5638372.post-68881902816048142602010-07-15T20:19:57.036-05:002010-07-15T20:19:57.036-05:00Nice article, thanks for using (and persisting wit...Nice article, thanks for using (and persisting with) One-JAR. I just released a new version (0.97), checkout http://one-jar.sourceforge.net/<br /><br />The one-jar-maven plugin has been updated with this new release, and there is also a new project in the CVS repository showing how to use maven2 to build (http://one-jar.cvs.sourceforge.net/viewvc/one-jar/one-jar-maven/)<br /><br />A major part of this release was making it easier to set up One-JAR projects, to which end there is an application generator (one-jar-appgen) which will create a basic One-JAR directory tree, with support for building under Eclipse/Ant, and which contains a JUnit test harness. I’d be interested in hearing your thoughts on this if you’re still working with the product.<br /><br />–simon.Unknownhttps://www.blogger.com/profile/13033197382062481634noreply@blogger.comtag:blogger.com,1999:blog-5638372.post-20308199384621444192008-03-06T13:28:00.000-06:002008-03-06T13:28:00.000-06:00I had the same issue Noah stated...so my dependent...I had the same issue Noah stated...so my dependent jars were included, but it was dropping my jar in the main directory. But this started me down the google search that led to: http://www.dstovall.org/onejar-maven-plugin/index.html<BR/><BR/>A maven plugin for one-jar...very simple and it works :)Unknownhttps://www.blogger.com/profile/02596886679745362604noreply@blogger.comtag:blogger.com,1999:blog-5638372.post-45146480188433380002007-11-27T10:00:00.000-06:002007-11-27T10:00:00.000-06:00WOW. With a little tweaking of your example (yes, ...WOW. With a little tweaking of your example (yes, the noah is right about "outputFileNameMapping"), I finally managed to make a fairly generic skeleton for my future one-jars! And it works! Thanks a lot.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5638372.post-11364040022214131652007-06-05T15:25:00.000-05:002007-06-05T15:25:00.000-05:00This doesn't work for me in Maven 2.0.6I had to us...This doesn't work for me in Maven 2.0.6<BR/><BR/>I had to use:<BR/><dependencySet><BR/> <outputFileNameMapping></outputFileNameMapping> <unpack>true</unpack><BR/> <includes><BR/> <include>com.simontuffs:one-jar</include><BR/> </includes><BR/></dependencySet><BR/>Otherwise, it would try to unpack it into a one-jar-0.95 subdirectory.<BR/><BR/><BR/>And <include>${groupId}:${artifactId}</include><BR/>doesn't match anything. (Maven sez "The following patterns were never triggered in this artifact inclusion filter: myGroup:myArtifact").noahhttps://www.blogger.com/profile/09697060488717104453noreply@blogger.comtag:blogger.com,1999:blog-5638372.post-49043527808060373312007-05-15T15:54:00.000-05:002007-05-15T15:54:00.000-05:00So has anyone successfully executed a one-jar'ed s...So has anyone successfully executed a one-jar'ed super jar with a log4j configuration file that was not inside of the super jar itself? I can't seem to get log4j to work unless I package up the config file inside of the default package of the super jar file. The problem seems to be that when the super.jar file is executed, the classpath gets hijacked and any command-line parameters passed specifiying location of a classpath (for the log4j configuration file location, for example) is trounced on. For example, this won't work:<BR/>java -classpath=C:/myconffiles -Dlog4j.configuration=my.log4j.properties -jar mysuperonefile.jar<BR/><BR/>Just wondered if anyone else has run across this. Thanks either wayAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5638372.post-3486974530245395282007-04-10T08:06:00.000-05:002007-04-10T08:06:00.000-05:00it is executable as java -jar, but the dependencie...it is executable as java -jar, but the dependencies are extracted, so that everything runs within the jar-context.<BR/>Hence if you need an <I>external</I> log4j.properties-file, log-directories or config-files, the one-jar approach is the way to go.<BR/>At least I don't know how to solve those issues :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5638372.post-77802621153868234592007-04-10T05:57:00.000-05:002007-04-10T05:57:00.000-05:00Ah, Maven2--much improved. Actually, although you...Ah, Maven2--much improved. Actually, although you can build a single jar for packaging the dependencies, that one jar alone is not "executable" as "java -jar the-one.jar" which is the point of the post.Brian Oxleyhttps://www.blogger.com/profile/06617364377560752378noreply@blogger.comtag:blogger.com,1999:blog-5638372.post-59367319394972268402007-04-10T03:38:00.000-05:002007-04-10T03:38:00.000-05:00Using maven2 you can make the job without one-jar,...Using maven2 you can make the job without one-jar, by using the<BR/><BR/><I>maven-assembly-plugin</I><BR/>and the <I>descriptorRef</I><BR/><B>jar-with-dependencies</B>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5638372.post-21432907254324852052007-02-26T05:38:00.000-06:002007-02-26T05:38:00.000-06:00Hmm, I'm not sure that your maven code is working,...Hmm, I'm not sure that your maven code is working, what version of assembly plugin are you using? Maybe it's worth specifying in the POM.Ichihttps://www.blogger.com/profile/06290740917076203590noreply@blogger.comtag:blogger.com,1999:blog-5638372.post-63528342247861709852007-02-20T14:31:00.000-06:002007-02-20T14:31:00.000-06:00Thanks, again.The reason I posted these details is...Thanks, again.<BR/><BR/>The reason I posted these details is exactly what you said -- I couldn't find this information anywhere else, and I needed somewhere to refer to on the Web for instructions.<BR/><BR/>I often use my own blog to save interesting bits that otherwise leak out of my cluttered mind. :)Brian Oxleyhttps://www.blogger.com/profile/06617364377560752378noreply@blogger.comtag:blogger.com,1999:blog-5638372.post-43005110723623347022007-02-15T10:10:00.000-06:002007-02-15T10:10:00.000-06:00Great! thank youGreat! thank youAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5638372.post-88559014486063991542007-02-10T07:23:00.000-06:002007-02-10T07:23:00.000-06:00Fhis info is so helpful...all the other sites just...Fhis info is so helpful...all the other sites just rehash the onjar-supplied docs, you actually explain it within the context of the actual build process (ant/maven). Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5638372.post-38162129647084057682007-01-31T21:10:00.000-06:002007-01-31T21:10:00.000-06:00Someone kindly shouted Thank You for this post. I...Someone kindly shouted Thank You for this post. I appreciate that. Unfortunately, I accidentally deleted the comment while removing some ad-spam. Sorry!Brian Oxleyhttps://www.blogger.com/profile/06617364377560752378noreply@blogger.com