maven-jaxb2-plugin episode of same project in Maven, possible?

廉价感情. 提交于 2019-12-02 00:28:54
<plugin>
  <groupId>org.jvnet.jaxb2.maven2</groupId>
  <artifactId>maven-jaxb2-plugin</artifactId>
  <version>0.8.1</version>
  <executions>
    <execution>
      <id>first</id>
      ...
      <configuration>
        <episodeFile>${some.path}/first.episode</episodeFile>
      </configuration>
    </execution>
    <execution>
      <id>second</id>
      ...
      <configuration>
        <args>
          <arg>-b</arg>
          <arg>${some.path}/first.episode</arg>
        </args>
      </configuration>
    </execution>
  </executions>
</plugin>

http://docs.oracle.com/javase/6/docs/technotes/tools/share/xjc.html http://weblogs.java.net/blog/kohsuke/archive/2006/09/separate_compil.html

You can simply define two executions of the same plugin like this:

  <plugin>
    <artifactId>maven-whatever-plugin</artifactId>
    <version>1.0</version>
    <executions>
      <execution>
        <id>execution1</id>
        <phase>test</phase>
        <configuration>
         ....
        </configuration>
        <goals>
          <goal>TheGoalYouNeed</goal>
        </goals>
        <phase>process-sources</phase>
      </execution>
      <execution>
        <id>execution2</id>
        <configuration>
           ...
        </configuration>
        <goals>
          <goal>TheGoalYouNeed</goal>
        </goals>
        <phase>process-sources</phase>
      </execution>
    </executions>
  </plugin>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!