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
Fail if Jar task replaces output of another #1624
Comments
Your |
Duplicate of #2299 |
Hi Stefan, |
Ah, now I got it! I had to set the One problem I need to solve: how to exclude the normal jar from uploading? Is there a skip statement? |
Calling |
yes, thank you. Declaring |
Expected Behavior
The manual states for MavenPublishing two methods a closure might use:
So, my expectation is, either should work.
Current Behavior
Using artifact method with the task argument, this error occurs:
Using the method artifacts with task argument in the form
[ serverJarWithoutAnnoProfile ]
, the regular jar is published - which I do not want.Context
What I'm trying to do: NOT to publish the regular built jar, but a special jar built by calling a user task (serverJarWithoutAnnoProfile).
Steps to Reproduce (for bugs)
This is my user task:
task serverJarWithoutAnnoProfile(type: Jar) { archiveName jadiceCommonWebappJar from(sourceSets.main.output) }
The publish closure is this:
publishing.publications { mavenJava(MavenPublication) { artifacts = [ serverJarWithoutAnnoProfile ] //artifact serverJarWithoutAnnoProfile } }
Your Environment
I use Gradle 3.4.1 with JDK 1.7 under Windows 10.
The text was updated successfully, but these errors were encountered: