I wanted to share with the group my current pom to update the timestamp of the built plugin to match the version. I am not particularly happy with it and really think that having a way to build a plugin separate from a feature or product and have a valid / matching build qualifier timestamp and packaging is a good / required feature.
<?xml version="1.0" encoding="UTF-8"?>
<modelVersion>4.0.0</modelVersion>
<groupId>com.ardor3d.math</groupId>
<artifactId>com.ardor3d.math</artifactId>
<baseversion>0.9.17</baseversion>
<tycho-version>0.18.0</tycho-version>
<maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
<packaging>eclipse-plugin</packaging>
<version>${baseversion}-SNAPSHOT</version>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<id>timestamp-property</id>
<phase>initialize</phase>
<goal>timestamp-property</goal>
<pattern>yyyyMMddHHmm</pattern>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
<strictVersions>false</strictVersions>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<copy file="target/${project.artifactId}-${project.version}.jar"
tofile="target/${project.artifactId}_${baseversion}.${htimestamp}.jar" />
There is currently no good way to consume large number of Eclipse
plugins from a Maven repository, nor there is a good way deploy plugins
to an "updatable" p2 repository. We made few attempts to make this
possible in the past, but all of them failed for various reasons. I am
not sure what other projects do, but I aggregate my plugins in a p2
repository and upload new repository to a place accessible over http
during each build.
--
Regards,
Igor
On 2013-06-06 11:35 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian
Technologies Inc. (SGT Inc.)] wrote:
Ok — I see that now, when I look at my maven build output for building
rcp products. My idea is to have the separate plugins (we have probably
1000 or so) build individually and go to an artifact repository; is the
"correct" way to rely on the bundling of the rcp to replace the
–SNAPSHOT with the correct version?
Thanks for your prompt response! It's good to be working on getting all
of NASA's Eclipse plugin developers using Maven.
Tamar
From: Igor Fedorenko <ifedorenko@xxxxxxxxxxxx
<mailto:ifedorenko@xxxxxxxxxxxx>>
Reply-To: Tycho user list <tycho-user@xxxxxxxxxxx
<mailto:tycho-user@xxxxxxxxxxx>>
Date: Thu, 6 Jun 2013 10:31:34 -0500
To: Tycho user list <tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>>
Subject: Re: [tycho-user] SNAPSHOT is not being replaced with timestamp
in name of jar
This is expected. Generally, don't worry about file names under target/
directory, bundles and features will get conventional names when
included in eclipse-repository or update site
--
Regards,
Igor
On Thu, Jun 6, 2013 at 11:20 AM, Cohen, Tamar (ARC-TI)[Stinger
Ghaffarian Technologies Inc. (SGT Inc.)] <tamar.e.cohen@xxxxxxxx
<mailto:tamar.e.cohen@xxxxxxxx>> wrote:
Hi all--
I'm trying to set up separate pom files within each plugin / feature
project to just build that plugin. I'm having trouble with the name
of the output jar not including the timestamp of the build.
SNAPSHOT remains in the name. I have not found a good answer for
this on the internet.
For example, com.ardor3d.0.9.17-SNAPSHOT.jar; within the manifest
the version is Bundle-Version: 0.9.17.201306060343
I have tried changing it as follows:
<version>0.9.17.${maven.build.timestamp}</version> which causes
problems with the osgi and maven versions not matching.:
[WARNING] 'version' contains an _expression_ but should be a constant.
@ gov.nasa:com.ardor3d:0.9.17.${maven.build.timestamp},
/hosts/strangelove/export/home/tecohen/verve_rapid_gri_2013/com.ardor3d/pom.xml,
line 7, column 12
[ERROR] Failed to execute goal
org.eclipse.tycho:tycho-packaging-plugin:0.18.0:validate-version
(default-validate-version) on project com.ardor3d: OSGi version
0.9.17.qualifier in META-INF/MANIFEST.MF does not match Maven
version 0.9.17.201306060817 in pom.xml
Here is my pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<http://www.w3.org/2001/XMLSchema-instance%22>>
<modelVersion>4.0.0</modelVersion>
<groupId>gov.nasa</groupId>
<artifactId>com.ardor3d</artifactId>
<version>0.9.17-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
<tycho-version>0.16.0</tycho-version>
<project.reporting.outputDirectory>reporting</project.reporting.outputDirectory>
<project.build.outputDirectory>output</project.build.outputDirectory>
<maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
</properties>
<repositories>
<repository>
<id>indigo</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/indigo</url>
<http://download.eclipse.org/releases/indigo%3C/url%3E>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>0.18.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
Thanks!
Tamar
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx <mailto: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