How to set author name in maven project?

packaged maven project contains the file META-INF / manifest.mf, and in the "Built-in" field is the username of the current user. Where or what to set the author name, so maven will use this instead of the login name?

+7
maven-2 manifest author
source share
2 answers

This can be overwritten in your pom.xml by adding a manifestEntries section, for example:

 <project ...> ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>3.0.0</version> <configuration> <archive> <index>true</index> <manifest> <addClasspath>true</addClasspath> </manifest> <manifestEntries> <Built-By>${user.name}</Built-By> </manifestEntries> </archive> </configuration> </plugin> </plugins> </build> </project> 
+7
source share

When called from the command line, the following will work:

 mvn -Duser.name=<username> clean install 

In NetBeans 7.4, you can configure the username globally as follows: Tools -> Options -> Java -> Maven, select the "Execution" category on the left and set

Global Implementation Options:

 -Duser.name=<username> 

Alternatively, this can be done by setting the appropriate property in the action settings for a specific project (Project Properties → Actions → for example, Build project).

+3
source share

All Articles