执行org.codehaus.mojo时丢失:tomcat-maven-plugin:1.1:run:javax / annotation / security / DeclareRoles

时间:2016-06-22 07:11:08

标签: java eclipse spring maven tomcat8

[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:run (default-cli) on project spring-jqgrid-mongo: Execution default-cli of goal org.codehaus.mojo:tomcat-maven-plugin:1.1:run failed: A required class was missing while executing org.codehaus.mojo:tomcat-maven-plugin:1.1:run: javax/annotation/security/DeclareRoles


ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.codehaus.mojo:tomcat-maven-plugin:1.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/User/.m2/repository/org/codehaus/mojo/tomcat-maven-plugin/1.1/tomcat-maven-plugin-1.1.jar
[ERROR] urls[1] = file:/C:/Users/User/.m2/repository/org/apache/maven/maven-archiver/2.2/maven-archiver-2.2.jar
[ERROR] urls[2] = file:/C:/Users/User/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar
[ERROR] urls[3] = file:/C:/Users/User/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
[ERROR] urls[4] = file:/C:/Users/User/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar
[ERROR] urls[5] = file:/C:/Users/User/.m2/repository/org/apache/tomcat/catalina/6.0.29/catalina-6.0.29.jar
[ERROR] urls[6] = file:/C:/Users/User/.m2/repository/org/apache/tomcat/catalina-ha/6.0.29/catalina-ha-6.0.29.jar
[ERROR] urls[7] = file:/C:/Users/User/.m2/repository/org/apache/tomcat/juli/6.0.29/juli-6.0.29.jar
[ERROR] urls[8] = file:/C:/Users/User/.m2/repository/org/apache/tomcat/tribes/6.0.29/tribes-6.0.29.jar
[ERROR] urls[9] = file:/C:/Users/User/.m2/repository/org/apache/tomcat/el-api/6.0.29/el-api-6.0.29.jar
[ERROR] urls[10] = file:/C:/Users/User/.m2/repository/org/apache/tomcat/jasper/6.0.29/jasper-6.0.29.jar
[ERROR] urls[11] = file:/C:/Users/User/.m2/repository/org/apache/tomcat/jasper-el/6.0.29/jasper-el-6.0.29.jar
[ERROR] urls[12] = file:/C:/Users/User/.m2/repository/org/apache/tomcat/jasper-jdt/6.0.29/jasper-jdt-6.0.29.jar
[ERROR] urls[13] = file:/C:/Users/User/.m2/repository/org/apache/tomcat/jsp-api/6.0.29/jsp-api-6.0.29.jar
[ERROR] urls[14] = file:/C:/Users/User/.m2/repository/org/apache/tomcat/servlet-api/6.0.29/servlet-api-6.0.29.jar
[ERROR] urls[15] = file:/C:/Users/User/.m2/repository/org/apache/tomcat/coyote/6.0.29/coyote-6.0.29.jar
[ERROR] urls[16] = file:/C:/Users/User/.m2/repository/org/apache/tomcat/dbcp/6.0.29/dbcp-6.0.29.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------: javax.annotation.security.DeclareRoles
[ERROR] -> [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/PluginContainerException

的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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.krams.tutorial</groupId>
  <artifactId>spring-jqgrid-mongo</artifactId>
  <packaging>war</packaging>
  <version>1.0.0-SNAPSHOT</version>
  <name>spring-jqgrid-mongo Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.8.1</version>
        <type>jar</type>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>3.0.5.RELEASE</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>3.0.5.RELEASE</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.14</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>3.0.5.RELEASE</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-core-asl</artifactId>
        <version>1.6.3</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>jstl</groupId>
        <artifactId>jstl</artifactId>
        <version>1.1.2</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>taglibs</groupId>
        <artifactId>standard</artifactId>
        <version>1.1.2</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    <dependency>
    <groupId>org.mongodb</groupId>
    <artifactId>mongo-java-driver</artifactId>
    <version>3.2.2</version>
    </dependency>

    <dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <version>3.1.0</version>
    <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>3.0.5.RELEASE</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-jaxrs</artifactId>
        <version>1.6.3</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
  </dependencies>
  <build>
    <finalName>spring-jqgrid-mongo</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
            </configuration>
        </plugin>
    </plugins>    
  </build>
</project>

我该如何解决这个问题?

0 个答案:

没有答案