This is my parent pom.xml:
[...]
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-war-plugin</artifactId>
  <version>2.0</vers开发者_C百科ion>
  <configuration>
    <archive>
      <manifestEntries>
        <SCM-Revision>${buildNumber}</SCM-Revision>
      </manifestEntries>
    </archive>
  </configuration>
</plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jar-plugin</artifactId>
  <version>2.0</version>
  <configuration>
    <archive>
      <manifestEntries>
        <SCM-Revision>${buildNumber}</SCM-Revision>
      </manifestEntries>
    </archive>
  </configuration>
</plugin>
[...]
As you see, maven archiver is configured twice, with identically same parameters. Is it possible to avoid such duplication and configure it only once?
ps. I'm ready to migrate to Maven 3 to solve this problem.
AFAIK, there's no good way. You can write your own Maven plugin and invoke WAR and JAR plugins with Mojo Executor: http://code.google.com/p/mojo-executor/ This is a more general problem with Maven 2: it doesn't allow any POM code reuse expect properties, and custom plugins. AFAIK things are going to improve with Maven 3.
Looks like Maven 3 Mixins is exactly for this purpose...
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论