[GRADLE-1359] Odd behavior of "gradle jar" if war plugin is present Created: 28/Jan/11  Updated: 04/Jan/13  Resolved: 16/Oct/11

Status: Resolved
Project: Gradle
Affects Version/s: 0.9.2
Fix Version/s: 1.0-milestone-5

Type: Bug
Reporter: Peter Niederwieser Assignee: Adam Murdoch
Resolution: Fixed Votes: 0


 Description   
apply plugin: "java"
apply plugin: "war"

gradle clean build works as expected - only a war is generated. However, wouldn't it be nice if gradle jar still generated a jar? Currently it doesn't (because the war plugin disables the jar task).

The more general question is if Gradle shouldn't automatically "un-skip" tasks that are specified on the command line.



 Comments   
Comment by Mathias Kalb [ 29/Jan/11 ]

I think it is not good to automatically "un-skip" tasks.

1. There could be many reasons why a task is disabled.

2. If I have a multi project with JARs and WARs then I want to be able to call "gradle jar" and only the JAR files for the JAVA subprojects are created. The current behavior is not perfect, because also the WAR subprojects are compiled. But it is better than the creation of JAR files for all WAR subprojects.

Maybe a command line option can be used: "gradle --force jar" or "gradle --enable jar"

Generated at Wed Jun 30 11:53:33 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.