错误领域 = 插件>com.sun.jersey.contribs:maven-wadl-plugin:1.17
ERROR realm = plugin>com.sun.jersey.contribs:maven-wadl-plugin:1.17
我正在使用 Maven 3.3.3,但出现此错误。我在这里阅读了这个错误 但我没有将 servlet-api 作为直接依赖项和外部 maven 修复。
消息如下:
[ERROR] realm = plugin>com.sun.jersey.contribs:maven-wadl-plugin:1.17`
Execution generate of goal com.sun.jersey.contribs:maven-wadl-plugin:1.17:generate failed:
A required class was missing while executing com.sun.jersey.contribs:maven-wadl-plugin:1.17:generate:
Lcom/atlassian/extras/common/log/Logger$Log
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.sun.jersey.contribs:maven-wadl-plugin:1.17
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Desarrollo/maven_repo/com/sun/jersey/contribs/maven-wadl-plugin/1.17/maven-wadl-plugin-1.17.jar
[ERROR] urls[1] = file:/C:/Desarrollo/maven_repo/org/apache/maven/apache-maven/2.0.9/apache-maven-2.0.9.jar
[ERROR] urls[2] = file:/C:/Desarrollo/maven_repo/org/apache/maven/reporting/maven-reporting-api/2.0.9/maven-reporting-api-2.0.9.jar
[ERROR] urls[3] = file:/C:/Desarrollo/maven_repo/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-10/doxia-sink-api-1.0-alpha-10.jar
[ERROR] urls[4] = file:/C:/Desarrollo/maven_repo/junit/junit/4.8.2/junit-4.8.2.jar
[ERROR] urls[5] = file:/C:/Desarrollo/maven_repo/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
[ERROR] urls[6] = file:/C:/Desarrollo/maven_repo/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[7] = file:/C:/Desarrollo/maven_repo/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
[ERROR] urls[8] = file:/C:/Desarrollo/maven_repo/xerces/xercesImpl/2.6.1/xercesImpl-2.6.1.jar
[ERROR] urls[9] = file:/C:/Desarrollo/maven_repo/com/sun/jersey/jersey-servlet/1.17/jersey-servlet-1.17.jar
[ERROR] urls[10] = file:/C:/Desarrollo/maven_repo/com/sun/jersey/jersey-server/1.17/jersey-server-1.17.jar
[ERROR] urls[11] = file:/C:/Desarrollo/maven_repo/asm/asm/3.1/asm-3.1.jar
[ERROR] urls[12] = file:/C:/Desarrollo/maven_repo/com/sun/jersey/jersey-core/1.17/jersey-core-1.17.jar
这是 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>com.atlassian.plugin.aem-mur</groupId>
<artifactId>aem-mur-rest-service</artifactId>
<version>1.1</version>
<organization>
<name>Project Name</name>
<url>http://www.testrest.com/</url>
</organization>
<name>service-rest</name>
<description>test rest</description>
<packaging>atlassian-plugin</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>2.7.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.5.8</version>
</dependency>
<!-- WIRED TEST RUNNER DEPENDENCIES -->
<dependency>
<groupId>com.atlassian.plugins</groupId>
<artifactId>atlassian-plugins-osgi-testrunner</artifactId>
<version>${plugin.testrunner.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2-atlassian-1</version>
</dependency>
<dependency>
<groupId>com.atlassian.plugins.rest</groupId>
<artifactId>atlassian-rest-common</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.wink</groupId>
<artifactId>wink-client</artifactId>
<version>1.1.3-incubating</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>jta</artifactId>
<groupId>jta</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.atlassian.refapp</groupId>
<artifactId>atlassian-platform</artifactId>
<version>${refapp.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-refapp-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${refapp.version}</productVersion>
<systemProperties>
<property>
<name>atlassian.org.osgi.framework.bootdelegation</name>
<value>sun.*,com.sun.*</value>
</property>
</systemProperties>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<!-- GENERATE WADL -->
<plugin>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>maven-wadl-plugin</artifactId>
<version>1.17</version>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<wadlFile>${project.build.outputDirectory}/aem-mur.wadl</wadlFile>
<formatWadlFile>true</formatWadlFile>
<baseUri>http://localhost:9999/jira/rest</baseUri>
<packagesResourceConfig>
<param>com.test.jira.aemmurrestservice</param>
</packagesResourceConfig>
<wadlGenerators>
<wadlGeneratorDescription>
<className>com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc</className>
<properties>
<property>
<name>applicationDocsFile</name>
<value>${basedir}/src/main/doc/application-doc.xml</value>
</property>
</properties>
</wadlGeneratorDescription>
<wadlGeneratorDescription>
<className>com.sun.jersey.server.wadl.generators.WadlGeneratorGrammarsSupport</className>
<properties>
<property>
<name>grammarsFile</name>
<value>${basedir}/src/main/doc/application-grammars.xml</value>
</property>
</properties>
</wadlGeneratorDescription>
</wadlGenerators>
</configuration>
</plugin>
<!-- Build the JAR with dependencies -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<refapp.version>2.19.2</refapp.version>
<amps.version>5.0.18</amps.version>
<plugin.testrunner.version>1.1.2</plugin.testrunner.version>
<jira.version>6.3.9</jira.version>
</properties>
</project>
我用 atlassian-extras 库解决了这个问题。
<dependency>
<groupId>com.atlassian.extras</groupId>
<artifactId>atlassian-extras</artifactId>
<version>2.6</version>
</dependency>
我正在使用 Maven 3.3.3,但出现此错误。我在这里阅读了这个错误 但我没有将 servlet-api 作为直接依赖项和外部 maven 修复。
消息如下:
[ERROR] realm = plugin>com.sun.jersey.contribs:maven-wadl-plugin:1.17`
Execution generate of goal com.sun.jersey.contribs:maven-wadl-plugin:1.17:generate failed:
A required class was missing while executing com.sun.jersey.contribs:maven-wadl-plugin:1.17:generate:
Lcom/atlassian/extras/common/log/Logger$Log
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.sun.jersey.contribs:maven-wadl-plugin:1.17
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Desarrollo/maven_repo/com/sun/jersey/contribs/maven-wadl-plugin/1.17/maven-wadl-plugin-1.17.jar
[ERROR] urls[1] = file:/C:/Desarrollo/maven_repo/org/apache/maven/apache-maven/2.0.9/apache-maven-2.0.9.jar
[ERROR] urls[2] = file:/C:/Desarrollo/maven_repo/org/apache/maven/reporting/maven-reporting-api/2.0.9/maven-reporting-api-2.0.9.jar
[ERROR] urls[3] = file:/C:/Desarrollo/maven_repo/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-10/doxia-sink-api-1.0-alpha-10.jar
[ERROR] urls[4] = file:/C:/Desarrollo/maven_repo/junit/junit/4.8.2/junit-4.8.2.jar
[ERROR] urls[5] = file:/C:/Desarrollo/maven_repo/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
[ERROR] urls[6] = file:/C:/Desarrollo/maven_repo/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[7] = file:/C:/Desarrollo/maven_repo/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
[ERROR] urls[8] = file:/C:/Desarrollo/maven_repo/xerces/xercesImpl/2.6.1/xercesImpl-2.6.1.jar
[ERROR] urls[9] = file:/C:/Desarrollo/maven_repo/com/sun/jersey/jersey-servlet/1.17/jersey-servlet-1.17.jar
[ERROR] urls[10] = file:/C:/Desarrollo/maven_repo/com/sun/jersey/jersey-server/1.17/jersey-server-1.17.jar
[ERROR] urls[11] = file:/C:/Desarrollo/maven_repo/asm/asm/3.1/asm-3.1.jar
[ERROR] urls[12] = file:/C:/Desarrollo/maven_repo/com/sun/jersey/jersey-core/1.17/jersey-core-1.17.jar
这是 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>com.atlassian.plugin.aem-mur</groupId>
<artifactId>aem-mur-rest-service</artifactId>
<version>1.1</version>
<organization>
<name>Project Name</name>
<url>http://www.testrest.com/</url>
</organization>
<name>service-rest</name>
<description>test rest</description>
<packaging>atlassian-plugin</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>2.7.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.5.8</version>
</dependency>
<!-- WIRED TEST RUNNER DEPENDENCIES -->
<dependency>
<groupId>com.atlassian.plugins</groupId>
<artifactId>atlassian-plugins-osgi-testrunner</artifactId>
<version>${plugin.testrunner.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2-atlassian-1</version>
</dependency>
<dependency>
<groupId>com.atlassian.plugins.rest</groupId>
<artifactId>atlassian-rest-common</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.wink</groupId>
<artifactId>wink-client</artifactId>
<version>1.1.3-incubating</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>jta</artifactId>
<groupId>jta</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.atlassian.refapp</groupId>
<artifactId>atlassian-platform</artifactId>
<version>${refapp.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-refapp-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${refapp.version}</productVersion>
<systemProperties>
<property>
<name>atlassian.org.osgi.framework.bootdelegation</name>
<value>sun.*,com.sun.*</value>
</property>
</systemProperties>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<!-- GENERATE WADL -->
<plugin>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>maven-wadl-plugin</artifactId>
<version>1.17</version>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<wadlFile>${project.build.outputDirectory}/aem-mur.wadl</wadlFile>
<formatWadlFile>true</formatWadlFile>
<baseUri>http://localhost:9999/jira/rest</baseUri>
<packagesResourceConfig>
<param>com.test.jira.aemmurrestservice</param>
</packagesResourceConfig>
<wadlGenerators>
<wadlGeneratorDescription>
<className>com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc</className>
<properties>
<property>
<name>applicationDocsFile</name>
<value>${basedir}/src/main/doc/application-doc.xml</value>
</property>
</properties>
</wadlGeneratorDescription>
<wadlGeneratorDescription>
<className>com.sun.jersey.server.wadl.generators.WadlGeneratorGrammarsSupport</className>
<properties>
<property>
<name>grammarsFile</name>
<value>${basedir}/src/main/doc/application-grammars.xml</value>
</property>
</properties>
</wadlGeneratorDescription>
</wadlGenerators>
</configuration>
</plugin>
<!-- Build the JAR with dependencies -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<refapp.version>2.19.2</refapp.version>
<amps.version>5.0.18</amps.version>
<plugin.testrunner.version>1.1.2</plugin.testrunner.version>
<jira.version>6.3.9</jira.version>
</properties>
</project>
我用 atlassian-extras 库解决了这个问题。
<dependency>
<groupId>com.atlassian.extras</groupId>
<artifactId>atlassian-extras</artifactId>
<version>2.6</version>
</dependency>