Comments (12)
At the moment I can't see a problem with your configuration. How do you call the task? Does the task depend on another task?
Do you have the project available on a repository or can you create a sample project for me that re-produces the error?
from gradle-cargo-plugin.
The build file in the issue is part of a multi project. But I can reproduce the problem with a very simple project consists only of a build file:
def TOMCAT_URL = "http://apache.mirror.iphh.net/tomcat/tomcat-6/v6.0.36/bin/apache-tomcat-6.0.36.zip"
apply plugin: 'cargo'
dependencies {
def CARGO = '1.3.1'
classpath "org.codehaus.cargo:cargo-core-uberjar:$CARGO",
"org.codehaus.cargo:cargo-ant:$CARGO"
}
buildscript {
repositories {
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
name = 'GitHub'
addArtifactPattern 'http://cloud.github.com/downloads/[organisation]/[module]/[module]-[revision].[ext]'
}
}
dependencies {
classpath 'bmuschko:gradle-cargo-plugin:0.5.6'
}
}
cargo {
containerId = 'tomcat6x'
port = 8090
deployable {
file = file('xxxx.war')
context = 'xxxx'
}
local {
installer {
installUrl = TOMCAT_URL
downloadDir = file("$projectDir/download")
extractDir = file("$buildDir/extract")
}
output = file('build/output.log')
}
}
I call the build file with
gradle tasks
The error occurs no matter which tasks I choose.
The result is always the error
Container ID was not defined.
I tested it with Gradle 1.3, 1.2 and 1.1 under Ubuntu 12.4 with Java 1.6.0_26 (Sun Microsystems Inc. 20.1-b02).
from gradle-cargo-plugin.
Found the problem. You didn't use the specific configuration defined by the Cargo plugin: cargo
. This is the correct way of declaring it.
dependencies {
def CARGO = '1.3.1'
cargo "org.codehaus.cargo:cargo-core-uberjar:$CARGO",
"org.codehaus.cargo:cargo-ant:$CARGO"
}
However, the error message is misleading and not the actual root cause. I will have to put in some validation code that checks if the configuration was set correctly. Leaving this open until fixed. Please let me know if you run into other issues.
from gradle-cargo-plugin.
Thanks
That was the mistake.
from gradle-cargo-plugin.
I have a similar phenomenon. When using the the cargo plugin lots of real other errors are hidden by the "Container ID was not defined" error message especially if there are exceptions in task configurations.
What I have observed is that the cargo plugin adds its task quite late so I guess there is a afterEvaluation hook and probably this one catches those exceptions silently and goes on with checking the cargo config. It seems to checks first for the containerID which is unfortunately never set if an previous exception prevented the cargo config closure to be run at all.
Thus is just a suspection I derived from my observations with the cargo plugin. But fact is that the "Container ID was not defined" error message hides lots of other error cause.
from gradle-cargo-plugin.
@davidkoch Your issue will be fixed with Issue #29.
from gradle-cargo-plugin.
I was able to reproduce this issue with 0.5.6, and can say that it is resolved for me with 0.5.7.
from gradle-cargo-plugin.
Resolving this issue. Thanks for the feedback.
from gradle-cargo-plugin.
I'm keen to try 0.5.7 but it doesn't seem to be available in maven central or on the GitHib download URL http://cloud.github.com/downloads/bmuschko/gradle-cargo-plugin/gradle-cargo-plugin-0.5.6.jar. Are there any plans to rectify this soon or do I need to build the jar locally for now?
from gradle-cargo-plugin.
It won't be available in the download section of Github anymore as you can't upload new files anymore. What's your issue with getting it from Maven Central? I can see the files here.
from gradle-cargo-plugin.
Weird, I was checking http://mvnrepository.com/artifact/org.gradle.api.plugins/gradle-cargo-plugin (which doesn't list it) and had my project configured to download the artefact from Github. Have now switched project over to use Maven Central and have obtained 0.5.7 successfully. Can also confirm it resolved my 'Container ID was not defined' issue. many thanks!
from gradle-cargo-plugin.
Awesome!
I think http://mvnrepository.com is some sort of third-party service. The direct search to Maven Central is this URL: http://search.maven.org/#search%7Cga%7C1%7C.
from gradle-cargo-plugin.
Related Issues (20)
- Support artifact dependency as alternative to local installer installUrl HOT 7
- Add Option To Set File Mode On Copied Files HOT 2
- Split Out Local Install And Run To Different Tasks HOT 3
- ajp port override not working
- cargoDeployRemote context root HOT 1
- Support using task outputs and configurations as deployables
- Upgrade Plugin to be compatible with Gradle 5.1.1 HOT 1
- Replace org.ajoberstar with newer replacement plugin HOT 1
- Replace custom gradle code with plugins instead HOT 1
- Fix integration tests (or the cargo plugin) to work with gradle 5.1.1 HOT 2
- cargoRunLocal always fail with existing Tomcat installation HOT 6
- Can't dpeloy ear files to Wildfly 10 HOT 4
- gradle syntax how to convert to gradle kotlin script HOT 5
- Gradle 6.0 and NoSuchMethodError getAssembledReader [related to cargo bug 1482] HOT 4
- Adding JARs to the container's classpath as dependencies
- deploy to tomcat subdomain
- Possibility to adjust log level of Cargo internals
- No value has been specified for property 'classpath' HOT 13
- Getting some security alerts after importing Cargo plugin HOT 1
- Glassfish/Payara : deployment order HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-cargo-plugin.