Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] How to use customized qualifier string

It works well. :)

Thanks.

Mengxin Zhu


On 10/28/2011 03:20 PM, Sievers, Jan wrote:
I guess what you want can be achieved with

<format>'myprefix_'yyyyMMddHHmm</format>

see the docs:

mvn help:describe -Dplugin=org.eclipse.tycho:tycho-packaging-plugin -Ddetail

--- snip ---

[INFO] org.eclipse.tycho:tycho-packaging-plugin:0.13.0

Name: Tycho OSGi Packaging Plugin (Incubation)
Description: A plugin for packaging OSGi bundles
Group Id: org.eclipse.tycho
Artifact Id: tycho-packaging-plugin
Version: 0.13.0
Goal Prefix: tycho-packaging

This plugin has 8 goals:

tycho-packaging:build-qualifier
   Description: This mojo generates build qualifier according to the rules
     outlined in
     http://help.eclipse.org/ganymede/topic/org.eclipse.pde.doc.user/tasks/pde_version_qualifiers.htm
     1.  explicit -DforceContextQualifier command line parameter
     2.  forceContextQualifier from ${project.baseDir}/build.properties
     3.  the tag that was used to fetch the bundle (only when using map file)
     4.  a time stamp in the form YYYYMMDDHHMM (ie 200605121600)
     The generated qualifier is assigned to buildQualifier project property.
     Unqualified project version is assigned to unqualifiedVersion project
     property. Unqualified version is calculated based on ${project.version} and
     can be used for any Tycho project (eclipse-update-site,
     eclipse-application, etc) and regular maven project. Implementation
     guarantees that the same timestamp is used for all projects in reactor
     build. Different projects can use different formats to expand the
     timestamp, however (highly not recommended but possible).
   Implementation: org.eclipse.tycho.buildversion.BuildQualifierMojo
   Language: java
   Bound to phase: validate

   Available parameters:

     buildPropertiesFile (Default: ${project.basedir}/build.properties)
       (no description available)

     forceContextQualifier
       Expression: ${forceContextQualifier}
       (no description available)

     format (Default: yyyyMMddHHmm)
       Specify a message format as specified by java.text.SimpleDateFormat.
       Timezone used is UTC.

     session
       Expression: ${session}
       (no description available)


--- snip ---


-----Original Message-----
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Mengxin Zhu
Sent: Freitag, 28. Oktober 2011 08:50
To: tycho-user@xxxxxxxxxxx
Subject: [tycho-user] How to use customized qualifier string

The default qualifier string of p2 repository built by Tycho is
'yyyyMMddHHmm'. How can I customize the qualifier string? I want to add
prefix prior to the building timestamp.

I'm using below snippet, but it doesn't work.

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<qualifier>myprefix_${buildQualifier}</qualifier>
</configuration>
</plugin>

Thanks.



Back to the top