Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
GoogleCodeExporter opened this issue Nov 19, 2015 · 6 comments
Closed

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

GoogleCodeExporter opened this issue Nov 19, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

Will do.

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

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

  • Changed state: Verified

@GoogleCodeExporter
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant