想要了解Maven POM.xml中使用标记的内容和原因。标签有什么意义?
示例:
Flamegraph
答案 0 :(得分:1)
默认情况下,Maven POM中没有workingDirectory
元素,有关您可以在POM中使用的元素的详细信息,请参阅Maven POM reference。
但是,某些插件配置中可能存在workingDirectory
,例如Maven Exec Plugin上的exec:exec
目标,例如:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<workingDirectory>target/</workingDirectory>
<arguments>
<argument>-classpath</argument>
<classpath>
<dependency>commons-io:commons-io</dependency>
<dependency>commons-lang:commons-lang</dependency>
</classpath>
<argument>com.example.Main</argument>
</arguments>
</configuration>
</plugin>
将从java
目录执行target
。但是,在您的示例中在编译器插件中添加workingDirectory
不会做任何事情 - 没有这样的配置。