java - How do I embed artifact information in maven shaded jar -


i document in shaded jar maven artifacts end in shaded jar.

all packages merged , makes difficult workout artifacts went looking @ jar.

i suppose ideal place information manifest file in text file.

ideally want see groupid, artifactid , version.

is @ possible maven shade plugin?

thanks in advance, phil.

you can maven, below steps follow:

1- create under src/main/resources file wich contain information, information.txt example following content:

version=${project.version} artifactid=${project.artifactid} groupid=${project.groupid} 

2- activate maven filtring

 <project>       ...       <build>         ...         <resources>           <resource>             <directory>src/main/resources</directory>             <filtering>true</filtering>             <includes>                 <include>**/information.txt</include>             </includes>           </resource>           ...         </resources>         ...       </build>       ...     </project> 

3- build project. file contain information need.

more information plugin.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -