users@jersey.java.net

[Jersey] Re: Can't build using jersey test framework

From: Michal Gajdos <michal.gajdos_at_oracle.com>
Date: Mon, 20 Apr 2015 13:45:40 +0200

Hi ax487,

jersey-test-framework-provider-bundle is not released as a jar but as a pom. You need to mention that in your dependency declaration. Also artifacts of Jersey Test Framework should be declared in test scope:

    <dependency>
      <groupId>org.glassfish.jersey.test-framework</groupId>
      <artifactId>jersey-test-framework-core</artifactId>
      <version>${jersey-version}</version>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.glassfish.jersey.test-framework.providers</groupId>
      <artifactId>jersey-test-framework-provider-bundle</artifactId>
      <version>${jersey-version}</version>
      <type>pom</type>
      <scope>test</scope>
    </dependency>

HTH,
Michal

> On 20 Apr 2015, at 13:10, ax487 <ax487_at_gmx.de> wrote:
>
> Hello all,
>
> I am still trying to get unit tests working. My current problem is that
> I can't build using maven when I include the test framework. I attached
> th pom.xml. When I enter mvn compile the download of the files starts:
>
> Downloading:
> https://repo.maven.apache.org/maven2/org/glassfish/jersey/test-framework/providers/jersey-test-framework-provider-bundle/2.17/jersey-test-framework-provider$
> bundle-2.17.pom
> Downloaded:
> https://repo.maven.apache.org/maven2/org/glassfish/jersey/test-framework/providers/jersey-test-framework-provider-bundle/2.17/jersey-test-framework-provider-$
> undle-2.17.pom (5 KB at 9.6 KB/sec)
> Downloading:
> https://repo.maven.apache.org/maven2/org/glassfish/jersey/test-framework/providers/jersey-test-framework-provider-bundle/2.17/jersey-test-framework-provider$
> bundle-2.17.jar
>
> But after that there is a build failure:
>
> [ERROR] Failed to execute goal on project software: Could not resolve
> dependencies for project org.company.software:software:war:0.1.0: Could
> not find artifact
> org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-bundle:jar:2.17
> in central (https://repo.maven.apache.org/maven2) -> [Help 1]
>
> Does anyone know how to resolve the problem?
>
>
>
> ax487
> <pom.xml>