You need to be aware of the consequences of what you want to do: an effective POM will also contain your current settings (contents settings.xml), thereby possibly publicly revealing all the passwords that you hard-coded there. A better solution would be to simply deploy the parent POM .
However, if you really want to go this route, you can have the following configuration:
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-help-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>effective-pom</goal>
</goals>
<configuration>
<output>${project.build.outputDirectory}/META-INF/maven/${project.groupId}/${project.artifactId}/pom.xml</output>
</configuration>
</execution>
</executions>
</plugin>
It says maven-jar-pluginnot to add Maven handle pom.xml and pom.propertiesinto the jar. Instead, and is pom.xmlgenerated .maven-help-plugineffective-pom
If you need a file pom.properties, you will need to create it manually using maven-antrun-plugin.
source
share