sakhtar1979 / onejar-maven-plugin

Automatically exported from code.google.com/p/onejar-maven-plugin
0 stars 0 forks source link

Ability to attach produced on-jar to the project #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
onejar-maven-plugin is missing the ability to attach the produced jar to
the project.

Original issue reported on code.google.com by eskato...@gmail.com on 26 Mar 2009 at 2:43

GoogleCodeExporter commented 9 years ago
Being able to specify the classifier used for attachement would be nice too.

Original comment by eskato...@gmail.com on 26 Mar 2009 at 2:43

GoogleCodeExporter commented 9 years ago
Will do.

Original comment by hugo.josefson.old@gmail.com on 26 Mar 2009 at 4:37

GoogleCodeExporter commented 9 years ago
I have deployed version 1.4.0-SNAPSHOT which should fix this. Please try it.

Add these (optional) configuration parameters to use the feature:
    <attachToBuild>true</attachToBuild>
    <classifier>yourcustomclassifier</classifier>

Please tell me if it works for you as expected.
/Hugo

Original comment by hugo.josefson.old@gmail.com on 26 Mar 2009 at 4:57

GoogleCodeExporter commented 9 years ago
Wow that was fast ! :-D And it's working well.

As a side note I'd say that that would be nice to have the produced jar in the 
target
directory named like the attached artifact.

For example a project with artifactId "test" and the onejar-maven-plugin 
configured
with the snipped you provided would have :
 - test-1.0-SNAPSHOT.one-jar.jar in the target/ directory
 - test-1.0-SNAPSHOT-yourcustomclassifier.jar in the maven repository

It's a very little thingie but I like filename consistency :)

Best Regards

/Paul

Original comment by eskato...@gmail.com on 26 Mar 2009 at 5:06

GoogleCodeExporter commented 9 years ago
Thanks!

And yes, I thought about that too when fixing this. I very much agree that we 
should
have consistency in how things work and how they are named by default. Since
implementing it to be the default behavior, breaks backwards compatibility with 
how
it works now, it will have to wait until 2.0.0.

Please add the request as a separate issue so I don't forget, and I will 
milestone it
for 2.0.0.

There is a workaround that I have used so far. Add this to your plugin 
configuration:
<filename>${project.build.finalName}-yourcustomclassifier.jar</filename>

<filename> is what the file in target will be called, and <classifier> is for 
the
installed/deployed artifact.

BTW, I also released version 1.4.0, so you can use that instead of the SNAPSHOT 
now.

Original comment by hugo.josefson.old@gmail.com on 26 Mar 2009 at 6:20

GoogleCodeExporter commented 9 years ago
Wonderful, using 1.4.0 now. We have a first alpha release for our project using
onejar tomorrow and this comes just in time, thanks again !

I added the request as issue 8.

Original comment by eskato...@gmail.com on 26 Mar 2009 at 7:58