0

I used the book "Build ing a Restufl WEb Service with Spring" chapter2 project. I imported the maven project in eclipse and I did a maven test and get the below error:

[WARNING] Some problems were encountered while building the effective model for com.packtpub.rest-with-spring:rest-with-spring-all:war:1.0.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.mortbay.jetty:jetty-maven-plugin is missing. @ com.packtpub.rest-with-spring:rest-with-spring-all:[unknown-version], C:\workspace_buildingRest\B04788_02_code\all\pom.xml, line 21, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

Here is my pom.xml

<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
    <groupId>com.packtpub.rest-with-spring</groupId>
    <artifactId>rest-with-spring</artifactId>
    <version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>rest-with-spring-all</artifactId>
<packaging>war</packaging>
<dependencies>
    <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>rest-with-spring-billing</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <classifier>classes</classifier>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <configuration>
                <useTestScope>true</useTestScope>
                <stopPort>8005</stopPort>
                <stopKey>DIE!</stopKey>
                <systemProperties>
                    <systemProperty>
                        <name>jetty.port</name>
                        <value>8080</value>
                    </systemProperty>
                </systemProperties>
            </configuration>
        </plugin>
    </plugins>
</build>

Any help or hint is greatly appeciated it.

user1272936
  • 299
  • 1
  • 4
  • 15
  • There's no version element defined for your jetty-maven-plugin – Michael Peacock Jul 01 '16 at 20:39
  • The error message tells that `build.plugins.plugin.version` is missing. Indeed, when you look at your `jetty-maven-plugin` configuration, there is no `` specified. [Looks like the latest is 8.1.16.v20140903](http://repo1.maven.org/maven2/org/mortbay/jetty/jetty-maven-plugin/) so you can have that. Or upgrade to [9.3.9.v20160517 with `org.eclipse.jetty`](http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-maven-plugin/) groupId instead of `org.mortbay.jetty`. – Tunaki Jul 01 '16 at 20:40
  • Possible duplicate of [Maven 3 warnings about build.plugins.plugin.version](http://stackoverflow.com/questions/4123044/maven-3-warnings-about-build-plugins-plugin-version) – Tunaki Jul 01 '16 at 20:41
  • Can you please tell me exactly what I needed to add to the pom.xml above like what is the value of and where do I add it? – user1272936 Jul 01 '16 at 22:14
  • See the linked question. There's an example of it. – Tunaki Jul 02 '16 at 12:36

0 Answers0