diff --git a/pom.xml b/pom.xml index 8e5ca16cab..9c3f66c179 100644 --- a/pom.xml +++ b/pom.xml @@ -98,6 +98,12 @@ 1.9.5 true + 1.14 + + ${access-modifier.version} + ${access-modifier.version} + + false @@ -276,6 +282,12 @@ ${slf4jVersion} test + + org.kohsuke + access-modifier-annotation + ${access-modifier-annotation.version} + provided + commons-logging:commons-logging com.google.code.findbugs:jsr305 - org.kohsuke:access-modifier-annotation net.java.dev.jna:jna @@ -677,6 +688,14 @@ org.kohsuke access-modifier-checker + + + + useBeta + ${useBeta} + + + org.codehaus.gmaven diff --git a/src/it/beta-fail/downstream/pom.xml b/src/it/beta-fail/downstream/pom.xml new file mode 100644 index 0000000000..173b62623a --- /dev/null +++ b/src/it/beta-fail/downstream/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + org.jenkins-ci.plugins.its + beta-fail + 1.0-SNAPSHOT + + org.jenkins-ci.plugins.its.beta-fail + downstream + hpi + + + org.jenkins-ci.plugins.its.beta-fail + upstream + 1.0-SNAPSHOT + + + diff --git a/src/it/beta-fail/downstream/src/main/java/downstream/Caller.java b/src/it/beta-fail/downstream/src/main/java/downstream/Caller.java new file mode 100644 index 0000000000..8278aae38c --- /dev/null +++ b/src/it/beta-fail/downstream/src/main/java/downstream/Caller.java @@ -0,0 +1,7 @@ +package downstream; +import upstream.Api; +public class Caller { + static { + Api.experimental(); + } +} diff --git a/src/it/beta-fail/invoker.properties b/src/it/beta-fail/invoker.properties new file mode 100644 index 0000000000..d7458cf72a --- /dev/null +++ b/src/it/beta-fail/invoker.properties @@ -0,0 +1,2 @@ +invoker.goals=clean install +invoker.buildResult=failure diff --git a/src/it/beta-fail/pom.xml b/src/it/beta-fail/pom.xml new file mode 100644 index 0000000000..d8e8fb8064 --- /dev/null +++ b/src/it/beta-fail/pom.xml @@ -0,0 +1,36 @@ + + + 4.0.0 + + org.jenkins-ci.plugins + plugin + @project.version@ + + + org.jenkins-ci.plugins.its + beta-fail + 1.0-SNAPSHOT + pom + + 2.60.3 + 8 + true + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + + upstream + downstream + + diff --git a/src/it/beta-fail/postbuild.groovy b/src/it/beta-fail/postbuild.groovy new file mode 100644 index 0000000000..1854c1268d --- /dev/null +++ b/src/it/beta-fail/postbuild.groovy @@ -0,0 +1,3 @@ +assert new File(basedir, 'build.log').text.contains('[ERROR] downstream/Caller:5 upstream/Api.experimental()V is still in beta') + +return true diff --git a/src/it/beta-fail/upstream/pom.xml b/src/it/beta-fail/upstream/pom.xml new file mode 100644 index 0000000000..29ab7add96 --- /dev/null +++ b/src/it/beta-fail/upstream/pom.xml @@ -0,0 +1,13 @@ + + + 4.0.0 + + org.jenkins-ci.plugins.its + beta-fail + 1.0-SNAPSHOT + + org.jenkins-ci.plugins.its.beta-fail + upstream + hpi + diff --git a/src/it/beta-fail/upstream/src/main/java/upstream/Api.java b/src/it/beta-fail/upstream/src/main/java/upstream/Api.java new file mode 100644 index 0000000000..9df5a346c2 --- /dev/null +++ b/src/it/beta-fail/upstream/src/main/java/upstream/Api.java @@ -0,0 +1,7 @@ +package upstream; +import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.Beta; +public class Api { + @Restricted(Beta.class) + public static void experimental() {} +} diff --git a/src/it/beta-just-testing/downstream/pom.xml b/src/it/beta-just-testing/downstream/pom.xml new file mode 100644 index 0000000000..1cc1b923ea --- /dev/null +++ b/src/it/beta-just-testing/downstream/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + org.jenkins-ci.plugins.its + beta-just-testing + 1.0-SNAPSHOT + + org.jenkins-ci.plugins.its.beta-just-testing + downstream + hpi + + + org.jenkins-ci.plugins.its.beta-just-testing + upstream + 1.0-SNAPSHOT + + + diff --git a/src/it/beta-just-testing/downstream/src/main/java/downstream/NotCaller.java b/src/it/beta-just-testing/downstream/src/main/java/downstream/NotCaller.java new file mode 100644 index 0000000000..2df18fd6bd --- /dev/null +++ b/src/it/beta-just-testing/downstream/src/main/java/downstream/NotCaller.java @@ -0,0 +1,3 @@ +package downstream; +public class NotCaller { +} diff --git a/src/it/beta-just-testing/downstream/src/test/java/downstream/ApiTest.java b/src/it/beta-just-testing/downstream/src/test/java/downstream/ApiTest.java new file mode 100644 index 0000000000..f9b3842e68 --- /dev/null +++ b/src/it/beta-just-testing/downstream/src/test/java/downstream/ApiTest.java @@ -0,0 +1,7 @@ +package downstream; +import upstream.Api; +public class ApiTest { + static { + Api.experimental(); + } +} diff --git a/src/it/beta-just-testing/invoker.properties b/src/it/beta-just-testing/invoker.properties new file mode 100644 index 0000000000..4b89532743 --- /dev/null +++ b/src/it/beta-just-testing/invoker.properties @@ -0,0 +1 @@ +invoker.goals=clean install diff --git a/src/it/beta-just-testing/pom.xml b/src/it/beta-just-testing/pom.xml new file mode 100644 index 0000000000..64d3d093d2 --- /dev/null +++ b/src/it/beta-just-testing/pom.xml @@ -0,0 +1,36 @@ + + + 4.0.0 + + org.jenkins-ci.plugins + plugin + @project.version@ + + + org.jenkins-ci.plugins.its + beta-just-testing + 1.0-SNAPSHOT + pom + + 2.7.3 + 7 + true + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + + upstream + downstream + + diff --git a/src/it/beta-just-testing/upstream/pom.xml b/src/it/beta-just-testing/upstream/pom.xml new file mode 100644 index 0000000000..29359fd440 --- /dev/null +++ b/src/it/beta-just-testing/upstream/pom.xml @@ -0,0 +1,13 @@ + + + 4.0.0 + + org.jenkins-ci.plugins.its + beta-just-testing + 1.0-SNAPSHOT + + org.jenkins-ci.plugins.its.beta-just-testing + upstream + hpi + diff --git a/src/it/beta-just-testing/upstream/src/main/java/upstream/Api.java b/src/it/beta-just-testing/upstream/src/main/java/upstream/Api.java new file mode 100644 index 0000000000..9df5a346c2 --- /dev/null +++ b/src/it/beta-just-testing/upstream/src/main/java/upstream/Api.java @@ -0,0 +1,7 @@ +package upstream; +import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.Beta; +public class Api { + @Restricted(Beta.class) + public static void experimental() {} +} diff --git a/src/it/beta-pass/downstream/pom.xml b/src/it/beta-pass/downstream/pom.xml new file mode 100644 index 0000000000..2b07d2bd81 --- /dev/null +++ b/src/it/beta-pass/downstream/pom.xml @@ -0,0 +1,23 @@ + + + 4.0.0 + + org.jenkins-ci.plugins.its + beta-pass + 1.0-SNAPSHOT + + org.jenkins-ci.plugins.its.beta-pass + downstream + hpi + + true + + + + org.jenkins-ci.plugins.its.beta-pass + upstream + 1.0-SNAPSHOT + + + diff --git a/src/it/beta-pass/downstream/src/main/java/downstream/Caller.java b/src/it/beta-pass/downstream/src/main/java/downstream/Caller.java new file mode 100644 index 0000000000..8278aae38c --- /dev/null +++ b/src/it/beta-pass/downstream/src/main/java/downstream/Caller.java @@ -0,0 +1,7 @@ +package downstream; +import upstream.Api; +public class Caller { + static { + Api.experimental(); + } +} diff --git a/src/it/beta-pass/invoker.properties b/src/it/beta-pass/invoker.properties new file mode 100644 index 0000000000..4b89532743 --- /dev/null +++ b/src/it/beta-pass/invoker.properties @@ -0,0 +1 @@ +invoker.goals=clean install diff --git a/src/it/beta-pass/pom.xml b/src/it/beta-pass/pom.xml new file mode 100644 index 0000000000..53453574bd --- /dev/null +++ b/src/it/beta-pass/pom.xml @@ -0,0 +1,36 @@ + + + 4.0.0 + + org.jenkins-ci.plugins + plugin + @project.version@ + + + org.jenkins-ci.plugins.its + beta-pass + 1.0-SNAPSHOT + pom + + 2.107.1 + 8 + true + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + + upstream + downstream + + diff --git a/src/it/beta-pass/upstream/pom.xml b/src/it/beta-pass/upstream/pom.xml new file mode 100644 index 0000000000..7ad4e944b3 --- /dev/null +++ b/src/it/beta-pass/upstream/pom.xml @@ -0,0 +1,13 @@ + + + 4.0.0 + + org.jenkins-ci.plugins.its + beta-pass + 1.0-SNAPSHOT + + org.jenkins-ci.plugins.its.beta-pass + upstream + hpi + diff --git a/src/it/beta-pass/upstream/src/main/java/upstream/Api.java b/src/it/beta-pass/upstream/src/main/java/upstream/Api.java new file mode 100644 index 0000000000..9df5a346c2 --- /dev/null +++ b/src/it/beta-pass/upstream/src/main/java/upstream/Api.java @@ -0,0 +1,7 @@ +package upstream; +import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.Beta; +public class Api { + @Restricted(Beta.class) + public static void experimental() {} +}