Forums de discussion

Change Bundle-version for .war Modules

Sabrina Toulouse, modifié il y a 6 années.

Change Bundle-version for .war Modules

New Member Publications: 21 Date d'inscription: 09/06/15 Publications récentes
Hi,

I work with Liferay 7.0 and I have some modules, like init.hook, theme, layout...
I've noticed that when i change version in .jar pom.xml, like in init.hook pom.xml, the bundle version is updated.
In MANIFEST.MF i got Bundle-Version: 1.2.2 which correspond to the project version in my pom.

But in .war like theme.war, this is not the case. I've noticed that I can change Bundle-version in the liferay-plugin-package.properties, but I'd like to have only 1 place to change all modules version (in the parent pom).

I tried with the maven-bundle-plugin like that :

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>com.myProject.layout</Bundle-SymbolicName>
<Bundle-Name>Site web Layout</Bundle-Name>
<Bundle-Version>1.2.3</Bundle-Version>
</instructions>
</configuration>
</plugin>

But it doesn't work and I still don"t have any Bundle-version in the MANIFEST.MF, neither in the gogoShell "lb" command.

How to do that?
Thx
thumbnail
David H Nebinger, modifié il y a 6 années.

RE: Change Bundle-version for .war Modules

Liferay Legend Publications: 14916 Date d'inscription: 02/09/06 Publications récentes
Sabrina Toulouse:
But in .war like theme.war, this is not the case. I've noticed that I can change Bundle-version in the liferay-plugin-package.properties, but I'd like to have only 1 place to change all modules version (in the parent pom).


That is the appropriate place for changing version number. The war application version is seen to be different from a lower-level version defined in bnd.bnd or elsewhere.








Come meet me at the 2017 LSNA!