Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8887753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:53:15+00:00 2026-06-14T21:53:15+00:00

Hi I am following the jersey sun documentation. I have deployed before this simple

  • 0

Hi I am following the jersey sun documentation. I have deployed before 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 the repository

  <url>https://maven.java.net/content/repositories/snapshots/</url>

Nevertheless when I try to do this with gradle, it does not seem to be working, is not downloading the rest of dependencies that requires and aparently I have to explicitly put javax.ws.rs:jsr311-api:1.1.1 and even 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 proper gradle behaviour? How can I do as same as with maven?

Edit

Just for the sake of this and if somebody is interesting in seeing a gradle build file that work with gradle you can go to

https://github.com/necronet/XTradeJerseyimpl/

Thanks!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:53:16+00:00Added an answer on June 14, 2026 at 9:53 pm

    Seems that the dependency from jersey-server to jersey-core isn’t being properly interpreted by Gradle. Looking at the pom shows that the jersey-core dependency is in a profile, which is likely why it’s not being picked up. And jersey-core has the dependency on jsr311. Sounds like Gradle should probably account for the profile marked ‘activeByDefault’ in cases like these.

    That said, you’ve already hit upon the solution, which is to specify the two jars directly – and it’s still less lines to configure than the maven xml 🙂

    Also, it looks like all the jars you need can be found in mavenCentral, so the snapshot repository isn’t contributing anything.

    This doesn’t solve the need to explicitly mention those two extra jars, but I hope this explains why, and you might want to raise an issue on Gradle Jira if you think this should be addressed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project which uses the following maven dependencies: <dependency> <groupId>com.dropbox</groupId> <artifactId>client2</artifactId> <version>1.3</version>
I have an Hibernate Project with the following Hibernate relevant dependencies: <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId>
I have the following XML: <?xml version=1.0 encoding=UTF-8 standalone=yes?> <application xmlns=http://research.sun.com/wadl/2006/10> <doc xmlns:jersey=http://jersey.dev.java.net/ jersey:generatedBy=Jersey:
I am using Jersey v10 and have written the following code.Is this the right
I have the following scenario: Server: Jetty (with configured JAAS) Client: Jersey invoked via
I am trying with simple Jersey + JSON example but I get following error
I use Jersey for WS. I have the following method: @Path(...) @POST public Response
I have the following returned from a Jersey @GET method. It works, fine but
I was following this tutorial on Tomcat and Jersey, but when I try to
I am trying to produce a XSSFWorkbook using Jersey. I have tried the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.