Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] about.ini with qualifier/snapshot

Thanks Igor those properties worked well.  The only problem is that I would like to modify the about.ini just before it is about to go into the jar file but leave the original in the source folder unmodified.  The only way I know how to do this right now is to just modify it in the source folder during "prepare-package" phase and then unmodify it back during the "package" phase.  But it works and git doesn't complain about a modified file so it works for me. :)

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>prepare-package</id>
<phase>prepare-package</phase>
<configuration>
<target>
<replace file="about.ini">
<replacefilter token="_VERSION_" value="${unqualifiedVersion}.${buildQualifier}" />
</replace>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>package</id>
<phase>package</phase>
<configuration>
<target>
<replace file="about.ini">
<replacefilter token="${unqualifiedVersion}.${buildQualifier}" value="_VERSION_" />
</replace>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

On Thu, Oct 27, 2011 at 7:29 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
Try ${unqualifiedVersion}.${buildQualifier} .

--
Regards,
Igor


On 11-10-27 6:55 AM, Greg Amerson wrote:
Hello fellow tycho users,

I have an eclipse product that is built with eclipse-repository package
type with tycho 0.13.  In this product I have a top level feature
branding plugin that supplies the standard about text in a dialog
through the about.ini file.  In this about.ini file I have the current
version of the product in a generic sense "1.0".  However, i would like
to display the build qualifier as well, or better yet just put in the
same version of the bundle that is being build, qualifier and all,
1.0.0.v201110271830.  How would be the best way for me to modify pom.xml
of this one bundle to change the about.ini just before it is packaged
into a jar?

Below you can see what I'm trying in my pom.xml  However, I don't know
how to get the current value of the version being built.  Is there a way
to get that value here?

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>prepare-package</id>
<phase>prepare-package</phase>
<configuration>
<target>
<replace file="about.ini">
<replacetoken>_PLACEHOLDER_</replacetoken>
<replacevalue>1.0.0.v201110271851</replacevalue>
</replace>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

--
Greg Amerson
Liferay, Inc.



_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



--
Greg Amerson
Liferay, Inc.


Back to the top