Hi,

I accidentally left out a : in  spring-boot:run the first time I tried to use 
Maven build to see how the application pan out.

Then, I did a clean but to no avail.

Here's the error message :

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Spring 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ IntegratedSpringDemo 
---
[INFO] Deleting C:\Users\Karen.Goh\Spring\target
[INFO] 
[INFO] --- cobertura-maven-plugin:2.7:clean (default) @ IntegratedSpringDemo ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.035 s
[INFO] Finished at: 2018-05-23T16:38:35+08:00
[INFO] Final Memory: 7M/113M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.codehaus.mojo:cobertura-maven-plugin:2.7:clean (default) on project 
IntegratedSpringDemo: Execution default of goal 
org.codehaus.mojo:cobertura-maven-plugin:2.7:clean failed: Plugin 
org.codehaus.mojo:cobertura-maven-plugin:2.7 or one of its dependencies could 
not be resolved: Could not find artifact com.sun:tools:jar:0 at specified path 
C:\Program Files\Java\jre1.8.0_161/../lib/tools.jar -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException\\

And then I added in this line in my pom.xml it is still showing me error :(

<dependency>
                        <groupId>com.sun</groupId>
                        <artifactId>tools</artifactId>
                        <version>1.8.0_151</version>
                        <scope>system</scope>
                        <systemPath>C:\Program 
Files\Java\jdk1.8.0_151</systemPath>
                </dependency>


Here's my full pom :

<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>
        <groupId>org.springframework.samples.service.service</groupId>
        <artifactId>Spring</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <packaging>war</packaging>
        <properties>

                <!-- Generic properties -->
                <java.version>1.8</java.version>
                
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

                <!-- Spring -->
                
<spring-framework.version>4.1.6.RELEASE</spring-framework.version>
                <spring-data-jpa.version>1.8.0.RELEASE</spring-data-jpa.version>
                
<spring-data-jdbc.version>1.1.0.RELEASE</spring-data-jdbc.version>


                <!-- Java EE / Java SE dependencies -->
                <jsp.version>2.2</jsp.version>
                <jstl.version>1.2</jstl.version>
                <tomcat.servlet.version>7.0.47</tomcat.servlet.version>
                <jaxb-impl.version>2.2.7</jaxb-impl.version>

                <!-- Hibernate / JPA -->
                <hibernate.version>4.3.8.Final</hibernate.version>

                <!-- Bean validation -->
                
<hibernate-validator.version>4.3.1.Final</hibernate-validator.version>

                <!-- Database access -->
                <tomcat-jdbc.version>7.0.42</tomcat-jdbc.version>
                <ehcache.version>2.6.10</ehcache.version>
                <hsqldb.version>2.3.2</hsqldb.version>

                <!-- AOP -->
                <aspectj.version>1.8.5</aspectj.version>

                <!-- Sitemesh -->
                <sitemesh.version>2.4.2</sitemesh.version>

                <!-- Logging -->
                <logback.version>1.1.3</logback.version>
                <slf4j.version>1.7.12</slf4j.version>

                <!-- JSon -->
                <json-path.version>2.0.0</json-path.version>

                <!-- Test -->
                <junit.version>4.12</junit.version>
                <assertj.version>3.0.0</assertj.version>

                <!-- Dates -->
                <jodatime-hibernate.version>1.3</jodatime-hibernate.version>
                <jodatime-jsptags.version>1.1.1</jodatime-jsptags.version>
                <jodatime.version>2.7</jodatime.version>
                
<jadira-usertype-core.version>3.2.0.GA</jadira-usertype-core.version>


                <!-- Web dependencies -->
                <webjars-bootstrap.version>2.3.0</webjars-bootstrap.version>
                <webjars-jquery-ui.version>1.10.3</webjars-jquery-ui.version>
                <webjars-jquery.version>2.0.3-1</webjars-jquery.version>
                <dandelion.version>0.10.1</dandelion.version>

                <mysql.version>5.1.22</mysql.version>

                <cobertura.version>2.7</cobertura.version>

        </properties>

        <dependencies>
                <dependency>
                        <groupId>org.jadira.usertype</groupId>
                        <artifactId>usertype.core</artifactId>
                        <version>${jadira-usertype-core.version}</version>
                </dependency>
                <dependency>
                        <groupId>org.apache.tomcat</groupId>
                        <artifactId>tomcat-servlet-api</artifactId>
                        <version>${tomcat.servlet.version}</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>javax.servlet</groupId>
                        <artifactId>javax.servlet-api</artifactId>
                        <version>3.1.0</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>com.sun</groupId>
                        <artifactId>tools</artifactId>
                        <version>1.8.0_151</version>
                        <scope>system</scope>
                        <systemPath>C:\Program 
Files\Java\jdk1.8.0_151</systemPath>
                </dependency>
                <dependency>
                        <groupId>org.apache.tomcat.embed</groupId>
                        <artifactId>tomcat-embed-jasper</artifactId>
                        <version>8.5.24</version>
                        <scope>provided</scope>
                </dependency>

                <dependency>
                        <groupId>javax.servlet.jsp</groupId>
                        <artifactId>jsp-api</artifactId>
                        <version>2.2</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>javax.servlet</groupId>
                        <artifactId>jstl</artifactId>
                        <version>1.2</version>
                </dependency>
                <dependency>
                        <groupId>org.glassfish.web</groupId>
                        <artifactId>jstl-impl</artifactId>
                        <version>1.2</version>
                </dependency>
                <dependency>
                        <groupId>com.sun.xml.bind</groupId>
                        <artifactId>jaxb-impl</artifactId>
                        <version>${jaxb-impl.version}</version>
                        <scope>provided</scope>
                </dependency>
                <!-- JSon -->
                <dependency>
                        <groupId>com.jayway.jsonpath</groupId>
                        <artifactId>json-path</artifactId>
                        <version>${json-path.version}</version>
                        <scope>test</scope>
                </dependency>
                <!-- SPRING, SPRING, SPRINGITY SPRING -->
                <dependency>
                        <groupId>org.springframework.data</groupId>
                        <artifactId>spring-data-jpa</artifactId>
                        <version>${spring-data-jpa.version}</version>
                        <exclusions>
                                <exclusion>
                                        <groupId>org.springframework</groupId>
                                        <artifactId>*</artifactId>
                                </exclusion>
                                <!-- because Spring Data usually comes with a 
slightly older version 
                                        of Spring -->
                        </exclusions>
                </dependency>

                <dependency>
                        <groupId>org.springframework.data</groupId>
                        <artifactId>spring-data-jdbc-core</artifactId>
                        <version>${spring-data-jdbc.version}</version>
                        <exclusions>
                                <exclusion>
                                        <groupId>org.springframework</groupId>
                                        <artifactId>*</artifactId>
                                </exclusion>
                                <!-- because Spring Data usually comes with a 
slightly older version 
                                        of Spring -->
                        </exclusions>
                </dependency>

                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-jdbc</artifactId>
                        <version>${spring-framework.version}</version>
                </dependency>
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-aop</artifactId>
                        <version>${spring-framework.version}</version>
                </dependency>
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-webmvc</artifactId>
                        <version>${spring-framework.version}</version>
                </dependency>
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-tx</artifactId>
                        <version>${spring-framework.version}</version>
                </dependency>
                <!-- used for EhCacheCacheManager -->
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-context-support</artifactId>
                        <version>${spring-framework.version}</version>
                </dependency>
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-orm</artifactId>
                        <version>${spring-framework.version}</version>
                </dependency>
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-oxm</artifactId>
                        <version>${spring-framework.version}</version>
                        <exclusions>
                                <exclusion>
                                        <groupId>commons-lang</groupId>
                                        <artifactId>commons-lang</artifactId>
                                </exclusion>
                        </exclusions>
                </dependency>

                <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjrt</artifactId>
                        <version>${aspectj.version}</version>
                </dependency>
                <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                        <scope>runtime</scope>
                </dependency>

                <!-- Database connection pool -->
                <dependency>
                        <groupId>org.apache.tomcat</groupId>
                        <artifactId>tomcat-jdbc</artifactId>
                        <version>${tomcat-jdbc.version}</version>
                        <scope>runtime</scope>
                </dependency>

                <dependency>
                        <groupId>mysql</groupId>
                        <artifactId>mysql-connector-java</artifactId>
                        <version>5.1.35</version>
                </dependency>
                <!-- Site Mesh -->
                <dependency>
                        <groupId>opensymphony</groupId>
                        <artifactId>sitemesh</artifactId>
                        <version>${sitemesh.version}</version>
                </dependency>
                <!-- Logging with SLF4J & LogBack -->
                <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                        <version>${slf4j.version}</version>
                        <scope>compile</scope>
                </dependency>
                <dependency>
                        <groupId>ch.qos.logback</groupId>
                        <artifactId>logback-classic</artifactId>
                        <version>${logback.version}</version>
                        <scope>runtime</scope>
                </dependency>

                <!-- Date and Time -->
                <dependency>
                        <groupId>joda-time</groupId>
                        <artifactId>joda-time</artifactId>
                        <version>${jodatime.version}</version>
                </dependency>
                <dependency>
                        <groupId>joda-time</groupId>
                        <artifactId>joda-time-hibernate</artifactId>
                        <version>${jodatime-hibernate.version}</version>
                </dependency>
                <dependency>
                        <groupId>joda-time</groupId>
                        <artifactId>joda-time-jsptags</artifactId>
                        <version>${jodatime-jsptags.version}</version>
                </dependency>

                <!-- Databases - Uses HSQL by default -->
                <!-- <dependency> <groupId>mysql</groupId> 
<artifactId>mysql-connector-java</artifactId> 
                        <version>${mysql.version}</version> </dependency> -->
                <dependency>
                        <groupId>org.hsqldb</groupId>
                        <artifactId>hsqldb</artifactId>
                        <version>${hsqldb.version}</version>
                        <scope>runtime</scope>
                </dependency>
                <!-- For MySql only -->
                <!-- <dependency> <groupId>mysql</groupId> 
<artifactId>mysql-connector-java</artifactId> 
                        <version>${mysql.version}</version> </dependency> -->
                <!-- HIBERNATE -->
                <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-entitymanager</artifactId>
                        <version>${hibernate.version}</version>
                </dependency>
                <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-validator</artifactId>
                        <version>${hibernate-validator.version}</version>
                </dependency>

                <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-ehcache</artifactId>
                        <version>${hibernate.version}</version>
                </dependency>
                <dependency>
                        <groupId>net.sf.ehcache</groupId>
                        <artifactId>ehcache-core</artifactId>
                        <version>${ehcache.version}</version>
                        <exclusions>
                                <exclusion>
                                        <groupId>commons-logging</groupId>
                                        <artifactId>commons-logging</artifactId>
                                </exclusion>
                        </exclusions>
                </dependency>
                <!-- Webjars (static dependencies distributed as JAR files) -->
                <dependency>
                        <groupId>org.webjars</groupId>
                        <artifactId>bootstrap</artifactId>
                        <version>${webjars-bootstrap.version}</version>
                </dependency>
                <dependency>
                        <groupId>org.webjars</groupId>
                        <artifactId>jquery-ui</artifactId>
                        <version>${webjars-jquery-ui.version}</version>
                </dependency>
                <dependency>
                        <groupId>org.webjars</groupId>
                        <artifactId>jquery</artifactId>
                        <version>${webjars-jquery.version}</version>
                </dependency>

                <!-- Test Artifacts -->
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-test</artifactId>
                        <version>${spring-framework.version}</version>
                        <scope>test</scope>
                </dependency>
                <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>${junit.version}</version>
                        <scope>test</scope>
                </dependency>
                <dependency>
                        <groupId>org.assertj</groupId>
                        <artifactId>assertj-core</artifactId>
                        <version>${assertj.version}</version>
                </dependency>

                <!-- Dandelion -->
                <dependency>
                        <groupId>com.github.dandelion</groupId>
                        <artifactId>datatables-jsp</artifactId>
                        <version>${dandelion.version}</version>
                </dependency>
                <dependency>
                        <groupId>com.github.dandelion</groupId>
                        <artifactId>datatables-export-itext</artifactId>
                        <version>${dandelion.version}</version>
                </dependency>
        </dependencies>

        <!-- Maven plugin versions are mentioned in order to guarantee the 
build 
                reproducibility in the long term -->
        <build>
                <defaultGoal>install</defaultGoal>
                <testResources>
                        <testResource>
                                <!-- declared explicitly so Spring config files 
can be placed next to 
                                        their corresponding JUnit test class -->
                                
<directory>${project.basedir}/src/test/java</directory>
                        </testResource>
                        <testResource>
                                
<directory>${project.basedir}/src/test/resources</directory>
                        </testResource>
                </testResources>
                <plugins>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-compiler-plugin</artifactId>
                                <version>3.0</version>
                                <configuration>
                                        <compilerArguments>
                                                <Xlint />
                                        </compilerArguments>
                                        <verbose>true</verbose>
                                        <source>${java.version}</source>
                                        <target>${java.version}</target>
                                        <showWarnings>true</showWarnings>
                                </configuration>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-surefire-plugin</artifactId>
                                <version>2.13</version>
                                <configuration>
                                        <includes>
                                                
<include>**/*Tests.java</include>
                                        </includes>
                                </configuration>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-war-plugin</artifactId>
                                <version>2.3</version>
                                <configuration>
                                        <warName>integratedspringdemo</warName>
                                </configuration>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-eclipse-plugin</artifactId>
                                <version>2.9</version>
                                <configuration>
                                        <downloadSources>true</downloadSources>
                                        
<downloadJavadocs>true</downloadJavadocs>
                                        <wtpversion>2.0</wtpversion>
                                        <sourceIncludes>
                                                
<sourceInclude>**/*.*</sourceInclude>
                                        </sourceIncludes>
                                        <additionalBuildcommands>
                                                <buildCommand>
                                                        
<name>org.springframework.ide.eclipse.core.springbuilder</name>
                                                </buildCommand>
                                                <buildCommand>
                                                        
<name>org.eclipse.m2e.core.maven2Builder</name>
                                                </buildCommand>
                                        </additionalBuildcommands>
                                        <additionalProjectnatures>
                                                
<projectnature>org.eclipse.jdt.core.javanature</projectnature>
                                                
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
                                                
<projectnature>org.eclipse.m2e.core.maven2Nature</projectnature>
                                        </additionalProjectnatures>
                                </configuration>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-assembly-plugin</artifactId>
                                <version>2.4</version>
                                <configuration>
                                        <descriptorRefs>
                                                
<descriptorRef>jar-with-dependencies</descriptorRef>
                                        </descriptorRefs>
                                </configuration>
                        </plugin>
                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>cobertura-maven-plugin</artifactId>
                                <version>${cobertura.version}</version>
                                <configuration>
                                        <check />
                                </configuration>
                                <executions>
                                        <execution>
                                                <goals>
                                                        <goal>clean</goal>
                                                        <goal>check</goal>
                                                </goals>
                                        </execution>
                                </executions>
                        </plugin>
                </plugins>
        </build>
        <reporting>
                <plugins>

                        <!-- integrate maven-cobertura-plugin to project site 
-->
                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>cobertura-maven-plugin</artifactId>
                                <version>${cobertura.version}</version>
                                <configuration>
                                        <formats>
                                                <format>html</format>
                                        </formats>
                                </configuration>
                        </plugin>
                </plugins>
        </reporting>

        <url>index</url>

</project>
                        





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to