使用maven 3.0.3执行wsgen任务时,编译失败

如何解决使用maven 3.0.3执行wsgen任务时,编译失败

| 我正在尝试编译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>
    

解决方法

        我尝试将jaxws-maven-plugin 1.12的版本切换为1.10,但该错误已解决。     ,        依赖项com.sun.xml.ws:jaxws-tools:jar:2.1.7确实位于
http://download.java.net/maven/1
,但是根据您发布的POM,仅定义了
http://download.java.net/maven/2
插件存储库,该库提供了版本中的jaxws-tools 2.2起。 因此,尝试将第二个pluginRepository添加到pluginRepositories中:
    <pluginRepository>
        <url>http://download.java.net/maven/1</url>
        <id>Java dot Net 1</id>
        <layout>legacy</layout>
        <name>Repository for JAX-WS tools</name>
    </pluginRepository>
    

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-