1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 22:25:25 +02:00

Bug 548526: Enable individual mvn projects to be built

Although a little profile "magic" is needed, by adding -DuseSimrelRepo
to the command line to enable and disable the correct profiles
individual mvn projects can be built against the simrelRepo.

This enables, for example, the ability to build the standalone debugger
against the simrel repo without having to change how normal builds are
done by using:
   mvn verify -DuseSimrelRepo -f debug/org.eclipse.cdt.debug.application.product

A simrel p2 site can also be provided with -Dsimrel-site=<url>

Change-Id: I45a636c3c1042bc2fbb6eea5129c6553027e92df
This commit is contained in:
Jonah Graham 2019-07-16 15:11:49 -04:00
parent 4fe53bb057
commit 8b95d7cdfc

61
pom.xml
View file

@ -21,6 +21,7 @@
<cbi-plugins.version>1.1.5</cbi-plugins.version>
<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
<cdt-site>http://ci.eclipse.org/cdt/job/cdt-master/lastSuccessfulBuild/artifact/releng/org.eclipse.cdt.repo/target/repository</cdt-site>
<simrel-site>https://download.eclipse.org/releases/2019-06</simrel-site>
<repo-path>tools/cdt/builds/master/nightly</repo-path>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.jacoco.reportPath>${project.basedir}/../../target/jacoco.exec</sonar.jacoco.reportPath>
@ -295,6 +296,14 @@
<doclint>none</doclint>
</properties>
</profile>
<!--
Individual p2 repos can be turned on and off to allow building CDT, or parts of CDT against
different target platforms easily.
For example, you can:
- test CDT against a pre-built CDT by using the cdtRepo profile.
- build the standalone rcp debugger against the latest simrel
mvn verify -DuseSimrelRepo -f debug/org.eclipse.cdt.debug.application.product
-->
<profile>
<id>cdtRepo</id>
<repositories>
@ -305,6 +314,50 @@
</repository>
</repositories>
</profile>
<!-- See comment above cdtRepo profile -->
<profile>
<id>simrelRepo</id>
<activation>
<property>
<name>useSimrelRepo</name>
</property>
</activation>
<repositories>
<repository>
<id>simrel.repo</id>
<url>${simrel-site}</url>
<layout>p2</layout>
</repository>
</repositories>
</profile>
<!-- See comment above cdtRepo profile -->
<profile>
<id>defaultCdtTarget</id>
<activation>
<property>
<name>!useSimrelRepo</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<target>
<artifact>
<groupId>org.eclipse.cdt</groupId>
<artifactId>org.eclipse.cdt.target</artifactId>
<classifier>${target-platform}</classifier>
<version>1.0.0</version>
</artifact>
</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>macosx</id>
<activation>
@ -567,14 +620,6 @@
<arch>x86_64</arch>
</environment>
</environments>
<target>
<artifact>
<groupId>org.eclipse.cdt</groupId>
<artifactId>org.eclipse.cdt.target</artifactId>
<classifier>${target-platform}</classifier>
<version>1.0.0</version>
</artifact>
</target>
</configuration>
</plugin>
<plugin>