Richard S. Hall wrote:
On Mar 5, 2007, at 9:15 PM, Stuart McCulloch wrote:
On 06/03/07, Tim Moloney <[EMAIL PROTECTED]> wrote:
Is there a way to define a custom variable (e.g. shortName) in pom.xml?
Yes, for example:
<properties>
<shortName>FOO</shortName>
</properties>
then you can use ${shortName} in your pom.xml
If this works, then I guess I would be in favor of using this approach
and keeping JAR file names long.
Here's an updated template pom file.
Tim
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.felix.commons</groupId>
<artifactId>build</artifactId>
<version>0.9.0-incubator-SNAPSHOT</version>
</parent>
<properties>
<shortName>FOO</shortName>
</properties>
<groupId>org.apache.felix.commons</groupId>
<artifactId>${pom.groupId}.${shortName}</artifactId>
<version>x.y.z</version>
<packaging>bundle</packaging>
<name>${shortName} bundle</name>
<description>This bundle simply wraps ${shortName}-${pom.version}.jar.</description>
<organization>
<name>Apache Felix Project</name>
<url>http://incubator.apache.org/felix/</url>
</organization>
<dependencies>
<dependency>
<groupId>FOO-groupId</groupId>
<artifactId>${shortName}</artifactId>
<version>${pom.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
<Export-Package>FOO</Export-Package>
<Private-Package>FOO.impl</Private-Package>
<!--
Uncomment this section after bnd-find-include-resource-in-classpath.patch from FELIX-204 has
been applied to bnd.
<Include-Resource>@${shortName}-${pom.version}.jar!/META-INF/LICENSE.txt</Include-Resource>
-->
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>