Reputation: 3955
I have a Maven Tycho project, where unit tests are run with tycho-surefire-plugin.
These unit tests use the SWT library, and because I want to be able to build the project locally (win32) and on the Jenkins continous integration server (linux), I specified multiple enviroments, so that the libraries were getting pulled correctly from the p2 repos:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<environments>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
But this also makes the build produce final artifacts for both linux and win32. I will only ever run the software on windows, so I don't need the linux artifact. I just need the libraries during unit (and possibly integration) tests on the linux machine.
Is there a setting that allows me to do this?
Upvotes: 1
Views: 870
Reputation: 3955
In your module that is building the products (i.e. the one with packaging type eclipse-repository
and goals tycho-p2-director-plugin:materialize-products
and tycho-p2-director-plugin:archive-products
), add again a plugin entry for the target-platform-configuration
plugin, and list the environments you want to have final artifacts for in the configuration section.
This seems to overwrite the parent settings, and only build the desired artifacts.
Upvotes: 1