I'm actually working on adjusting the core War task to have a restoreJar() 
option and the WarPlugin to create a 'wars' configuration [maybe warArchives 
would be a better name?] which would be always available for reference.

So using

 war { restoreJar() }

would:
[1] re-enable the jar task
[2] take the war task output(s) out of the archives configuration
[3] re-add the jar task output(s) into the archives configuration
[4] re-wire the install task to use a configuration that extends from wars and 
archives (this might actually be by default from the Plugin changes -- I have 
to see how it deals with the war artifact being in two configurations when 
restoreJar() is not called.

Access to the war outputs would still be available by the added 'wars' 
configuration.

And of course there need to be some unit tests written, changes to whatever 
design flaws evidence themselves, and acceptance into the core gradle 
repository :-)

-Spencer

--- On Mon, 8/29/11, davide.cavestro <[email protected]> wrote:

From: davide.cavestro <[email protected]>
Subject: [gradle-user] Re: War plugin and maven: how to publish both war and 
jar?
To: [email protected]
Date: Monday, August 29, 2011, 12:28 PM

I've found the following workaroud, as per
http://issues.gradle.org/browse/GRADLE-687?focusedCommentId=13703&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13703



This way I have to refer to the war with the classifier, but the main
artifact remain the jar.
Any better idea?

Cheers
Davide


--
View this message in context: 
http://gradle.1045684.n5.nabble.com/War-plugin-and-maven-how-to-publish-both-war-and-jar-tp4745667p4746755.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to