Skip to content

Commit

Permalink
Switch parent POM to org.jenkins-ci:jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
dwnusbaum committed Jun 16, 2022
1 parent 7a33c35 commit f5f5db3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 180 deletions.
28 changes: 4 additions & 24 deletions Jenkinsfile
@@ -1,24 +1,4 @@
pipeline {
options {
buildDiscarder(logRotator(numToKeepStr: '20'))
timeout(time: 1, unit: 'HOURS')
}
agent {
docker {
image 'maven:3.5.0-jdk-8'
label 'docker'
}
}
stages {
stage('main') {
steps {
sh 'mvn -B clean verify'
}
post {
success {
junit '**/target/surefire-reports/TEST-*.xml'
}
}
}
}
}
buildPlugin(useContainerAgent: true, configurations: [
[ platform: 'linux', jdk: '17' ],
[ platform: 'windows', jdk: '8' ],
])
179 changes: 24 additions & 155 deletions pom.xml
Expand Up @@ -2,9 +2,9 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.kohsuke</groupId>
<artifactId>pom</artifactId>
<version>21</version>
<groupId>org.jenkins-ci</groupId>
<artifactId>jenkins</artifactId>
<version>1.76</version>
<relativePath />
</parent>

Expand All @@ -18,11 +18,9 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<revision>1.28</revision>
<changelist>-SNAPSHOT</changelist>
<!-- TODO: Move these three properties to the parent POM or use org.jenkins-ci:jenkins as the parent POM here -->
<incrementals-enforce-minimum.version>1.1</incrementals-enforce-minimum.version>
<incrementals-plugin.version>1.1</incrementals-plugin.version>
<incrementals.url>https://repo.jenkins-ci.org/incrementals/</incrementals.url>
<scmTag>HEAD</scmTag>
<!-- We throw Exception/Throwable in many places due to the nature of this library, and this visitor will be disabled by default in an upcoming SpotBugs release anyway, see https://github.com/spotbugs/spotbugs/issues/2040. -->
<spotbugs.omitVisitors>ThrowingExceptions</spotbugs.omitVisitors>
</properties>

<repositories>
Expand All @@ -40,68 +38,39 @@
</pluginRepositories>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.jenkins.tools.incrementals</groupId>
<artifactId>incrementals-maven-plugin</artifactId>
<version>${incrementals-plugin.version}</version>
<configuration>
<includes>
<include>org.jenkins-ci.*</include>
<include>io.jenkins.*</include>
</includes>
<generateBackupPoms>false</generateBackupPoms>
<updateNonincremental>false</updateNonincremental>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5-jenkins-3</version>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.13.1</version>
<executions>
<execution>
<goals>
<goal>addTestSources</goal>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
<configuration>
<providerSelection>1.8</providerSelection>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.gmaven.runtime</groupId>
<artifactId>gmaven-runtime-1.8</artifactId>
<version>1.5-jenkins-3</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
<goal>test-jar</goal> <!-- ClassRecorder is used by groovy-cps -->
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>
</plugins>
</build>

Expand All @@ -114,13 +83,11 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci</groupId>
<artifactId>test-annotations</artifactId>
<version>1.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -132,123 +99,25 @@
<tag>${scmTag}</tag>
</scm>

<reporting>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</reporting>

<!-- TODO: Move these profiles to the parent POM or use org.jenkins-ci:jenkins as the parent POM here -->
<profiles>
<profile> <!-- see JEP-305 -->
<id>consume-incrementals</id>
<repositories>
<repository>
<id>incrementals</id>
<url>${incrementals.url}</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>incrementals</id>
<url>${incrementals.url}</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>might-produce-incrementals</id>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.0.1</version>
<configuration>
<updatePomFile>true</updatePomFile>
<outputDirectory>${project.build.directory}</outputDirectory>
<flattenedPomFilename>${project.artifactId}-${project.version}.pom</flattenedPomFilename>
</configuration>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<id>attach-sources</id>
<goals>
<goal>flatten</goal>
<goal>jar-no-fork</goal>
</goals>
<configuration>
<flattenMode>oss</flattenMode>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M2</version>
<executions>
<execution>
<id>display-info</id>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.5.4,)</version>
<message>3.5.4+ required to use Incrementals.</message>
</requireMavenVersion>
<rule implementation="io.jenkins.tools.incrementals.enforcer.RequireExtensionVersion">
<version>[${incrementals-enforce-minimum.version},)</version>
</rule>
</rules>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.incrementals</groupId>
<artifactId>incrementals-enforcer-rules</artifactId>
<version>${incrementals-plugin.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<completionGoals>incrementals:reincrementalify</completionGoals>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>produce-incrementals</id>
<activation>
<property>
<name>set.changelist</name>
<value>true</value>
</property>
</activation>
<distributionManagement>
<repository>
<id>incrementals</id>
<url>${incrementals.url}</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<id>attach-test-sources</id>
<goals>
<goal>jar-no-fork</goal>
<goal>test-jar-no-fork</goal>
</goals>
</execution>
</executions>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/kohsuke/groovy/sandbox/impl/Checker.java
Expand Up @@ -579,7 +579,7 @@ public static Object checkedBinaryOp(Object lhs, int op, Object rhs) throws Thro
public static Object checkedComparison(Object lhs, final int op, Object rhs) throws Throwable {
if (lhs==null) {// bypass the checker if lhs is null, as it will not result in any calls that will require protection anyway
return InvokerHelper.invokeStaticMethod(ScriptBytecodeAdapter.class,
Ops.binaryOperatorMethods(op), new Object[]{lhs,rhs});
Ops.binaryOperatorMethods(op), new Object[]{null, rhs});
}

return new SingleArgInvokerChain(lhs) {
Expand Down

0 comments on commit f5f5db3

Please sign in to comment.