将来自不同目录的Maven产品包含到项目directoy中

时间:2016-12-16 16:45:12

标签: maven maven-2 maven-plugin maven-assembly-plugin

我的问题我在x目录中有一个项目,在x / y目录中有另一个maven项目。现在,我如何从y目录

中的项目中为x目录中的项目生成jar文件

1 个答案:

答案 0 :(得分:0)

您可以使用项目的pom.xml中的jar-plugin来修改输出jar的位置 -

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-jar-plugin</artifactId>
      <version>3.0.2</version>
      <configuration>
        <outputDirectory>/x/y</outputDirectory> <!-- specify the relative desired path here -->
      </configuration>
    </plugin>
  </plugins>
</build>
相关问题