Forums de discussion
[Maven] Inserting revision number into portlet's manifest file
Jan Tošovský, modifié il y a 7 années.
[Maven] Inserting revision number into portlet's manifest file
Liferay Master Publications: 566 Date d'inscription: 22/07/10 Publications récentes
Dear All,
I'm trying to insert revision number into manifest according to:
https://maven.apache.org/plugin-developers/cookbook/add-svn-revision-to-manifest.html
When the following snippet is used in POM.xml file, it prints the correct revision into the log during the build process, however, it is not inserted into manifest file. I suspect this settings is completely overridden by liferay maven plugin.
Any idea?
I'm trying to insert revision number into manifest according to:
https://maven.apache.org/plugin-developers/cookbook/add-svn-revision-to-manifest.html
When the following snippet is used in POM.xml file, it prints the correct revision into the log during the build process, however, it is not inserted into manifest file. I suspect this settings is completely overridden by liferay maven plugin.
<scm>
<connection>scm:svn:https://my.company.net/svn/sf</connection>
</scm>
<build>
<plugins>
<plugin>
<groupid>org.codehaus.mojo</groupid>
<artifactid>buildnumber-maven-plugin</artifactid>
<version>1.4</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<docheck>false</docheck>
<doupdate>false</doupdate>
</configuration>
</plugin>
<plugin>
<groupid>org.apache.maven.plugins</groupid>
<artifactid>maven-jar-plugin</artifactid>
<version>3.0.2</version>
<configuration>
<archive>
<manifestentries>
<scm-revision>${buildNumber}</scm-revision>
</manifestentries>
</archive>
</configuration>
</plugin>
<plugin>
<groupid>com.liferay.maven.plugins</groupid>
<artifactid>liferay-maven-plugin</artifactid>
<version>${liferay.maven.plugin.version}</version>
<configuration>
<apibasedir>${basedir}/../sf-portlet-service</apibasedir>
</configuration>
</plugin>
</plugins>
</build>
Any idea?
Jan Tošovský, modifié il y a 7 années.
RE: [Maven] Inserting revision number into portlet's manifest file (Réponse)
Liferay Master Publications: 566 Date d'inscription: 22/07/10 Publications récentes
Silly me, I've just fixed it by using maven-war-plugin instead of maven-jar-plugin.