gpt4 book ai didi

java - Maven:build ear:跳过编译阶段?

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:53:53 25 4
gpt4 key购买 nike

这是POM的一部分
...

   <groupId>com.soft</groupId>
<artifactId>config-ear</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>ear</packaging>

<name>Enterprise Application</name>
<url>http://maven.apache.org</url>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>wsgen</goal>
</goals>
<configuration>
<sei>com.soft.WebService</sei>
<genWsdl>true</genWsdl>
<keep>true</keep>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.6</version>
<configuration>
<version>1.4</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
</configuration>
</plugin>
</plugins>
</build>
...

运行mvn clean install

[clean:clean]
Deleting directory D:\Development\config-ear\target
[ear:generate]
Generating application.xml
[resources:resources]
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory D:\Development\config-ear\src\main\resources
[jaxws:wsgen]
Class not found: "com.soft.WebService"

这个类存在于src/main/java/com/soft/WebService.java
编译阶段在哪里??

最佳答案

来自Maven Lifecycle Reference :

默认生命周期绑定(bind) - 打包耳

generate-resources  ear:generateApplicationXml
process-resources resources:resources
package ear:ear
install install:install
deploy deploy:deploy

如您所见,EAR 生命周期不包含编译阶段

关于java - Maven:build ear:跳过编译阶段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10335055/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com