I'm attempting to build an group of Eclipse features using Tycho (0.20.0) on a Windows machine. However, the Maven build fails on the update site because Tycho seemingly thinks that it is running on 64-bit Linux, and not Windows.
[INFO] {osgi.ws=gtk, osgi.os=linux, osgi.arch=x86_64, org.eclipse.update.install.features=true}
I would expect:
[INFO] {osgi.ws=win32, osgi.os=win32, osgi.arch=x86, org.eclipse.update.install.features=true}
It's my understanding that Tycho gets the platform information based on where it is run (as per Tycho Properties). If that's the case, is this a bug in Tycho since I'm not actively telling it the current platform?
If I comment out the Linux environment, it falls back on the 32-bit Linux, and if I comment THAT out, it selects the Mac OSX environment. As a workaround, I've just been commenting out all but the Windows environments, however I'd really like to understand why this is an issue.
To add to the confusion, I have other similar projects with identical sets of plugins in the pom files, and those builds execute without a problem.
The expanded Maven output below shows that it's complaining about not being able to locate org.eclipse.swt.internal.win32, however I'm fairly certain this isn't the root issue since the build is successful when the correct environment is chosen by Tycho.
Any thoughts on why Tycho would be selecting anything BUT a Windows environment?
In the root pom.xml:
<executions>
...
<execution>
<id>assemble-update-site</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<projectsDirectory>update-site</projectsDirectory>
<pomIncludes>
<pomInclude>pom.xml</pomInclude>
</pomIncludes>
<goals>
<goal>clean</goal>
<goal>package</goal>
</goals>
</configuration>
</execution>
...
</executions>
Both the update-site and parent pom.xml contain this set of plugins:
...
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<environments>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
</environments>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-publisher-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<publishArtifacts>true</publishArtifacts>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho-version}</version>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-repository-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<includeAllDependencies>false</includeAllDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
</plugin>
</plugins>
</build>
...
More context for the Maven output:
...
[INFO] --- maven-invoker-plugin:1.5:run (assemble-update-site) @ some.feature.repo.aggregate.pom ---
[WARNING] Filtering of parent/child POMs is not supported without cloning the projects
[INFO] Building: pom.xml
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: com.example.app:some.feature.repository:1.0.0-SNAPSHOT @ C:\workspace\some-project\features\update-site\interpolated-pom.xml
[INFO] Adding repository file:C:/workspace/some-project/features/update-site/../some.other.feature/target/site
... more repositories ...
[INFO] Resolving dependencies of MavenProject: com.example.app:some.feature.repository:1.0.0-SNAPSHOT @ C:\workspace\some-project\features\update-site\interpolated-pom.xml
[INFO] Cannot complete the request. Generating details.
[INFO] Cannot complete the request. Generating details.
[INFO] {osgi.ws=gtk, osgi.os=linux, osgi.arch=x86_64, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: some.feature.repository raw:1.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.0-SNAPSHOT
[ERROR] Missing requirement: com.example.app.some.dependency 2.2.0.GA requires 'package org.eclipse.swt.internal.win32 0.0.0' but it could not be found
[ERROR] Cannot satisfy dependency: some.feature.repository raw:1.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.0-SNAPSHOT depends on: some.feature.group [1.0.0,1.0.1)
[ERROR] Cannot satisfy dependency: some.feature.group 1.0.0.201610051537 depends on: com.example.app.some.dependency [2.2.0.GA]
...