akhikhl / gretty

Advanced gradle plugin for running web-apps on jetty and tomcat.
MIT License
655 stars 174 forks source link

Using the new plugin framework #114

Open strindberg opened 9 years ago

strindberg commented 9 years ago

I am unsure if I have misunderstood how you are supposed to configure this, but this behavior is unexpected for mer. Consider the following minimal build.gradle:

plugins {
    id "war"
    id "org.akhikhl.gretty" version "1.1.7"
}

Running this under gradle 2.1 gives me the following output:

FAILURE: Build failed with an exception.

* Where:
Build file '/private/tmp/scratch/current/build.gradle' line: 2

* What went wrong:
An exception occurred applying plugin request [id: 'war']
> Cannot add a configuration with name 'providedCompile' as a configuration with that name already exists.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
akhikhl commented 9 years ago

Hi, this is known problem, caused by naming conflict between configurations in Gretty and in War plugin. I'll try to fix it in the next version (comes in third week of November). Please use old syntax for now:

buildscript {
  repositories {
    jcenter()
  }

  dependencies {
    classpath 'org.akhikhl.gretty:gretty:1.1.7'
  }
}

apply plugin: 'war'
apply plugin: 'org.akhikhl.gretty'
strindberg commented 9 years ago

I see the same problem in gretty 1.1.8.

akhikhl commented 9 years ago

I renamed "provided" configuration to "grettyProvidedCompile" to avoid conflicts with war plugin. The corresponding change is available in Gretty 1.1.9-SNAPSHOT. Gretty 1.1.9 release is due on 03.03.2015.