В настоящее время я работаю над простой службой REST Java, которая должна быть развернута на Heroku. Мне нужно сделать некоторые тесты, поэтому я пытаюсь интегрировать тестовую среду Джерси в свой веб-сервис.Ошибка сборки Maven с фреймворком теста Джерси
Но когда я запустил mvn clean install
, я продолжаю получать ошибку сборки. Я уже обыскал его, но на данный момент я не знаю.
Вот это (с 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
Edit: А вот мой pom.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.mycompagny.stockservice</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>StockService</artifactId>
<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>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals><goal>copy-dependencies</goal></goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
</project>
Что я делаю неправильно? Может быть, из-за сервера причала Heroku использует?
С уважением.
Ответ в полном pom.xml, лучше разместить его .. –
Где находится v20140108, ссылались ли вы на эту версию ранее? – smoggers
@BrianTopping Я просто добавил полный 'pom.xml' – Yoluk