mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 09:45:39 +02:00
Move all dependencies to maven direct where possible
Includes: - Sign all artifacts, particularly 3rd party with CDT's PGP key - Using maven version managed and updated by EF Webmasters - Update to latest SnakeYAML - Move some 3rd party dependencies to Import-Package (instead of Require-Bundle)
This commit is contained in:
parent
33c30fa819
commit
460c0021aa
13 changed files with 144 additions and 33 deletions
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
|
@ -8,12 +8,22 @@ pipeline {
|
|||
timestamps()
|
||||
}
|
||||
stages {
|
||||
stage('initialize PGP') {
|
||||
steps {
|
||||
container('cdt') {
|
||||
withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING')]) {
|
||||
sh 'gpg --batch --import "${KEYRING}"'
|
||||
sh 'for fpr in $(gpg --list-keys --with-colons | awk -F: \'/fpr:/ {print $10}\' | sort -u); do echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust; done'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Code Formatting Checks') {
|
||||
steps {
|
||||
container('cdt') {
|
||||
timeout(activity: true, time: 30) {
|
||||
withEnv(['MAVEN_OPTS=-XX:MaxRAMPercentage=60.0']) {
|
||||
sh 'MVN="/usr/share/maven/bin/mvn -Dmaven.repo.local=/home/jenkins/.m2/repository \
|
||||
sh 'MVN="/jipp/tools/apache-maven/latest/bin/mvn -Dmaven.repo.local=/home/jenkins/.m2/repository \
|
||||
--settings /home/jenkins/.m2/settings.xml" ./releng/scripts/check_code_cleanliness.sh'
|
||||
}
|
||||
}
|
||||
|
@ -25,8 +35,10 @@ pipeline {
|
|||
container('cdt') {
|
||||
timeout(activity: true, time: 20) {
|
||||
withEnv(['MAVEN_OPTS=-XX:MaxRAMPercentage=60.0']) {
|
||||
sh "/usr/share/maven/bin/mvn \
|
||||
withCredentials([string(credentialsId: 'gpg-passphrase', variable: 'KEYRING_PASSPHRASE')]) {
|
||||
sh '''/jipp/tools/apache-maven/latest/bin/mvn \
|
||||
clean verify -B -V \
|
||||
-Dgpg.passphrase="${KEYRING_PASSPHRASE}" \
|
||||
-Dmaven.test.failure.ignore=true \
|
||||
-DexcludedGroups=flakyTest,slowTest \
|
||||
-P baseline-compare-and-replace \
|
||||
|
@ -38,7 +50,8 @@ pipeline {
|
|||
-Dcdt.tests.dsf.gdb.versions=gdb.10,gdbserver.10 \
|
||||
-Dmaven.repo.local=/home/jenkins/.m2/repository \
|
||||
--settings /home/jenkins/.m2/settings.xml \
|
||||
"
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ Export-Package: org.eclipse.cdt.managedbuilder.core.tests,
|
|||
org.eclipse.cdt.projectmodel.tests
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.eclipse.core.resources,
|
||||
org.eclipse.ui,
|
||||
org.eclipse.ui.ide,
|
||||
|
@ -26,4 +25,6 @@ Require-Bundle: org.eclipse.core.runtime,
|
|||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-17
|
||||
Automatic-Module-Name: org.eclipse.cdt.managedbuilder.core.tests
|
||||
Import-Package: com.google.gson
|
||||
Import-Package: com.google.gson,
|
||||
org.junit.jupiter.api;version="[5.9.3,6.0.0)",
|
||||
org.junit.jupiter.api.function;version="[5.9.3,6.0.0)"
|
||||
|
|
|
@ -4,10 +4,10 @@ Bundle-Name: %Bundle-Name
|
|||
Bundle-SymbolicName: org.eclipse.cdt.cmake.core.tests
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Fragment-Host: org.eclipse.cdt.cmake.core;bundle-version="1.5.0"
|
||||
Import-Package: org.assertj.core.api;version="[3.24.2,4.0.0)",
|
||||
org.junit.jupiter.api;version="[5.9.3,6.0.0)"
|
||||
Automatic-Module-Name: org.eclipse.cdt.cmake.core.tests
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Bundle-Copyright: %Bundle-Copyright
|
||||
Require-Bundle: org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.assertj;bundle-version="3.14.0"
|
||||
Require-Bundle: org.junit
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.util.List;
|
|||
import org.eclipse.cdt.cmake.core.internal.properties.CMakePropertiesBean;
|
||||
import org.eclipse.cdt.cmake.core.properties.CMakeGenerator;
|
||||
import org.junit.Test;
|
||||
import org.yaml.snakeyaml.LoaderOptions;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor;
|
||||
|
||||
|
@ -56,7 +57,7 @@ public class CMakePropertiesEvolutionTest {
|
|||
extraArgs.add("arg2");
|
||||
props.setExtraArguments(extraArgs);
|
||||
|
||||
Yaml yaml = new Yaml(new CustomClassLoaderConstructor(this.getClass().getClassLoader()));
|
||||
Yaml yaml = new Yaml(new CustomClassLoaderConstructor(this.getClass().getClassLoader(), new LoaderOptions()));
|
||||
String output = yaml.dump(props);
|
||||
|
||||
// try to load as evolved properties..
|
||||
|
|
|
@ -12,8 +12,7 @@ Require-Bundle: org.eclipse.core.runtime,
|
|||
org.eclipse.cdt.core;bundle-version="5.12.0",
|
||||
org.eclipse.tools.templates.freemarker;bundle-version="1.2.200",
|
||||
com.google.gson,
|
||||
org.eclipse.cdt.jsoncdb.core,
|
||||
org.yaml.snakeyaml;bundle-version="[1.14.0,2.0.0)"
|
||||
org.eclipse.cdt.jsoncdb.core
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-17
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: org.eclipse.cdt.cmake.core,
|
||||
|
@ -21,4 +20,6 @@ Export-Package: org.eclipse.cdt.cmake.core,
|
|||
org.eclipse.cdt.cmake.core.properties
|
||||
Automatic-Module-Name: org.eclipse.cdt.cmake.core
|
||||
Bundle-Localization: plugin
|
||||
Import-Package: org.eclipse.core.variables
|
||||
Import-Package: org.eclipse.core.variables,
|
||||
org.yaml.snakeyaml;version="[2.0.0,3.0.0)",
|
||||
org.yaml.snakeyaml.constructor;version="[2.0.0,3.0.0)"
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.eclipse.cdt.cmake.core.internal.properties.CMakePropertiesBean;
|
|||
import org.eclipse.cdt.cmake.core.properties.CMakeGenerator;
|
||||
import org.eclipse.cdt.cmake.core.properties.ICMakeProperties;
|
||||
import org.eclipse.cdt.cmake.core.properties.ICMakePropertiesController;
|
||||
import org.yaml.snakeyaml.LoaderOptions;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor;
|
||||
|
||||
|
@ -66,8 +67,9 @@ class CMakePropertiesController implements ICMakePropertiesController {
|
|||
CMakePropertiesBean props = null;
|
||||
if (Files.exists(storageFile)) {
|
||||
try (InputStream is = Files.newInputStream(storageFile)) {
|
||||
props = new Yaml(new CustomClassLoaderConstructor(this.getClass().getClassLoader())).loadAs(is,
|
||||
CMakePropertiesBean.class);
|
||||
var classLoader = this.getClass().getClassLoader();
|
||||
var clConstructor = new CustomClassLoaderConstructor(classLoader, new LoaderOptions());
|
||||
props = new Yaml(clConstructor).loadAs(is, CMakePropertiesBean.class);
|
||||
// props is null here if if no document was available in the file
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,11 @@ spec:
|
|||
readOnly: true
|
||||
- name: m2-repo
|
||||
mountPath: /home/jenkins/.m2/repository
|
||||
- name: "jenkins-home"
|
||||
mountPath: "/home/jenkins"
|
||||
readOnly: false
|
||||
- name: tools
|
||||
mountPath: /jipp/tools
|
||||
- name: jnlp
|
||||
resources:
|
||||
requests:
|
||||
|
@ -37,3 +42,8 @@ spec:
|
|||
path: settings.xml
|
||||
- name: m2-repo
|
||||
emptyDir: {}
|
||||
- name: "jenkins-home"
|
||||
emptyDir: {}
|
||||
- name: tools
|
||||
persistentVolumeClaim:
|
||||
claimName: tools-claim-jiro-cdt
|
||||
|
|
19
pom.xml
19
pom.xml
|
@ -30,7 +30,7 @@
|
|||
runs with. It may work with older versions, but this is not
|
||||
tested or supported. -->
|
||||
<required-maven-version>3.6.3</required-maven-version>
|
||||
<tycho-version>3.0.3</tycho-version>
|
||||
<tycho-version>3.0.5</tycho-version>
|
||||
<cbi-plugins.version>1.3.4</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>
|
||||
|
@ -990,6 +990,23 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.tycho</groupId>
|
||||
<artifactId>tycho-gpg-plugin</artifactId>
|
||||
<version>${tycho-version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>pgpsigner</id>
|
||||
<goals>
|
||||
<goal>sign-p2-artifacts</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<keyname>4F23165B6AC51B15</keyname>
|
||||
<skipIfJarsigned>false</skipIfJarsigned>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
|
|
@ -246,7 +246,7 @@
|
|||
<repository
|
||||
url="https://download.eclipse.org/tools/orbit/downloads/drops/R20201118194144/repository"/>
|
||||
<repository
|
||||
url="https://download.eclipse.org/tools/orbit/downloads/latest-R/"/>
|
||||
url="https://download.eclipse.org/oomph/simrel-orbit/milestone/latest/"/>
|
||||
<repository
|
||||
url="https://download.eclipse.org/technology/swtbot/releases/latest"/>
|
||||
<repository
|
||||
|
|
|
@ -28,4 +28,19 @@
|
|||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>production</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.tycho</groupId>
|
||||
<artifactId>tycho-gpg-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?pde version="3.8"?>
|
||||
<target name="cdt" sequenceNumber="135">
|
||||
<target name="cdt" sequenceNumber="139">
|
||||
<locations>
|
||||
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||
<repository location="https://download.eclipse.org/cbi/updates/license/" />
|
||||
|
@ -51,23 +51,13 @@
|
|||
<unit id="org.eclipse.wildwebdeveloper.embedder.node.feature.feature.group" version="0.0.0" />
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository/" />
|
||||
<unit id="com.google.gson" version="0.0.0" />
|
||||
<repository location="https://download.eclipse.org/tools/orbit/downloads/latest-R/" />
|
||||
<unit id="com.sun.xml.bind" version="2.3.3.v20221203-1659" />
|
||||
<unit id="javax.activation" version="1.2.2.v20221203-1659" />
|
||||
<unit id="jakarta.xml.bind" version="2.3.3.v20221203-1659" />
|
||||
<unit id="org.antlr.runtime" version="0.0.0" />
|
||||
<unit id="org.apache.commons.compress" version="0.0.0" />
|
||||
<unit id="org.assertj" version="0.0.0" />
|
||||
<unit id="org.freemarker" version="0.0.0" />
|
||||
<unit id="org.hamcrest" version="0.0.0" />
|
||||
<unit id="org.hamcrest.core" version="0.0.0" />
|
||||
<unit id="org.junit" version="0.0.0" />
|
||||
<unit id="org.junit.jupiter.api" version="0.0.0" />
|
||||
<unit id="org.mockito.mockito-core" version="0.0.0" />
|
||||
<unit id="org.yaml.snakeyaml" version="0.0.0" />
|
||||
<unit id="com.sun.jna" version="5.8.0.v20210503-0343" />
|
||||
<unit id="com.sun.jna.platform" version="5.8.0.v20221112-0806" />
|
||||
<unit id="org.hamcrest" version="2.2.0.v20210711-0821" />
|
||||
<unit id="org.hamcrest.core" version="1.3.0.v20180420-1519" />
|
||||
<unit id="org.junit" version="4.13.2.v20211018-1956" />
|
||||
<unit id="javax.activation" version="2.0.0.v20221203-1659" />
|
||||
<unit id="javax.xml" version="1.4.1.v20220503-2331" />
|
||||
</location>
|
||||
|
@ -92,6 +82,66 @@
|
|||
<version>1.7.36</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.10.1</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>3.24.2</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
<version>2.3.32</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>5.9.3</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>5.9.3</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>5.3.1</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<version>2.0</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna-platform</artifactId>
|
||||
<version>5.13.0</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
<version>5.13.0</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</location>
|
||||
</locations>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<version>3.4.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-artifacts</id>
|
||||
|
|
|
@ -9,7 +9,6 @@ Require-Bundle: org.junit,
|
|||
org.eclipse.tm.terminal.control;bundle-version="4.5.0",
|
||||
org.eclipse.core.runtime,
|
||||
org.eclipse.ui,
|
||||
org.junit.jupiter.api,
|
||||
org.opentest4j
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-17
|
||||
Export-Package: org.eclipse.tm.internal.terminal.connector;x-internal:=true,
|
||||
|
@ -21,4 +20,6 @@ Export-Package: org.eclipse.tm.internal.terminal.connector;x-internal:=true,
|
|||
org.eclipse.tm.internal.terminal.textcanvas;x-internal:=true,
|
||||
org.eclipse.tm.terminal.model,
|
||||
org.eclipse.tm.terminal.test
|
||||
Import-Package: org.junit.jupiter.api;version="[5.9.3,6.0.0)",
|
||||
org.junit.jupiter.api.function;version="[5.9.3,6.0.0)"
|
||||
Automatic-Module-Name: org.eclipse.tm.terminal.test
|
||||
|
|
Loading…
Add table
Reference in a new issue