我用plagins更新了我的pom.xml并得到了错误:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugin'. One of '{"http://maven.apache.org/POM/ 4.0.0":parent, "http://maven.apache.org/POM/4.0.0":description, "http://maven.apache.org/POM/4.0.0":prerequisites, "http://maven.apache.org/POM/4.0.0":issueManagement, "http://maven.apache.org/POM/4.0.0":ciManagement, "http:// maven.apache.org/POM/4.0.0":inceptionYear, "http://maven.apache.org/POM/4.0.0":mailingLists, "http:// maven.apache.org/POM/4.0.0":developers, "http://maven.apache.org/POM/4.0.0":contributors, "http://maven.apache.org/ POM/4.0.0":licenses, "http://maven.apache.org/POM/4.0.0":scm, "http://maven.apache.org/POM/4.0.0":organization, "http://maven.apache.org/POM/4.0.0":build, "http://maven.apache.org/POM/4.0.0":profiles, "http://maven.apache.org/ POM/4.0.0":modules, "http://maven.apache.org/POM/4.0.0":repositories, "http://maven.apache.org/POM/ 4.0.0":pluginRepositories, "http://maven.apache.org/POM/4.0.0":reports, "http://maven.apache.org/POM/4.0.0":reporting, "http://maven.apache.org/POM/4.0.0":dependencyManagement, "http://maven.apache.org/POM/ 4.0.0":distributionManagement}' is expected.
这是pom.xml文件:
4.0.0
com
test
1.0-SNAPSHOT
jar
test
http://maven.apache.org
UTF-8
junit
junit
4.8.2
test
jar
oracle
ojdbc16
11.2.0.1.0
jar
org.apache.cxf
cxf-java2ws-plugin
2.5.1
org.apache.cxf
cxf-rt-frontend-jaxws
2.5.1
com.company.app
services
0.0.1-SNAPSHOT
generate-sources
generate-sources
com.company.app.services.WebServiceBean
true
java2ws
org.apache.cxf
cxf-codegen-plugin
2.5.1
process-sources
generate-sources
${project.build.directory}/generated/wsdl/WebServiceBean.wsdl
-p
com.company.app.services.client.model
wsdl2java
怎么解决这个?
您必须在pom文件中添加以下部分:
<build>
<plugins>
<plugin>
...
</plugin>
</plugins>
</build>