dimanche 3 mai 2015

Maven build error with Jersey test framework

i'm currently working on a simple Java REST Service that must be deployed on Heroku. I need to do some tests, so i try to integrate Jersey test framework to my web service.

But when i run mvn clean install, i keep getting a build error. I already searched it, but at this point, i'm clueless.


Here is it (with mvn -e clean install) :

[INFO] ------------------------------------------------------------------------                                                         
[ERROR] BUILD ERROR                                                                                                                     
[INFO] ------------------------------------------------------------------------                                                         
[INFO] Error building POM (may not be this project's POM).                                                                              


Project ID: null:jetty-project:pom:9.1.1.v20140108                                                                                      

Reason: Cannot find parent: org.eclipse.jetty:jetty-parent for project: null:jetty-project:pom:9.1.1.v20140108 for project null:jetty-project:pom:9.1.1.v20140108                                                                                                               


[INFO] ------------------------------------------------------------------------                                                         
[INFO] Trace                                                                                                                            
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get dependency information: Unable to read the metadata file for artifact 'org.eclipse.jetty:jetty-server:jar': Cannot find parent: org.eclipse.jetty:jetty-parent for project: null:jetty-project:pom:9.1.1.v20140108 for project null:jetty-project:pom:9.1.1.v20140108                                                                             
  org.eclipse.jetty:jetty-server:jar:9.1.1.v20140108


And here are my pom.xml dependencies :

<dependencies>
    <dependency>
        <groupId>org.glassfish.jersey.containers</groupId>
        <artifactId>jersey-container-servlet</artifactId>
        <version>2.17</version>
    </dependency>

    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-servlet</artifactId>
        <version>9.2.10.v20150310</version>
    </dependency>

    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-webapp</artifactId>
        <version>9.2.10.v20150310</version>
    </dependency>

    <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>javax.ws.rs-api</artifactId>
        <version>2.0.1</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.hibernate.ogm</groupId>
        <artifactId>hibernate-ogm-mongodb</artifactId>
        <version>4.1.3.Final</version>
    </dependency>

    <dependency>
        <groupId>org.glassfish.jersey.media</groupId>
        <artifactId>jersey-media-json-jackson</artifactId>
        <version>2.17</version>
    </dependency>

    <dependency>
        <groupId>javax.persistence</groupId>
        <artifactId>persistence-api</artifactId>
        <version>1.0.2</version>
    </dependency>

    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>eclipselink</artifactId>
        <version>2.5.2</version>
    </dependency>

    <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
        <type>jar</type>
    </dependency>

    <dependency>
        <groupId>org.glassfish.jersey.test-framework.providers</groupId>
        <artifactId>jersey-test-framework-provider-jetty</artifactId>
        <version>2.17</version>
    </dependency>
</dependencies>


What i am doing wrong ? Could it be because of the jetty server Heroku uses ?

Best regards.

Aucun commentaire:

Enregistrer un commentaire