Mapping Eclipse Product Configuration File Using tycho

I have an Eclipse RCP product that I create with Tycho. After some smaller issues, this works very well, and I have both CI and releases as needed.

The product in question is provided either as a standalone RCP application or as an update site, so functionality can be installed in an Eclipse installation. It works great.

The product has the main function that is used on the update site, and I would really like the function and product to have the same version number. Like today, this version number is mentioned in many places, and I would really like to reduce it to one. I currently have a version number in

  • feature.xml main function
  • pom.xml same function
  • file .productfor product configuration file
  • pom.xml project with file .product
  • categories.xmlupdate site file
  • file about.mappings

I tried using maven resource filters and it works for POM files and about.mappings, but not for the rest. This is my current one pom.xmlfor the main function:

<?xml version="1.0" encoding="UTF-8"?>
<project ...>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>...main.feature</artifactId>
    <version>${product.version}-SNAPSHOT</version>
    <packaging>eclipse-feature</packaging>

    <parent>
        <groupId>...</groupId>
        <artifactId>...parent</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <relativePath>../...parent</relativePath>
    </parent>

    <build>
        <!-- Substitutions: product.version -->
        <resources>
            <resource>
                <directory>.</directory>
                <includes>
                    <include>feature.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>
</project>

When doing this configuration, I get the following exception from Tycho (or an exception that looks very similar to it):

[ERROR] Internal error: java.lang.IllegalArgumentException -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalArgumentException
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
Caused by: java.lang.IllegalArgumentException
        at org.eclipse.equinox.internal.p2.metadata.VersionParser.parse(VersionParser.java:93)
        at org.eclipse.equinox.p2.metadata.Version.create(Version.java:79)
        at org.eclipse.tycho.p2.impl.publisher.FeatureDependenciesAction.getVersion(FeatureDependenciesAction.java:126)
        at org.eclipse.tycho.p2.impl.publisher.AbstractDependenciesAction.perform(AbstractDependenciesAction.java:79)
        ... 11 more

(I cut off some lines ...)

Basically, the built-in maven process does not seem to perform resource filtering at all for this type of packaging. Or??

I have tried many different things, but I cannot get it to work. My best guess is that I have to set up the life cycle, but how ...

Can anyone help me with this?

+3
source share
2

categories.xml. 0.0.0 , Tycho .

+1

All Articles