Reputation: 1588
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
Upvotes: 0
Views: 287
Reputation: 48057
A War file is not deployed directly into the OSGi container as a bundle, but wrapped during the deployment process. I wouldn't expect anything from the WAR file's Manifest to be relevant to this process.
A jar file (and a bundle) is a file with Java code, for example in directories that match the code's package. A war file contains code in completely different locations, thus it can't be used like a jar file transparently. Further, a war file contains a number of jar files, that won't be made available to the OSGi container after deployment. Yet another reason for it not being a bundle.
Upvotes: 1