我正在尝试编译 NHIN-Direct Secure 电子邮件网关。其中一个项目出现以下错误。
[ERROR] Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:1.12:wsgen (default) on project config-service: Execution default of goal org.codehaus.mojo:jaxws-maven-plugin:1.12:wsgen failed: Plugin org.codehaus.mojo:jaxws-maven-plugi
n:1.12 or one of its dependencies could not be resolved: Failed to collect dependencies for org.codehaus.mojo:jaxws-maven-plugin:jar:1.12 (): Failed to read artifact descriptor for com.sun.xml.ws:jaxws-tools:jar:2.1.7: Could not transfer ar
tifact com.sun.xml.ws:jaxws-tools:pom:2.1.7 from/to java.net (http://download.java.net/maven/1/): No connector available to access repository java.net (http://download.java.net/maven/1/) of type legacy using the available factories WagonRep
ositoryConnectorFactory -> [Help 1]
我浏览了无数论坛,这些论坛告诉我,sun 在管理 jaxws-maven-plugin 1.12 版的修订时主要是搞砸了。但是我还没有遇到可以帮助我更正我的 pom 文件的网站。这是pom文件。我究竟做错了什么?
<?xml version="1.0"?>
<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.nhind</groupId>
<artifactId>config-service</artifactId>
<version>1.2-SNAPSHOT</version>
<packaging>war</packaging>
<name>NHIN-Direct Configuration Service</name>
<description>NHIN-Direct Configuration Web Services</description>
<url>http://api.nhindirect.org/x/www/api.nhindirect.org/java/site/config/config-service/${project.version}</url>
<scm>
<url>https://nhin-d.googlecode.com/hg/java/config/config-service</url>
<connection>scm:hg:https://nhin-d.googlecode.com/hg/nhin-d/java/config/config-service</connection>
</scm>
<developers>
<developer>
<name>Pat Pyette</name>
<email>ppyette@inpriva.com</email>
<roles>
<role>owner</role>
</roles>
</developer>
<developer>
<name>Greg Meyer</name>
<id>GM2552</id>
<email>gm2552@cerner.com</email>
</developer>
<developer>
<name>Beau Grantham</name>
<email>bgrantha@harris.com</email>
</developer>
</developers>
<licenses>
<license>
<name>New BSD License</name>
<url>http://nhindirect.org/BSDLicense</url>
</license>
</licenses>
<issueManagement>
<system>Google Code</system>
<url>http://code.google.com/p/nhin-d/issues/list</url>
</issueManagement>
<dependencies>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-asm</artifactId>
<version>3.0.4.RELEASE</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.maven.artifact.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-activation_1.1_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.maven.artifact.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>3.0.4.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>com.springsource.org.apache.commons.logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.0.4.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>com.springsource.org.apache.commons.logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.0.4.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>com.springsource.org.apache.commons.logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>8.4-701.jdbc4</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.4.1.3</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.14</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.1</version>
<exclusions>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>config-store</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>cglib</artifactId>
<groupId>cglib</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>config-service-jar</artifactId>
<version>1.2-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<type>jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.1</version>
<type>jar</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<type>jar</type>
<scope>runtime</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>java.net2</id>
<name>Java.Net Maven2 Repository, hosts the javaee-api dependency</name>
<url>http://download.java.net/maven/2</url>
</repository>
</repositories>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<projectNameTemplate>[artifactId]-[version]</projectNameTemplate>
<wtpmanifest>true</wtpmanifest>
<wtpapplicationxml>true</wtpapplicationxml>
<wtpversion>2.0</wtpversion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0</version>
<configuration>
<tagBase>scm:hg:https://nhin-d.googlecode.com/hg/nhin-d/java/tags</tagBase>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.0.3</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<goals>
<goal>wsgen</goal>
</goals>
</execution>
</executions>
<configuration>
<sei>org.nhindirect.config.service.impl.ConfigurationServiceImpl</sei>
<verbose>true</verbose>
<destDir>src/main/java</destDir>
<resourceDestDir>src/main/resources/wsdl</resourceDestDir>
<protocol>soap1.1</protocol>
<keep>true</keep>
<genWsdl>true</genWsdl>
</configuration>
</plugin>
<plugin>
<!-- JETTY 6 PLUGIN FOR IN PLACE TESTING WITH MAVEN
Execute the mvn clean jetty:run
in a browser use http://localhost:8081/config-service/ to test the connection
and web app-->
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.14</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<contextPath>/config-service</contextPath>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8081</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<webApp>${basedir}/target/config-service-1.1</webApp>
<requestLog implementation="org.mortbay.jetty.NCSARequestLog">
<filename>target/yyyy_mm_dd.request.log</filename>
<retainDays>90</retainDays>
<append>true</append>
<extended>true</extended>
<logTimeZone>GMT</logTimeZone>
</requestLog>
</configuration>
</plugin>
<!-- for releases only
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.6.1</version>
<configuration>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
<docfilessubdirs>true</docfilessubdirs>
<detectJavaApiLink>true</detectJavaApiLink>
<detectLinks>true</detectLinks>
<source>1.6</source>
<show>protected</show>
</configuration>
<executions>
<execution>
<phase>package</phase>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>package</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
-->
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>config-store</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
</dependencyManagement>
<pluginRepositories>
<pluginRepository>
<url>http://download.java.net/maven/2</url>
<id>Java dot Net</id>
<layout>default</layout>
<name>Repository for JAX-WS commons</name>
</pluginRepository>
</pluginRepositories>
<properties>
<cxf.maven.artifact.version>2.2.9</cxf.maven.artifact.version>
</properties>
<distributionManagement>
<site>
<id>nhind-site</id>
<name>NHIN Direct API publication site</name>
<url>sftp://api.nhindirect.org/x/www/api.nhindirect.org/java/site/config/config-service/${project.version}</url>
</site>
<snapshotRepository>
<id>sonatype-snapshot</id>
<name>Sonatype OSS Maven SNAPSHOT Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
<repository>
<id>sonatype-release</id>
<name>Sonatype OSS Maven Release Repositor</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<uniqueVersion>false</uniqueVersion>
</repository>
</distributionManagement>
</project>