Hi, I'm following the jersey documentation. I unfolded this simple pom.xml before
<dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-server</artifactId> <version>1.14</version> </dependency> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-grizzly2</artifactId> <version>1.14</version> </dependency>
and add repository
<url>https://maven.java.net/content/repositories/snapshots/</url>
However, when I try to do this with gradle, it does not seem to work, it does not load the rest of the dependencies that are required, and obviously I have to explicitly put javax.ws.rs:jsr311-api:1.1.1 and even the jersey core. This is my build.gradle.
apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'jetty' sourceCompatibility = 1.6 repositories { mavenCentral() maven { url 'https://maven.java.net/content/repositories/snapshots/' } } List compileLibraries =['com.sun.jersey:jersey-server:1.14', 'com.sun.jersey:jersey-grizzly2:1.14', 'com.sun.jersey:jersey-core:1.14', 'javax.ws.rs:jsr311-api:1.1.1'] dependencies { compile (compileLibraries ) testCompile group: 'junit', name: 'junit', version: '4.+' } httpPort = 8888 stopPort = 9451 stopKey = 'foo'
Is this the correct gradle behavior? How can I do the same as with maven?
Edit
Just for the sake of this, and if someone is interested in seeing the gradle assembly file that works with gradle, you can go to
https://github.com/necronet/XTradeJerseyimpl/
Thanks!!
source share