Author: rfscholte
Date: Sun Oct 15 21:17:29 2017
New Revision: 1812236

URL: http://svn.apache.org/viewvc?rev=1812236&view=rev
Log:
[MJLINK-4] NPE on execution
Use requiresDependencyResolution instead of requiresDependencyCollection (which 
only downloads the poms)

Added:
    maven/plugins/trunk/maven-jlink-plugin/src/it/
    maven/plugins/trunk/maven-jlink-plugin/src/it/mrm/
    maven/plugins/trunk/maven-jlink-plugin/src/it/mrm/settings.xml
    maven/plugins/trunk/maven-jlink-plugin/src/it/projects/
    
maven/plugins/trunk/maven-jlink-plugin/src/it/projects/MJLINK-4_dependencyResolution/
    
maven/plugins/trunk/maven-jlink-plugin/src/it/projects/MJLINK-4_dependencyResolution/pom.xml
Modified:
    maven/plugins/trunk/maven-jlink-plugin/pom.xml
    
maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java

Modified: maven/plugins/trunk/maven-jlink-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jlink-plugin/pom.xml?rev=1812236&r1=1812235&r2=1812236&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jlink-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-jlink-plugin/pom.xml Sun Oct 15 21:17:29 2017
@@ -198,9 +198,36 @@
       <build>
         <plugins>
           <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>mrm-maven-plugin</artifactId>
+          <version>1.1.0</version>
+          <executions>
+            <execution>
+              <goals>
+                <goal>start</goal>
+                <goal>stop</goal>
+              </goals>
+            </execution>
+          </executions>
+          <configuration>
+            <repositories>
+              <mockRepo>
+                <source>src/it/mrm/repository</source>
+              </mockRepo>
+              <proxyRepo/>
+            </repositories>
+          </configuration>
+        </plugin>
+          <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-invoker-plugin</artifactId>
             <configuration>
+              
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <projectsDirectory>src/it/projects</projectsDirectory>
+              <settingsFile>src/it/mrm/settings.xml</settingsFile>
+              <filterProperties>
+                <mrm.repository.url>${mrm.repository.url}</mrm.repository.url>
+              </filterProperties>
               <goals>
                 <goal>clean</goal>
                 <goal>package</goal>
@@ -212,6 +239,7 @@
                 <goals>
                   <goal>install</goal>
                   <goal>integration-test</goal>
+                  <goal>verify</goal>
                 </goals>
               </execution>
             </executions>

Added: maven/plugins/trunk/maven-jlink-plugin/src/it/mrm/settings.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jlink-plugin/src/it/mrm/settings.xml?rev=1812236&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jlink-plugin/src/it/mrm/settings.xml (added)
+++ maven/plugins/trunk/maven-jlink-plugin/src/it/mrm/settings.xml Sun Oct 15 
21:17:29 2017
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
http://maven.apache.org/xsd/settings-1.0.0.xsd";>
+  <mirrors>
+    <mirror>
+      <id>mrm-maven-plugin</id>
+      <name>Mock Repository Manager</name>
+      <url>@mrm.repository.url@</url>
+      <mirrorOf>*</mirrorOf>
+    </mirror>
+  </mirrors>
+  <profiles>
+    <profile>
+      <id>it-repo</id>
+      <repositories>
+        <repository>
+          <id>snapshots</id>
+          <url>@mrm.repository.url@</url>
+          <releases>
+            <enabled>true</enabled>
+            <checksumPolicy>ignore</checksumPolicy>
+            <updatePolicy>never</updatePolicy>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+            <checksumPolicy>ignore</checksumPolicy>
+            <updatePolicy>always</updatePolicy>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>snapshots</id>
+          <url>@mrm.repository.url@</url>
+          <releases>
+            <enabled>true</enabled>
+            <checksumPolicy>ignore</checksumPolicy>
+            <updatePolicy>never</updatePolicy>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+            <checksumPolicy>ignore</checksumPolicy>
+            <updatePolicy>always</updatePolicy>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+  <activeProfiles>
+    <activeProfile>it-repo</activeProfile>
+  </activeProfiles>
+</settings>

Added: 
maven/plugins/trunk/maven-jlink-plugin/src/it/projects/MJLINK-4_dependencyResolution/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jlink-plugin/src/it/projects/MJLINK-4_dependencyResolution/pom.xml?rev=1812236&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-jlink-plugin/src/it/projects/MJLINK-4_dependencyResolution/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-jlink-plugin/src/it/projects/MJLINK-4_dependencyResolution/pom.xml
 Sun Oct 15 21:17:29 2017
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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>
+  <groupId>org.apache.maven.plugins.jlink.its</groupId>
+  <artifactId>mjlink4</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>jlink</packaging>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jlink-plugin</artifactId>
+        <version>@project.version@</version>
+        <extensions>true</extensions>
+        <configuration>
+            <noHeaderFiles>true</noHeaderFiles>
+            <noManPages>true</noManPages>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <!-- use a dependency with a module-info.class -->
+      <artifactId>asm</artifactId>
+      <groupId>org.ow2.asm</groupId>
+      <version>6.0</version>
+    </dependency>
+  </dependencies>
+</project>

Modified: 
maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java?rev=1812236&r1=1812235&r2=1812236&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
 Sun Oct 15 21:17:29 2017
@@ -61,7 +61,7 @@ import org.codehaus.plexus.util.cli.Comm
  * @author Karl Heinz Marbaise <a 
href="mailto:khmarba...@apache.org";>khmarba...@apache.org</a>
  */
 // CHECKSTYLE_OFF: LineLength
-@Mojo( name = "jlink", requiresDependencyCollection = ResolutionScope.RUNTIME, 
defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true )
+@Mojo( name = "jlink", requiresDependencyResolution = ResolutionScope.RUNTIME, 
defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true )
 // CHECKSTYLE_ON: LineLength
 public class JLinkMojo
     extends AbstractJLinkMojo


Reply via email to