[Git][java-team/access-modifier-checker][upstream] 3 commits: New upstream version 1.22

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Fri Sep 17 08:54:41 BST 2021



Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / access-modifier-checker


Commits:
7494b0c6 by Emmanuel Bourg at 2021-09-17T09:50:55+02:00
New upstream version 1.22
- - - - -
b6452e46 by Emmanuel Bourg at 2021-09-17T09:50:58+02:00
New upstream version 1.23
- - - - -
44246320 by Emmanuel Bourg at 2021-09-17T09:51:13+02:00
New upstream version 1.24
- - - - -


6 changed files:

- access-modifier-annotation/pom.xml
- access-modifier-checker/pom.xml
- access-modifier-checker/src/main/java/org/kohsuke/accmod/impl/Checker.java
- access-modifier-checker/src/main/java/org/kohsuke/accmod/impl/EnforcerMojo.java
- access-modifier-suppressions/pom.xml
- pom.xml


Changes:

=====================================
access-modifier-annotation/pom.xml
=====================================
@@ -4,7 +4,7 @@
   <parent>
     <artifactId>access-modifier</artifactId>
     <groupId>org.kohsuke</groupId>
-    <version>1.21</version>
+    <version>1.24</version>
   </parent>
   <artifactId>access-modifier-annotation</artifactId>
 
@@ -14,7 +14,7 @@
     <dependency>
       <groupId>org.jenkins-ci</groupId>
       <artifactId>annotation-indexer</artifactId>
-      <version>1.12</version>
+      <version>1.14</version>
     </dependency>
     <dependency>
       <groupId>org.ow2.asm</groupId>


=====================================
access-modifier-checker/pom.xml
=====================================
@@ -4,7 +4,7 @@
   <parent>
     <artifactId>access-modifier</artifactId>
     <groupId>org.kohsuke</groupId>
-    <version>1.21</version>
+    <version>1.24</version>
   </parent>
   <artifactId>access-modifier-checker</artifactId>
   <packaging>maven-plugin</packaging>
@@ -54,7 +54,7 @@
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
-      <version>3.6.0</version>
+      <version>3.6.1</version>
       <optional>true</optional> <!-- annotations are not used at runtime because @Retention(value=CLASS), they are needed only to build the plugin -->
     </dependency>
   </dependencies>
@@ -91,7 +91,7 @@
           </plugin>
           <plugin>
             <artifactId>maven-invoker-plugin</artifactId>
-            <version>3.2.1</version>
+            <version>3.2.2</version>
             <executions>
               <execution>
                 <id>integration-test</id>


=====================================
access-modifier-checker/src/main/java/org/kohsuke/accmod/impl/Checker.java
=====================================
@@ -132,15 +132,17 @@ public class Checker {
      * Loads all the access restrictions defined in our dependencies.
      */
     private void loadAccessRestrictions() throws IOException {
-        final Enumeration<URL> res = dependencies.getResources("META-INF/annotations/"+Restricted.class.getName());
-        while (res.hasMoreElements()) {
-            URL url = res.nextElement();
-            loadRestrictions(url.openStream(),false);
+        for (String prefix : new String[] {"META-INF/services/annotations/", "META-INF/annotations/"}) {
+            final Enumeration<URL> res = dependencies.getResources(prefix + Restricted.class.getName());
+            while (res.hasMoreElements()) {
+                URL url = res.nextElement();
+                loadRestrictions(url.openStream(), false);
+            }
         }
     }
 
     /**
-     * Loads an additional restriction from the specified "META-INF/annotations/org.kohsuke.accmod.Restricted" file.
+     * Loads an additional restriction from the specified "META-INF/services/annotations/org.kohsuke.accmod.Restricted" file.
      *
      * @param isInTheInspectedModule
      *      This value shows up in {@link RestrictedElement#isInTheInspectedModule()}.


=====================================
access-modifier-checker/src/main/java/org/kohsuke/accmod/impl/EnforcerMojo.java
=====================================
@@ -21,6 +21,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.Properties;
+import java.util.stream.Collectors;
 
 /**
  * Enforces the {@link Restricted} access modifier annotations.
@@ -74,6 +75,7 @@ public class EnforcerMojo extends AbstractMojo {
                 dependencies.add(a.getFile().toURI().toURL());
             URL outputURL = outputDir.toURI().toURL();
             dependencies.add(outputURL);
+            getLog().debug("inspecting\n" + dependencies.stream().map(URL::toString).collect(Collectors.joining("\n")));
 
             final boolean[] failed = new boolean[1];
             Checker checker = new Checker(new URLClassLoader(dependencies.toArray(new URL[dependencies.size()]), getClass().getClassLoader()),
@@ -93,11 +95,15 @@ public class EnforcerMojo extends AbstractMojo {
                     }
                 }, properties != null ? properties : new Properties(), getLog());
 
-            {// if there's restriction list in the inspected module itself, load it as well
+            // If there is a restriction list in the inspected module itself, load it as well:
+            for (String prefix : new String[] {"META-INF/services/annotations/", "META-INF/annotations/"}) {
+                URL local = new URL(outputURL, prefix + Restricted.class.getName());
                 InputStream self = null;
                 try {
-                    self = new URL(outputURL, "META-INF/annotations/" + Restricted.class.getName()).openStream();
+                    self = local.openStream();
+                    getLog().debug("loaded local index " + local);
                 } catch (IOException e) {
+                    getLog().debug("could not load local index " + local, e);
                 }
                 if (self!=null)
                     checker.loadRestrictions(self, true);


=====================================
access-modifier-suppressions/pom.xml
=====================================
@@ -4,7 +4,7 @@
   <parent>
     <artifactId>access-modifier</artifactId>
     <groupId>org.kohsuke</groupId>
-    <version>1.21</version>
+    <version>1.24</version>
   </parent>
   <artifactId>access-modifier-suppressions</artifactId>
 


=====================================
pom.xml
=====================================
@@ -10,14 +10,15 @@
 
   <groupId>org.kohsuke</groupId>
   <artifactId>access-modifier</artifactId>
-  <version>1.21</version>
+  <version>1.24</version>
 
   <name>Custom access modifier for Java</name>
   <packaging>pom</packaging>
   <description>Extensible application-specific access modifiers for Java</description>
+  <url>https://github.com/jenkinsci/lib-access-modifier</url>
 
   <properties>
-    <revision>1.19</revision>
+    <revision>1.24</revision>
     <changelist>-SNAPSHOT</changelist>
     <gitHubRepo>jenkinsci/lib-access-modifier</gitHubRepo>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -35,7 +36,7 @@
     <connection>scm:git:git at github.com/${gitHubRepo}.git</connection>
     <developerConnection>scm:git:ssh://git@github.com/${gitHubRepo}.git</developerConnection>
     <url>https://github.com/${gitHubRepo}</url>
-    <tag>access-modifier-1.21</tag>
+    <tag>access-modifier-1.24</tag>
   </scm>
 
   <developers>
@@ -76,7 +77,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-plugin-plugin</artifactId>
-        <version>3.6.0</version>
+        <version>3.6.1</version>
         <executions>
           <execution>
             <id>default-descriptor</id>
@@ -99,9 +100,23 @@
       <dependency>
         <groupId>org.ow2.asm</groupId>
         <artifactId>asm</artifactId>
-        <version>9.0</version>
+        <version>9.2</version>
       </dependency>
     </dependencies>
   </dependencyManagement>
 
+  <repositories>
+    <repository>
+      <id>repo.jenkins-ci.org</id>
+      <url>https://repo.jenkins-ci.org/public/</url>
+    </repository>
+  </repositories>
+
+  <pluginRepositories>
+    <pluginRepository>
+      <id>repo.jenkins-ci.org</id>
+      <url>https://repo.jenkins-ci.org/public/</url>
+    </pluginRepository>
+  </pluginRepositories>
+
 </project>



View it on GitLab: https://salsa.debian.org/java-team/access-modifier-checker/-/compare/c6a15e2afe728a36bfb08ccd4f156dfd9e6bbf0a...442463201870a95fc803dc03b973bdd8e0792b37

-- 
View it on GitLab: https://salsa.debian.org/java-team/access-modifier-checker/-/compare/c6a15e2afe728a36bfb08ccd4f156dfd9e6bbf0a...442463201870a95fc803dc03b973bdd8e0792b37
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20210917/8d4808cf/attachment.htm>


More information about the pkg-java-commits mailing list