我在自己的配置文件运行wsgen,因为我不希望它运行每次我建立产品的时间。但我发现了一个错误关于丢失的版本,当我运行它:Maven:如何获得配置文件以从父pom继承dependencyManagement标记?
$ MVN包-P WSGEN [INFO]扫描的项目... [错误] 构建无法读取1个项目 - > [帮助1] [错误] [错误] project project-ejb:2.3.15-SNAPSHOT (C:\ Projects \ MyProject \ pom.xml)有1个错误 [错误]
'build.plugins.plugin [org.jvnet.jax -WS-公地:JAXWS-行家-插件] .dependencies.dependency.version” 为org.glassfish:javax.javaee:罐子已丢失。 @线167,柱41 [错误] [ERROR]要查看错误的完整堆栈跟踪,重新运行 的Maven用-e开关。 [错误]使用-X开关重新运行Maven至 可启用完整的调试日志记录。 [错误] [错误]更多有关 错误和可能的解决方案,请仔细阅读以下条款: [错误] [说明1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
这是孩子POM的片段(聚甲醛与配置文件):
<packaging>ejb</packaging>
<parent>
<artifactId>MyProject</artifactId>
<groupId>project</groupId>
<version>2.3.15-SNAPSHOT</version>
</parent>
<profiles>
<profile>
<id>wsgen</id>
<build>
<plugins>
<plugin>
<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.1</version>
<executions>
...
</executions>
<dependencies>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.javaee</artifactId>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
但是,在父POM我定义dependencyManagement
标签下其版本的依赖。
我觉得发生了什么是个人资料,因此认为缺少依赖的版本号不继承父的dependencyManagement
标签。有没有办法让配置文件继承父级?
所以你说这有什么好做的轮廓? –
我不这么认为。 – asgoth
我认为你是对的,因为当我直接在配置文件下定义dependencyManagement标记时,错误没有改变。谢谢您的帮助。 –