首页 > 代码库 > java应用maven插件动态生成webservice代码
java应用maven插件动态生成webservice代码
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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.wisdombud</groupId> <artifactId>com.wisdombud.ws</artifactId> <version>0.0.1-SNAPSHOT</version> <properties> <guava.version>14.0.1</guava.version> <spring.version>3.0.6.RELEASE</spring.version> <cxf.version>2.7.5</cxf.version> <junit.version>4.8.1</junit.version> <slf4j.version>1.6.2</slf4j.version> <struts.version>2.2.3.1</struts.version> <zyzxbm.version>0.0.1-SNAPSHOT</zyzxbm.version> </properties> <build> <plugins> <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>${cxf.version}</version> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <sourceRoot>${project.build.directory}/generated/cxf</sourceRoot> <wsdlOptions> <wsdlOption> <wsdl>http://172.16.20.100/humiture/overt/MsgManager?wsdl</wsdl> </wsdlOption> </wsdlOptions> </configuration> <goals> <goal>wsdl2java</goal> </goals> </execution> </executions> </plugin> </plugins> <pluginManagement> <plugins> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.apache.cxf</groupId> <artifactId>cxf-java2ws-plugin</artifactId> <versionRange>[2.4.3,)</versionRange> <goals> <goal>java2ws</goal> </goals> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> <pluginExecution> <pluginExecutionFilter> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <versionRange>[2.7.5,)</versionRange> <goals> <goal>wsdl2java</goal> </goals> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> </build></project>
java应用maven插件动态生成webservice代码
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。