I am facing a strange issue after I started using “com.github.kulya:jmeter-gradle-plugin:1.3.4-2.13”. I have defined 3 maven repositories in gradle.build. And when I do ./gradlew clean tomcatRun, in the logs I see that graldew does find the dependency from the first repo but then continues to find it in other repo as well. For example:
With jmeter plugin:
HEAD org/apache/tomcat/embed/tomcat-embed-core/7.0.54/tomcat-embed-core-7.0.54.p om HTTP/1.1
Host: first host
HTTP/1.1 200 OK
X-Artifactory-Filename: tomcat-embed-core-7.0.54.pom
HEAD org/apache/tomcat/embed/tomcat-embed-core/7.0.54/tomcat-embed-core-7.0.54.pom HTTP/1.1
Host: second host
HTTP/1.1 409 Conflict
Without jmeter plugin everything works fine and gradlew does not try to get the artifact once it successfully gets it from first repo.
./gradlew --version
Gradle 2.3
Groovy: 2.3.9
Ant: Apache Ant™ version 1.9.3 compiled on December 23 2013
JVM: 1.7.0_79 (Oracle Corporation 24.79-b02)
OS: Mac OS X 10.10.5 x86_64
I am not using dynamic dependencies in the build.gralde file that is no where I have specified a version with a “+”. In addition the error occurs only when I include the jmeter plugin, without that plugin everything works fine.
This is how I have included the plugin in buildscript/dependencies:
classpath (‘com.github.kulya:jmeter-gradle-plugin:1.3.4-2.13’) {
exclude group: 'servletapi’
exclude group: ‘org.bouncycastle’
}
Hi @akk. A couple quick questions to help me investigate:
Given the jmeter plugin and removing the first maven repo, how does the build behave if you run ./gradlew clean tomcatRun --refresh-dependencies?
Are your repositories public or private?
The HTTP 409 on a HEAD request seems odd to me. What do you get if you request directly, e.g. curl -v -X HEAD [repo_url]/org/apache/tomcat/embed/tomcat-embed-core/7.0.54/tomcat-embed-core-7.0.54.pom?
If I remove the jmeter plugin, everything runs fine, that is the dependency is picked from the first repo and after that gradle does not try to get it from the subsequent repositories.
Repositories are private and public. The first repository is private and it has the required dependency and I do see a 200 OK in the logs ( mentioned in my original post)
the curl also returns a 409, the repo in this case is oss.jfrog.org.
Sorry I misread your first question, if I remove first maven repo then everything blows up because I have lot of artifacts that are only present in my local maven repo. I get a bunch of (Received status code 409 from server: Conflict)
OK so I added http://oss.jfrog.org/artifactory/libs-release/, previously it was pointing to “oss-snapshot-local” as I had some snapshot dependencies. But still the same thing now it trying to get the dependency from the third repository (which is private).
More info: The dependency is stored in .gradle/caches/modules-2/metadata-2.14/descriptors/.
Right now I comment the jmeter plugin, start tomcat, this downloads the dependencies and stores it in “.gradle/caches/modules-2/metadata-2.14/descriptors/.” Now when I uncomment the jmeter plugin everything works fine. This is a temporary fix for now.
Could not resolve all dependencies for configuration ‘:tomcat’.
Could not find org.apache.tomcat.embed:tomcat-embed-core:7.0.54.
Searched in the following locations:
file:/Users/akk/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/7.0.54/tomcat-embed-core-7.0.54.pom
file:/Users/akk/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/7.0.54/tomcat-embed-core-7.0.54.jar
file:/Users/akk/Documents/workspace/SampleGradle/ http:/oss.jfrog.org/artifactory/libs-release/org/apache/tomcat/embed/tomcat-embed-core/7.0.54/tomcat-embed-core-7.0.54.pom
file:/Users/akk/Documents/workspace/SampleGradle/ http:/oss.jfrog.org/artifactory/libs-release/org/apache/tomcat/embed/tomcat-embed-core/7.0.54/tomcat-embed-core-7.0.54.jar
Required by:
:SampleGradle:unspecified
Could not find org.apache.tomcat.embed:tomcat-embed-logging-log4j:7.0.54.
Searched in the following locations:
file:/Users/akk/.m2/repository/org/apache/tomcat/embed/tomcat-embed-logging-log4j/7.0.54/tomcat-embed-logging-log4j-7.0.54.pom
file:/Users/akk/.m2/repository/org/apache/tomcat/embed/tomcat-embed-logging-log4j/7.0.54/tomcat-embed-logging-log4j-7.0.54.jar
file:/Users/akk/Documents/workspace/SampleGradle/ http:/oss.jfrog.org/artifactory/libs-release/org/apache/tomcat/embed/tomcat-embed-logging-log4j/7.0.54/tomcat-embed-logging-log4j-7.0.54.pom
file:/Users/akk/Documents/workspace/SampleGradle/ http:/oss.jfrog.org/artifactory/libs-release/org/apache/tomcat/embed/tomcat-embed-logging-log4j/7.0.54/tomcat-embed-logging-log4j-7.0.54.jar
Required by:
:SampleGradle:unspecified
Could not find org.apache.tomcat.embed:tomcat-embed-jasper:7.0.54.
Searched in the following locations:
file:/Users/akk/.m2/repository/org/apache/tomcat/embed/tomcat-embed-jasper/7.0.54/tomcat-embed-jasper-7.0.54.pom
file:/Users/akk/.m2/repository/org/apache/tomcat/embed/tomcat-embed-jasper/7.0.54/tomcat-embed-jasper-7.0.54.jar
file:/Users/akk/Documents/workspace/SampleGradle/ http:/oss.jfrog.org/artifactory/libs-release/org/apache/tomcat/embed/tomcat-embed-jasper/7.0.54/tomcat-embed-jasper-7.0.54.pom
file:/Users/akk/Documents/workspace/SampleGradle/ http:/oss.jfrog.org/artifactory/libs-release/org/apache/tomcat/embed/tomcat-embed-jasper/7.0.54/tomcat-embed-jasper-7.0.54.jar
Required by:
:SampleGradle:unspecified
It seems that changing the repo or the version of tomcat have no effect on the error, which means it must be something else. I see gradle resolving the JAR, which makes me think that maybe some dependencies are missing or there is a conflict with the version of the tomcat plugin you’re running. Perhaps you could start with a simple example provided by the latest gradle-tomcat-plugin (assuming that works) and build up from there.