Skip to content

Commit 91a254d

Browse files
committed
declare plugins wrapped by profiles
1 parent c38efab commit 91a254d

File tree

3 files changed

+104
-66
lines changed

3 files changed

+104
-66
lines changed

google-http-client-appengine/pom.xml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@
1212
<name>Google App Engine extensions to the Google HTTP Client Library for Java.</name>
1313

1414
<build>
15+
<pluginManagement>
16+
<plugins>
17+
<!--App Engine uses Java 7 and above-->
18+
<plugin>
19+
<groupId>org.codehaus.mojo</groupId>
20+
<artifactId>animal-sniffer-maven-plugin</artifactId>
21+
<configuration>
22+
<signature>
23+
<groupId>org.codehaus.mojo.signature</groupId>
24+
<artifactId>java17</artifactId>
25+
<version>1.0</version>
26+
</signature>
27+
</configuration>
28+
</plugin>
29+
</plugins>
30+
</pluginManagement>
1531
<plugins>
1632
<plugin>
1733
<artifactId>maven-javadoc-plugin</artifactId>
@@ -27,18 +43,6 @@
2743
<plugin>
2844
<artifactId>maven-source-plugin</artifactId>
2945
</plugin>
30-
<!--App Engine uses Java 7 and above-->
31-
<plugin>
32-
<groupId>org.codehaus.mojo</groupId>
33-
<artifactId>animal-sniffer-maven-plugin</artifactId>
34-
<configuration>
35-
<signature>
36-
<groupId>org.codehaus.mojo.signature</groupId>
37-
<artifactId>java17</artifactId>
38-
<version>1.0</version>
39-
</signature>
40-
</configuration>
41-
</plugin>
4246
<plugin>
4347
<groupId>org.apache.maven.plugins</groupId>
4448
<artifactId>maven-dependency-plugin</artifactId>

google-http-client-findbugs/pom.xml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,22 @@
1212
<name>Google APIs Client Library Findbugs custom plugin.</name>
1313

1414
<build>
15+
<pluginManagement>
16+
<plugins>
17+
<plugin>
18+
<groupId>org.codehaus.mojo</groupId>
19+
<artifactId>animal-sniffer-maven-plugin</artifactId>
20+
<configuration>
21+
<skip>true</skip>
22+
</configuration>
23+
</plugin>
24+
</plugins>
25+
</pluginManagement>
1526
<plugins>
1627
<plugin>
1728
<artifactId>maven-source-plugin</artifactId>
1829
</plugin>
19-
<plugin>
20-
<groupId>org.codehaus.mojo</groupId>
21-
<artifactId>animal-sniffer-maven-plugin</artifactId>
22-
<configuration>
23-
<skip>true</skip>
24-
</configuration>
25-
</plugin>
30+
2631
<plugin>
2732
<groupId>org.apache.maven.plugins</groupId>
2833
<artifactId>maven-dependency-plugin</artifactId>

pom.xml

Lines changed: 76 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -505,53 +505,6 @@
505505
</plugins>
506506
</configuration>
507507
</plugin>
508-
<plugin>
509-
<groupId>org.codehaus.mojo</groupId>
510-
<artifactId>clirr-maven-plugin</artifactId>
511-
<configuration>
512-
<ignoredDifferencesFile>clirr-ignored-differences.xml</ignoredDifferencesFile>
513-
<logResults>true</logResults>
514-
</configuration>
515-
<executions>
516-
<execution>
517-
<goals>
518-
<goal>check</goal>
519-
</goals>
520-
</execution>
521-
</executions>
522-
</plugin>
523-
<plugin>
524-
<groupId>org.codehaus.mojo</groupId>
525-
<artifactId>animal-sniffer-maven-plugin</artifactId>
526-
<executions>
527-
<execution>
528-
<id>java7</id>
529-
<goals>
530-
<goal>check</goal>
531-
</goals>
532-
<configuration>
533-
<signature>
534-
<groupId>org.codehaus.mojo.signature</groupId>
535-
<artifactId>java17</artifactId>
536-
<version>1.0</version>
537-
</signature>
538-
</configuration>
539-
</execution>
540-
<execution>
541-
<id>android</id>
542-
<goals>
543-
<goal>check</goal>
544-
</goals>
545-
<configuration>
546-
<signature>
547-
<groupId>net.sf.androidscents.signature</groupId>
548-
<artifactId>android-api-level-19</artifactId>
549-
<version>4.4.2_r4</version>
550-
</signature>
551-
</configuration>
552-
</execution>
553-
</executions>
554-
</plugin>
555508
<!-- Build the dependencies report at package time (needed for the assembly artifact). -->
556509
<plugin>
557510
<artifactId>maven-project-info-reports-plugin</artifactId>
@@ -614,6 +567,82 @@
614567
</properties>
615568

616569
<profiles>
570+
<profile>
571+
<id>clirr-compatibility-check</id>
572+
<!--
573+
CLIRR Maven plugin's dependencies are quite old and not available
574+
in some build environment (Airlock).
575+
https://github.com/googleapis/java-shared-config/issues/956
576+
Extracting this plugin declaration as a profile enables us to disable
577+
the CLIRR dependency resolution by `mvn -P=-clirr-compatibility-check ...`
578+
-->
579+
<activation>
580+
<!-- The compatibility check runs by default in CIs -->
581+
<jdk>[1.8,)</jdk>
582+
</activation>
583+
<build>
584+
<plugins>
585+
<plugin>
586+
<groupId>org.codehaus.mojo</groupId>
587+
<artifactId>clirr-maven-plugin</artifactId>
588+
<configuration>
589+
<ignoredDifferencesFile>clirr-ignored-differences.xml</ignoredDifferencesFile>
590+
<logResults>true</logResults>
591+
</configuration>
592+
<executions>
593+
<execution>
594+
<goals>
595+
<goal>check</goal>
596+
</goals>
597+
</execution>
598+
</executions>
599+
</plugin>
600+
</plugins>
601+
</build>
602+
</profile>
603+
<profile>
604+
<id>animal-sniffer</id>
605+
<activation>
606+
<!-- The compatibility check runs by default in CIs -->
607+
<jdk>[1.7,)</jdk>
608+
</activation>
609+
<build>
610+
<plugins>
611+
<plugin>
612+
<groupId>org.codehaus.mojo</groupId>
613+
<artifactId>animal-sniffer-maven-plugin</artifactId>
614+
<executions>
615+
<execution>
616+
<id>java7</id>
617+
<goals>
618+
<goal>check</goal>
619+
</goals>
620+
<configuration>
621+
<signature>
622+
<groupId>org.codehaus.mojo.signature</groupId>
623+
<artifactId>java17</artifactId>
624+
<version>1.0</version>
625+
</signature>
626+
</configuration>
627+
</execution>
628+
<execution>
629+
<id>android</id>
630+
<goals>
631+
<goal>check</goal>
632+
</goals>
633+
<configuration>
634+
<signature>
635+
<groupId>net.sf.androidscents.signature</groupId>
636+
<artifactId>android-api-level-19</artifactId>
637+
<version>4.4.2_r4</version>
638+
</signature>
639+
</configuration>
640+
</execution>
641+
</executions>
642+
</plugin>
643+
</plugins>
644+
</build>
645+
</profile>
617646
<profile>
618647
<id>java21</id>
619648
<activation>

0 commit comments

Comments
 (0)