You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2018/01/19 22:44:28 UTC

[1/4] maven git commit: [MNG-6296] 3.5.2: ClassNotFoundException: javax.annotation.security.RolesAllowed [Forced Update!]

Repository: maven
Updated Branches:
  refs/heads/MNG-6342 aa8efe3c2 -> 598808552 (forced update)


[MNG-6296] 3.5.2: ClassNotFoundException: javax.annotation.security.RolesAllowed

Adding exportedPackage to find class:
javax.annotation.security.RolesAllowed

First maven commit :) Works but might be deeper issue

Signed-off-by: Karl Heinz Marbaise <kh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/c311e0d8
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/c311e0d8
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/c311e0d8

Branch: refs/heads/MNG-6342
Commit: c311e0d812eadd782a59b7f8e939becf7c1da74b
Parents: 2b336ff
Author: Bengt Söderberg <be...@purplescout.se>
Authored: Mon Nov 27 19:19:48 2017 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Wed Jan 17 19:16:02 2018 +0100

----------------------------------------------------------------------
 maven-core/src/main/resources/META-INF/maven/extension.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/c311e0d8/maven-core/src/main/resources/META-INF/maven/extension.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/META-INF/maven/extension.xml b/maven-core/src/main/resources/META-INF/maven/extension.xml
index c5f40b5..6329aaa 100644
--- a/maven-core/src/main/resources/META-INF/maven/extension.xml
+++ b/maven-core/src/main/resources/META-INF/maven/extension.xml
@@ -100,6 +100,7 @@ under the License.
 
     <!-- javax.annotation (JSR-250) -->
     <exportedPackage>javax.annotation.*</exportedPackage>
+    <exportedPackage>javax.annotation.security.*</exportedPackage>
 
     <!-- 
       | We may potentially want to export these, but right now I'm not sure that anything Guice specific needs


[3/4] maven git commit: [MNG-6298] 3.5.2: ClassNotFoundException: javax.annotation.security.RolesAllowed

Posted by kh...@apache.org.
[MNG-6298] 3.5.2: ClassNotFoundException: javax.annotation.security.RolesAllowed

Adding exportedPackage to find class:
javax.annotation.security.RolesAllowed

First maven commit :) Works but might be deeper issue

Signed-off-by: Karl Heinz Marbaise <kh...@apache.org>
Now with correct issue reference.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/6285bb96
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/6285bb96
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/6285bb96

Branch: refs/heads/MNG-6342
Commit: 6285bb96c5104a9eabd4e35131aec917b4f9e048
Parents: 42918c3
Author: Bengt Söderberg <be...@purplescout.se>
Authored: Mon Nov 27 19:19:48 2017 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Fri Jan 19 19:40:50 2018 +0100

----------------------------------------------------------------------
 maven-core/src/main/resources/META-INF/maven/extension.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/6285bb96/maven-core/src/main/resources/META-INF/maven/extension.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/META-INF/maven/extension.xml b/maven-core/src/main/resources/META-INF/maven/extension.xml
index c5f40b5..6329aaa 100644
--- a/maven-core/src/main/resources/META-INF/maven/extension.xml
+++ b/maven-core/src/main/resources/META-INF/maven/extension.xml
@@ -100,6 +100,7 @@ under the License.
 
     <!-- javax.annotation (JSR-250) -->
     <exportedPackage>javax.annotation.*</exportedPackage>
+    <exportedPackage>javax.annotation.security.*</exportedPackage>
 
     <!-- 
       | We may potentially want to export these, but right now I'm not sure that anything Guice specific needs


[2/4] maven git commit: Revert "[MNG-6296] 3.5.2: ClassNotFoundException: javax.annotation.security.RolesAllowed"

Posted by kh...@apache.org.
Revert "[MNG-6296] 3.5.2: ClassNotFoundException: javax.annotation.security.RolesAllowed"

This reverts commit c311e0d812eadd782a59b7f8e939becf7c1da74b.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/42918c37
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/42918c37
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/42918c37

Branch: refs/heads/MNG-6342
Commit: 42918c37c55e9ff83358ced305bc1f0b711b83d0
Parents: c311e0d
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Thu Jan 18 20:18:32 2018 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Thu Jan 18 20:18:32 2018 +0100

----------------------------------------------------------------------
 maven-core/src/main/resources/META-INF/maven/extension.xml | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/42918c37/maven-core/src/main/resources/META-INF/maven/extension.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/META-INF/maven/extension.xml b/maven-core/src/main/resources/META-INF/maven/extension.xml
index 6329aaa..c5f40b5 100644
--- a/maven-core/src/main/resources/META-INF/maven/extension.xml
+++ b/maven-core/src/main/resources/META-INF/maven/extension.xml
@@ -100,7 +100,6 @@ under the License.
 
     <!-- javax.annotation (JSR-250) -->
     <exportedPackage>javax.annotation.*</exportedPackage>
-    <exportedPackage>javax.annotation.security.*</exportedPackage>
 
     <!-- 
       | We may potentially want to export these, but right now I'm not sure that anything Guice specific needs


[4/4] maven git commit: [MNG-6342] Emit a WARNING about LATEST/RELEASE in parent

Posted by kh...@apache.org.
[MNG-6342] Emit a WARNING about LATEST/RELEASE in parent


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/59880855
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/59880855
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/59880855

Branch: refs/heads/MNG-6342
Commit: 5988085525a39025a9f3d7cfb0592d42261abaf0
Parents: 6285bb9
Author: Karl Heinz Marbaise <kh...@apache.org>
Authored: Thu Jan 18 15:50:36 2018 +0100
Committer: Karl Heinz Marbaise <kh...@apache.org>
Committed: Fri Jan 19 23:43:59 2018 +0100

----------------------------------------------------------------------
 .../model/validation/DefaultModelValidator.java |  7 ++++
 .../validation/DefaultModelValidatorTest.java   | 15 ++++++++
 .../raw-model/bad-parent-version-latest.xml     | 37 ++++++++++++++++++++
 .../raw-model/bad-parent-version-release.xml    | 37 ++++++++++++++++++++
 4 files changed, 96 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/59880855/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
index 9299b43..f0acb1f 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
@@ -105,6 +105,13 @@ public class DefaultModelValidator
                                   + ", the parent element cannot have the same groupId:artifactId as the project.",
                               parent );
             }
+            
+            if ( equals( "LATEST", parent.getVersion() ) || equals( "RELEASE", parent.getVersion() ) )
+            {
+                addViolation( problems, Severity.WARNING, Version.BASE, "parent.version", null,
+                              "is either LATEST or RELEASE (both of them are being deprecated)", parent );
+            }
+            
         }
 
         if ( request.getValidationLevel() >= ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0 )

http://git-wip-us.apache.org/repos/asf/maven/blob/59880855/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
index 0bb3bd4..b02e0d9 100644
--- a/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
@@ -781,4 +781,19 @@ public class DefaultModelValidatorTest
         assertEquals( "'version' contains an expression but should be a constant.", result.getWarnings().get( 0 ) );
     }
 
+    public void testParentVersionLATEST()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/bad-parent-version-latest.xml" );
+        assertViolations( result, 0, 0, 1 );
+        assertEquals( "'parent.version' is either LATEST or RELEASE (both of them are being deprecated)", result.getWarnings().get( 0 ) );
+    }
+
+    public void testParentVersionRELEASE()
+        throws Exception
+    {
+        SimpleProblemCollector result = validateRaw( "raw-model/bad-parent-version-release.xml" );
+        assertViolations( result, 0, 0, 1 );
+        assertEquals( "'parent.version' is either LATEST or RELEASE (both of them are being deprecated)", result.getWarnings().get( 0 ) );
+    }
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/59880855/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-latest.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-latest.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-latest.xml
new file mode 100644
index 0000000..7ed30ad
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-latest.xml
@@ -0,0 +1,37 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	
+	<parent>
+		<groupId>com.example.group</groupId>
+		<artifactId>com-parent</artifactId>
+		<version>LATEST</version>
+	</parent>
+	<groupId>com.example.group</groupId>
+	<artifactId>valid-version-wrong</artifactId>
+	<version>1.0</version>
+
+	<description>
+        This will test if the validation for the parent version
+        is working correct in case of usage of LATEST
+	</description>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/59880855/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-release.xml
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-release.xml b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-release.xml
new file mode 100644
index 0000000..65fcc26
--- /dev/null
+++ b/maven-model-builder/src/test/resources/poms/validation/raw-model/bad-parent-version-release.xml
@@ -0,0 +1,37 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	
+	<parent>
+		<groupId>com.example.group</groupId>
+		<artifactId>com-parent</artifactId>
+		<version>RELEASE</version>
+	</parent>
+	<groupId>com.example.group</groupId>
+	<artifactId>valid-version-wrong</artifactId>
+	<version>1.0</version>
+
+	<description>
+        This will test if the validation for the parent version
+        is working correct in case of usage of RELEASE
+	</description>
+</project>
\ No newline at end of file