2009-05-28 170 views

回答

33

你会使用Maven归档:

<plugins> 
    <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-jar-plugin</artifactId> 
     <configuration> 
     <archive> 
      <manifest> 
      <addDefaultImplementationEntries>true</addDefaultImplementationEntries> 
      </manifest> 
     </archive> 
     </configuration> 
    </plugin> 
    </plugins> 

这将增加以下清单文件:

Implementation-Title: ${pom.name} 
Implementation-Version: ${pom.version} 
Implementation-Vendor-Id: ${pom.groupId} 
Implementation-Vendor: ${pom.organization.name} 
+1

$ {} buildNumber?这个变量怎么样? – dfa 2009-05-28 16:16:38

+0

对不起,这是不需要的。我只是显示其他实现值来设置。 – Ascalonian 2009-05-28 16:18:48

+0

感谢您的帮助! – izb 2009-05-29 08:12:06