문제

Am using ant to build my RCP application. The PDE headless build works well. However for some custom bundling of my artifacts, i need to access the timestamp that PDE uses while creating jars of my plugins and features.

Ex: com.test.app.1.0.0.201404091703.jar

I need to get the value 201404091703 from the PDE once the build is successful. Is this possible?

I tried with forceContextQualifier from the build.properties, but the problem with this is, everytime before the build starts i need to update this value manually (to some static value) and overriding of this global property (dynamically) using ANT is not possible.

Any suggestions is appreciated

도움이 되었습니까?

해결책

You can specify -DforceContextQualifier=xxx as an argument to the org.eclipse.equinox.launcher_xxx run in your build.xml.

Update:

So, for example:

<buildnumber file="build.number"/>

<tstamp>
  <format property="build.date" pattern="yyyyMMddHHmm" timezone="GMT"/>
</tstamp>

<property name="build.version" value="${build.date}-${build.number}"/>

<java fork="true" jar="${jar.launcher}">
  <arg value="-DforceContextQualifier=${build.version}"/>
  ...

Sets the qualifier for a build to YYYYMMDDHHMM-num

다른 팁

The PDE headless build generates property files for each bundle with the current version numbers. In a custom callback (or else in your Ant build file) you can read such a property file and use the properties.

Search for the property generateVersionsLists in Eclipse Help. http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Ftasks%2Fpde_version_qualifiers.htm

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top