how to disable default archive uploads to maven repo

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to disable default archive uploads to maven repo

tsvendsen
This post has NOT been accepted by the mailing list yet.
Hi,

We are trying to use gradle to produce some jar files containing javascript.
I'm able to produce a jar and install it to the maven repo, but I have a problem with default jars being applied as well.

The project would use the jetty plugin to run things locally, but will not produce a war file. The jetty environment is only used as a development tool.

I would like to have full control of which jars are produced and published to the repo.

Is there a way I can apply the jetty plugin and / or the java plugin and then remove all artifacts added by these plugins?

My project would only produce one jar containing my built javascript files, which should be uploaded to the maven repo and the local maven repo
Reply | Threaded
Open this post in threaded view
|

Re: how to disable default archive uploads to maven repo

ronb
This post has NOT been accepted by the mailing list yet.
with

configurations.archives.artifacts.removeAll { it.archiveTask.is jar }

you can remove all jars from the uploaded artifacts configuration.
then you can add custom artifacts (like the javascript jar you mentioned)
Reply | Threaded
Open this post in threaded view
|

Re: how to disable default archive uploads to maven repo

tsvendsen
Thanks that worked.
I ended up deleting all artifacts first, then adding mine afterwords.