Skip to content

ci: Airlock-friendly plugin dependency declarations #2565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion google-api-client-apache-v5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
Expand Down
38 changes: 25 additions & 13 deletions google-api-client-appengine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
Expand Down Expand Up @@ -71,18 +70,6 @@
</execution>
</executions>
</plugin>
<!--App Engine uses Java 7 and above-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java17</artifactId>
<version>1.0</version>
</signature>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down Expand Up @@ -128,4 +115,29 @@
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>animal-sniffer</id>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this already declared in the parent pom?

<activation>
<!-- The compatibility check runs by default in CIs -->
<jdk>[1.8,)</jdk>
</activation>
<build>
<plugins>
<!--App Engine uses Java 7 and above-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java17</artifactId>
<version>1.0</version>
</signature>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
68 changes: 57 additions & 11 deletions google-api-client-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,22 @@
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-nexus-staging</serverId>
<nexusUrl>https://google.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-nexus-staging</serverId>
<nexusUrl>https://google.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down Expand Up @@ -157,6 +161,48 @@
</build>

<profiles>
<profile>
<!-- By default, we release artifacts to Sonatype, which requires
nexus-staging-maven-plugin. -->
<id>release-sonatype</id>
<activation>
<property>
<!-- Only when we use the release-gcp-artifact-registry profile,
which comes with artifact-registry-url property, this profile is
turned off. -->
<name>!artifact-registry-url</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Optionally, we can publish the artifacts to GCP Artifact Registry specifying
this release-gcp-artifact-registry profile:
mvn deploy -P=release-gcp-artifact-registry -P=-release-sonatype \
-Dartifact-registry-url=artifactregistry://us-maven.pkg.dev/...
-->
<id>release-gcp-artifact-registry</id>
<properties>
<artifact-registry-url>artifactregistry://please-define-artifact-registry-url-property</artifact-registry-url>
</properties>
<distributionManagement>
<repository>
<id>gcp-artifact-registry-repository</id>
<url>${artifact-registry-url}</url>
</repository>
<snapshotRepository>
<id>gcp-artifact-registry-repository</id>
<url>${artifact-registry-url}</url>
</snapshotRepository>
</distributionManagement>
</profile>
<profile>
<id>release-sign-artifacts</id>
<activation>
Expand Down
1 change: 0 additions & 1 deletion google-api-client-gson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
Expand Down
1 change: 0 additions & 1 deletion google-api-client-jackson2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
Expand Down
1 change: 0 additions & 1 deletion google-api-client-protobuf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
Expand Down
1 change: 0 additions & 1 deletion google-api-client-servlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
Expand Down
1 change: 0 additions & 1 deletion google-api-client-xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
Expand Down
1 change: 0 additions & 1 deletion google-api-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
Expand Down
148 changes: 110 additions & 38 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -471,44 +471,6 @@
</plugins>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
<configuration>
<comparisonVersion>1.27.0</comparisonVersion>
<ignoredDifferencesFile>${basedir}/../clirr-ignored-differences.xml</ignoredDifferencesFile>
<logResults>true</logResults>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java17</artifactId>
<version>1.0</version>
</signature>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
Expand All @@ -525,6 +487,11 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.8</version>
</plugin>
</plugins>
</build>
<properties>
Expand Down Expand Up @@ -555,6 +522,48 @@
</properties>

<profiles>
<profile>
<!-- By default, we release artifacts to Sonatype, which requires
nexus-staging-maven-plugin. -->
<id>release-sonatype</id>
<activation>
<property>
<!-- Only when we use the release-gcp-artifact-registry profile,
which comes with artifact-registry-url property, this profile is
turned off. -->
<name>!artifact-registry-url</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Optionally, we can publish the artifacts to GCP Artifact Registry specifying
this release-gcp-artifact-registry profile:
mvn deploy -P=release-gcp-artifact-registry -P=-release-sonatype \
-Dartifact-registry-url=artifactregistry://us-maven.pkg.dev/...
-->
<id>release-gcp-artifact-registry</id>
<properties>
<artifact-registry-url>artifactregistry://please-define-artifact-registry-url-property</artifact-registry-url>
</properties>
<distributionManagement>
<repository>
<id>gcp-artifact-registry-repository</id>
<url>${artifact-registry-url}</url>
</repository>
<snapshotRepository>
<id>gcp-artifact-registry-repository</id>
<url>${artifact-registry-url}</url>
</snapshotRepository>
</distributionManagement>
</profile>
<profile>
<id>release-sign-artifacts</id>
<activation>
Expand Down Expand Up @@ -589,6 +598,69 @@
</build>
</profile>

<profile>
<id>clirr-compatibility-check</id>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to combine clirr-compatibility-check and animal-sniffer under one profile like compatibility-checks?

<!--
CLIRR Maven plugin's dependencies are quite old and not available
in some build environment (Airlock).
https://github.com/googleapis/java-shared-config/issues/956
Extracting this plugin declaration as a profile enables us to disable
the CLIRR dependency resolution by `mvn -P=-clirr-compatibility-check ...`
-->
<activation>
<!-- The compatibility check runs by default in CIs -->
<jdk>[1.8,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
<configuration>
<comparisonVersion>1.27.0</comparisonVersion>
<ignoredDifferencesFile>${basedir}/../clirr-ignored-differences.xml</ignoredDifferencesFile>
<logResults>true</logResults>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>animal-sniffer</id>
<activation>
<!-- The compatibility check runs by default in CIs -->
<jdk>[1.8,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java17</artifactId>
<version>1.0</version>
</signature>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- set project.root-directory property based on where we are -->
<profile>
<id>root-directory</id>
Expand Down