[maven-doxia] branch master updated: [DOXIA-565] improved Doxia Document descriptor reference

2017-11-16 Thread hboutemy
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git


The following commit(s) were added to refs/heads/master by this push:
 new 1e62dde  [DOXIA-565] improved Doxia Document descriptor reference
1e62dde is described below

commit 1e62dde86b1bcf0bbfec37e2a5f0b2e6d178bacb
Author: Hervé Boutemy 
AuthorDate: Thu Nov 16 14:03:45 2017 +0100

[DOXIA-565] improved Doxia Document descriptor reference
---
 doxia-core/src/main/mdo/document.mdo   | 19 +---
 doxia-core/src/site/apt/using-document-xsd.apt | 42 --
 doxia-core/src/site/site.xml   |  8 +++--
 3 files changed, 19 insertions(+), 50 deletions(-)

diff --git a/doxia-core/src/main/mdo/document.mdo 
b/doxia-core/src/main/mdo/document.mdo
index a338c49..aaea2f3 100644
--- a/doxia-core/src/main/mdo/document.mdo
+++ b/doxia-core/src/main/mdo/document.mdo
@@ -19,12 +19,21 @@
   under the License.
 -->
 
-http://modello.codehaus.org/MODELLO/1.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.0.0 
http://modello.codehaus.org/xsd/modello-1.0.0.xsd";
-  xml.namespace="http://maven.apache.org/DOCUMENT/${version}";>
+http://codehaus-plexus.github.io/MODELLO/1.8.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://codehaus-plexus.github.io/MODELLO/1.8.0 
http://codehaus-plexus.github.io/modello/xsd/https://codehaus-plexus.github.io/modello/xsd/modello-1.8.0.xsd";
+  xml.namespace="http://maven.apache.org/DOCUMENT/${version}";
+  xml.schemaLocation="http://maven.apache.org/xsd/document-${version}.xsd";>
   document
   Document
   

[maven-doxia] branch master updated: fixed site publication issue (NPE on m-enforcer-p)

2017-11-16 Thread hboutemy
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git


The following commit(s) were added to refs/heads/master by this push:
 new 51310df  fixed site publication issue (NPE on m-enforcer-p)
51310df is described below

commit 51310df6d77267fd4c3fd94391ec3b57df4e2e12
Author: Hervé Boutemy 
AuthorDate: Thu Nov 16 15:00:38 2017 +0100

fixed site publication issue (NPE on m-enforcer-p)
---
 pom.xml | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/pom.xml b/pom.xml
index ed62a97..780ae8a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -304,6 +304,17 @@ under the License.
   
 
   
+  
+org.apache.maven.plugins
+maven-enforcer-plugin
+
+  
+org.codehaus.mojo
+extra-enforcer-rules
+1.0-beta-6
+  
+
+  
 
   
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@maven.apache.org" '].


svn commit: r1020947 - in /websites/production/maven-doxia/content/doxia-archives/doxia-LATEST: ./ apidocs/ apidocs/org/apache/maven/doxia/ apidocs/org/apache/maven/doxia/class-use/ apidocs/org/apache

2017-11-16 Thread hboutemy
Author: hboutemy
Date: Thu Nov 16 15:09:47 2017
New Revision: 1020947

Log:
Site checkin for project Doxia


[This commit notification would consist of 236 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]


svn commit: r1815492 - /maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt

2017-11-16 Thread hboutemy
Author: hboutemy
Date: Thu Nov 16 17:36:49 2017
New Revision: 1815492

URL: http://svn.apache.org/viewvc?rev=1815492&view=rev
Log:
simplest plugin has one *goal*

Modified:
maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt

Modified: 
maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt
URL: 
http://svn.apache.org/viewvc/maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt?rev=1815492&r1=1815491&r2=1815492&view=diff
==
--- 
maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt 
(original)
+++ 
maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt 
Thu Nov 16 17:36:49 2017
@@ -45,14 +45,14 @@ Introduction
 
 * Your First Plugin
 
-  In this section we will build a simple plugin which takes no parameters
+  In this section we will build a simple plugin with one goal which takes no 
parameters
   and simply displays a message on the screen when run.  Along the way, we
   will cover the basics of setting up a project to create a plugin, the
-  minimal contents of a Java mojo, and a couple ways to execute the mojo.
+  minimal contents of a Java mojo which will define goal code, and a couple 
ways to execute the mojo.
 
 ** Your First Mojo
 
-  At its simplest, a Java mojo consists simply of a single class.  There is
+  At its simplest, a Java mojo consists simply of a single class representing 
one plugin's goal.  There is
   no requirement for multiple classes like EJBs, although a plugin which
   contains a number of similar mojos is likely to use an abstract
   superclass for the mojos to consolidate code common to all mojos.
@@ -729,7 +729,7 @@ public class MyQueryMojo
 
 [[1]] {{{../../developers/mojo-api-specification.html}Mojo 
Documentation}}: Mojo API, Mojo annotations
 
-[[2]] 
{{{http://maven.apache.org/shared/maven-plugin-testing-harness/}Maven Plugin 
Testing Harness}}: Testing framework for your Mojos.
+[[2]] {{{/shared/maven-plugin-testing-harness/}Maven Plugin Testing 
Harness}}: Testing framework for your Mojos.
 
 [[3]] {{{https://codehaus-plexus.github.io/}Plexus}}: The IoC container 
used by Maven.
 




svn commit: r1815493 - /maven/site/trunk/content/apt/plugins/index.apt

2017-11-16 Thread rfscholte
Author: rfscholte
Date: Thu Nov 16 18:04:53 2017
New Revision: 1815493

URL: http://svn.apache.org/viewvc?rev=1815493&view=rev
Log:
Add JDeprScan

Modified:
maven/site/trunk/content/apt/plugins/index.apt

Modified: maven/site/trunk/content/apt/plugins/index.apt
URL: 
http://svn.apache.org/viewvc/maven/site/trunk/content/apt/plugins/index.apt?rev=1815493&r1=1815492&r2=1815493&view=diff
==
--- maven/site/trunk/content/apt/plugins/index.apt (original)
+++ maven/site/trunk/content/apt/plugins/index.apt Thu Nov 16 18:04:53 2017
@@ -155,6 +155,8 @@ Available Plugins
 
*--++--++--+++
 | {{{/plugins/maven-jarsigner-plugin/} <<>>}}   | B  | 
1.4  | 2015-01-21 | Signs or verifies project artifacts. | 
{{{https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-jarsigner-plugin}SVN}}
 | {{{https://issues.apache.org/jira/browse/MJARSIGNER}JIRA}}
 
*--++--++--+++
+| {{{/plugins/maven-jdeprscan-plugin/} <<>>}}   | B  | 
3.0.0-alpha-1| 2017-11-15 | Run JDK's JDeprScan tool on the project. | 
{{{https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-jdeprscan-plugin}SVN}}
 | {{{https://issues.apache.org/jira/browse/MJDEPRSCAN}JIRA}}
+*--++--++--+++
 | {{{/plugins/maven-patch-plugin/} <<>>}}   | B  | 
1.2  | 2015-03-09 | Use the gnu patch tool to apply patch files to 
source code. | 
{{{https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-patch-plugin}SVN}}
 | {{{https://issues.apache.org/jira/browse/MPATCH}JIRA}}
 
*--++--++--+++
 | {{{/plugins/maven-pdf-plugin/} <<>>}}   | B  | 
1.3  | 2015-02-16 | Generate a PDF version of your project's 
documentation. | 
{{{https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-pdf-plugin}SVN}} 
| {{{https://issues.apache.org/jira/browse/MPDF}JIRA}}




svn commit: r1815494 - /maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt

2017-11-16 Thread hboutemy
Author: hboutemy
Date: Thu Nov 16 18:11:18 2017
New Revision: 1815494

URL: http://svn.apache.org/viewvc?rev=1815494&view=rev
Log:
added process-classes phase now separate from compile to get plugin descriptor 
and link to reference

Modified:
maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt

Modified: 
maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt
URL: 
http://svn.apache.org/viewvc/maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt?rev=1815494&r1=1815493&r2=1815494&view=diff
==
--- 
maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt 
(original)
+++ 
maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt 
Thu Nov 16 18:11:18 2017
@@ -169,14 +169,15 @@ public class GreetingMojo extends Abstra
 
 ++
 
-** Build Goals
+** Building a Plugin
 
-  There are few goals which are defined with the <<>>
-  packaging as part of a standard build lifecycle:
+  There are few plugins goals bound to the standard build lifecycle
+  defined with the <<>> packaging:
 
 *-++
-|<<>>|Compiles the Java code for the plugin and builds the|
-| |plugin descriptor   |
+|<<>>|Compiles the Java code for the plugin   |
+*-++
+|<<>>|Extracts data to build the plugin descriptor|
 *-++
 |<<>>   |Runs the plugin's unit tests|
 *-++
@@ -187,6 +188,9 @@ public class GreetingMojo extends Abstra
 |<<>> |Deploys the plugin jar to the remote repository |
 *-++
 
+  For more details, you can look at
+  
{{{/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_maven-plugin_packaging}
 detailed bindings for <<>> packaging}}.
+
 ** Executing Your First Mojo
 
   The most direct means of executing your new plugin is to specify the




[1/3] maven-surefire git commit: [SUREFIRE-1262] Add modulepath support [Forced Update!]

2017-11-16 Thread tibordigana
Repository: maven-surefire
Updated Branches:
  refs/heads/SUREFIRE-1262_2 7f13e53ba -> ec354cc73 (forced update)


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/ec354cc7/surefire-integration-tests/src/test/resources/modulepath/src/test/java/com/app/AppTest.java
--
diff --git 
a/surefire-integration-tests/src/test/resources/modulepath/src/test/java/com/app/AppTest.java
 
b/surefire-integration-tests/src/test/resources/modulepath/src/test/java/com/app/AppTest.java
new file mode 100644
index 000..aa836a4
--- /dev/null
+++ 
b/surefire-integration-tests/src/test/resources/modulepath/src/test/java/com/app/AppTest.java
@@ -0,0 +1,36 @@
+package com.app;
+
+/*
+ * 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.
+ */
+
+import org.testng.annotations.Test;
+
+@Test
+public class AppTest
+{
+public void testNoop()
+throws Exception
+{
+}
+
+public void testMain()
+{
+Main.main();
+}
+}



[2/3] maven-surefire git commit: [SUREFIRE-1262] Add modulepath support

2017-11-16 Thread tibordigana
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/ec354cc7/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
new file mode 100644
index 000..2b47c03
--- /dev/null
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
@@ -0,0 +1,230 @@
+package org.apache.maven.plugin.surefire.booterclient;
+
+/*
+ * 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.
+ */
+
+import 
org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline;
+import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
+import org.apache.maven.surefire.booter.AbstractPathConfiguration;
+import org.apache.maven.surefire.booter.Classpath;
+import org.apache.maven.surefire.booter.ModularClasspath;
+import org.apache.maven.surefire.booter.ModularClasspathConfiguration;
+import org.apache.maven.surefire.booter.StartupConfiguration;
+import org.apache.maven.surefire.booter.SurefireBooterForkException;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.ModuleVisitor;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import static java.io.File.createTempFile;
+import static java.io.File.pathSeparatorChar;
+import static 
org.apache.maven.plugin.surefire.SurefireHelper.escapeToPlatformPath;
+import static org.objectweb.asm.Opcodes.ASM6;
+
+/**
+ * @author mailto:tibordig...@apache.org";>Tibor Digana (tibor17)
+ * @since 2.21.0.Jigsaw
+ */
+public class ModularClasspathForkConfiguration
+extends DefaultForkConfiguration
+{
+@SuppressWarnings( "checkstyle:parameternumber" )
+public ModularClasspathForkConfiguration( @Nonnull Classpath bootClasspath,
+  @Nonnull File tempDirectory,
+  @Nullable String debugLine,
+  @Nonnull File workingDirectory,
+  @Nonnull Properties 
modelProperties,
+  @Nullable String argLine,
+  @Nonnull Map 
environmentVariables,
+  boolean debug,
+  int forkCount,
+  boolean reuseForks,
+  @Nonnull Platform pluginPlatform,
+  @Nonnull ConsoleLogger log )
+{
+super( bootClasspath, tempDirectory, debugLine, workingDirectory, 
modelProperties, argLine,
+environmentVariables, debug, forkCount, reuseForks, 
pluginPlatform, log );
+}
+
+@Override
+protected void resolveClasspath( OutputStreamFlushableCommandline cli, 
String startClass,
+ StartupConfiguration config )
+throws SurefireBooterForkException
+{
+try
+{
+AbstractPathConfiguration pathConfig = 
config.getClasspathConfiguration();
+
+ModularClasspathConfiguration modularClasspathConfiguration =
+pathConfig.toRealPath( ModularClasspathConfiguration.class 
);
+
+ModularClasspath modularClasspath = 
modularClasspathConfiguration.getModularClasspath();
+
+File descriptor = modularClasspath.getModuleDescriptor();
+List modulePath = modularClasspath.getModulePath();
+Collection

[3/3] maven-surefire git commit: [SUREFIRE-1262] Add modulepath support

2017-11-16 Thread tibordigana
[SUREFIRE-1262] Add modulepath support


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

Branch: refs/heads/SUREFIRE-1262_2
Commit: ec354cc739608d5dfb26fe4b4439538ceda8f494
Parents: 5aed843
Author: Tibor17 
Authored: Sat Sep 16 21:25:37 2017 +0200
Committer: Tibor17 
Committed: Fri Nov 17 02:53:44 2017 +0100

--
 maven-surefire-common/pom.xml   |  18 +-
 .../plugin/surefire/AbstractSurefireMojo.java   | 272 +++--
 .../surefire/InPluginVMSurefireStarter.java |   5 +-
 .../AbstractClasspathForkConfiguration.java |  73 +++
 .../surefire/booterclient/BooterSerializer.java |  94 +--
 .../ClasspathForkConfiguration.java |  59 ++
 .../booterclient/DefaultForkConfiguration.java  | 344 +++
 .../booterclient/ForkConfiguration.java | 367 +--
 .../surefire/booterclient/ForkStarter.java  |  27 +-
 .../JarManifestForkConfiguration.java   | 139 +
 .../ModularClasspathForkConfiguration.java  | 230 +++
 .../plugin/surefire/booterclient/Platform.java  |  29 +-
 .../maven/plugin/surefire/util/Relocator.java   |  39 +-
 .../surefire/providerapi/ServiceLoader.java |   2 +-
 .../surefire/AbstractSurefireMojoTest.java  | 603 ++-
 ...terDeserializerStartupConfigurationTest.java |   8 +-
 .../booterclient/ForkConfigurationTest.java |  52 +-
 .../maven/surefire/util/RelocatorTest.java  |   6 +-
 .../plugin/surefire/SurefirePluginTest.java |   3 +-
 pom.xml |  65 +-
 .../maven/surefire/util/DefaultScanResult.java  |  24 +-
 .../maven/surefire/util/ScanResultTest.java |   8 +-
 .../booter/AbstractPathConfiguration.java   | 115 
 .../apache/maven/surefire/booter/Classpath.java |  19 +-
 .../surefire/booter/ClasspathConfiguration.java |  73 +--
 .../maven/surefire/booter/ForkedBooter.java |  22 +-
 .../maven/surefire/booter/ModularClasspath.java |  70 +++
 .../booter/ModularClasspathConfiguration.java   |  62 ++
 .../surefire/booter/StartupConfiguration.java   |  28 +-
 .../maven/surefire/booter/SystemUtilsTest.java  |   5 +-
 .../apache/maven/surefire/its/ModulePathIT.java |  45 ++
 .../src/test/resources/modulepath/pom.xml   |  45 ++
 .../modulepath/src/main/java/com/app/Main.java  |  34 ++
 .../modulepath/src/main/java/module-info.java   |  21 +
 .../src/test/java/com/app/AppTest.java  |  36 ++
 35 files changed, 2392 insertions(+), 650 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/ec354cc7/maven-surefire-common/pom.xml
--
diff --git a/maven-surefire-common/pom.xml b/maven-surefire-common/pom.xml
index 1bcd7c5..44b8669 100644
--- a/maven-surefire-common/pom.xml
+++ b/maven-surefire-common/pom.xml
@@ -97,25 +97,27 @@
 
   org.apache.maven.shared
   maven-common-artifact-filters
-  1.3
-  
-
-  org.apache.maven.shared
-  maven-plugin-testing-harness
-
-  
 
 
   org.fusesource.jansi
   jansi
-  1.13
   provided
 
 
+  org.codehaus.plexus
+  plexus-java
+
+
   org.mockito
   mockito-core
   test
 
+
+  org.powermock
+  powermock-mockito-release-full
+  full
+  test
+
   
 
   

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/ec354cc7/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index 88b223a..5545a7c 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -24,6 +24,7 @@ import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
 import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.AbstractArtifactResolutionException;
 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
@@ -43,6 +44,9 @@ import org.apache.maven.plugin.descriptor.P

[1/3] maven-surefire git commit: [SUREFIRE-1262] Add modulepath support [Forced Update!]

2017-11-16 Thread tibordigana
Repository: maven-surefire
Updated Branches:
  refs/heads/SUREFIRE-1262_2 ec354cc73 -> 29621dd06 (forced update)


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/29621dd0/surefire-integration-tests/src/test/resources/modulepath/src/test/java/com/app/AppTest.java
--
diff --git 
a/surefire-integration-tests/src/test/resources/modulepath/src/test/java/com/app/AppTest.java
 
b/surefire-integration-tests/src/test/resources/modulepath/src/test/java/com/app/AppTest.java
new file mode 100644
index 000..aa836a4
--- /dev/null
+++ 
b/surefire-integration-tests/src/test/resources/modulepath/src/test/java/com/app/AppTest.java
@@ -0,0 +1,36 @@
+package com.app;
+
+/*
+ * 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.
+ */
+
+import org.testng.annotations.Test;
+
+@Test
+public class AppTest
+{
+public void testNoop()
+throws Exception
+{
+}
+
+public void testMain()
+{
+Main.main();
+}
+}



[3/3] maven-surefire git commit: [SUREFIRE-1262] Add modulepath support

2017-11-16 Thread tibordigana
[SUREFIRE-1262] Add modulepath support


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

Branch: refs/heads/SUREFIRE-1262_2
Commit: 29621dd06d00ed6d946390446ea8d2a3c04bb0c5
Parents: 5aed843
Author: Tibor17 
Authored: Sat Sep 16 21:25:37 2017 +0200
Committer: Tibor17 
Committed: Fri Nov 17 03:02:46 2017 +0100

--
 maven-surefire-common/pom.xml   |  18 +-
 .../plugin/surefire/AbstractSurefireMojo.java   | 271 +++--
 .../surefire/InPluginVMSurefireStarter.java |   5 +-
 .../AbstractClasspathForkConfiguration.java |  73 +++
 .../surefire/booterclient/BooterSerializer.java |  94 +--
 .../ClasspathForkConfiguration.java |  59 ++
 .../booterclient/DefaultForkConfiguration.java  | 344 +++
 .../booterclient/ForkConfiguration.java | 367 +--
 .../surefire/booterclient/ForkStarter.java  |  27 +-
 .../JarManifestForkConfiguration.java   | 139 +
 .../ModularClasspathForkConfiguration.java  | 230 +++
 .../plugin/surefire/booterclient/Platform.java  |  29 +-
 .../maven/plugin/surefire/util/Relocator.java   |  39 +-
 .../surefire/providerapi/ServiceLoader.java |   2 +-
 .../surefire/AbstractSurefireMojoTest.java  | 603 ++-
 ...terDeserializerStartupConfigurationTest.java |   8 +-
 .../booterclient/ForkConfigurationTest.java |  52 +-
 .../maven/surefire/util/RelocatorTest.java  |   6 +-
 .../plugin/surefire/SurefirePluginTest.java |   3 +-
 pom.xml |  65 +-
 .../maven/surefire/util/DefaultScanResult.java  |  24 +-
 .../maven/surefire/util/ScanResultTest.java |   8 +-
 .../booter/AbstractPathConfiguration.java   | 115 
 .../apache/maven/surefire/booter/Classpath.java |  19 +-
 .../surefire/booter/ClasspathConfiguration.java |  73 +--
 .../maven/surefire/booter/ForkedBooter.java |  22 +-
 .../maven/surefire/booter/ModularClasspath.java |  70 +++
 .../booter/ModularClasspathConfiguration.java   |  62 ++
 .../surefire/booter/StartupConfiguration.java   |  28 +-
 .../maven/surefire/booter/SystemUtilsTest.java  |   5 +-
 .../apache/maven/surefire/its/ModulePathIT.java |  45 ++
 .../src/test/resources/modulepath/pom.xml   |  45 ++
 .../modulepath/src/main/java/com/app/Main.java  |  34 ++
 .../modulepath/src/main/java/module-info.java   |  21 +
 .../src/test/java/com/app/AppTest.java  |  36 ++
 35 files changed, 2391 insertions(+), 650 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/29621dd0/maven-surefire-common/pom.xml
--
diff --git a/maven-surefire-common/pom.xml b/maven-surefire-common/pom.xml
index 1bcd7c5..44b8669 100644
--- a/maven-surefire-common/pom.xml
+++ b/maven-surefire-common/pom.xml
@@ -97,25 +97,27 @@
 
   org.apache.maven.shared
   maven-common-artifact-filters
-  1.3
-  
-
-  org.apache.maven.shared
-  maven-plugin-testing-harness
-
-  
 
 
   org.fusesource.jansi
   jansi
-  1.13
   provided
 
 
+  org.codehaus.plexus
+  plexus-java
+
+
   org.mockito
   mockito-core
   test
 
+
+  org.powermock
+  powermock-mockito-release-full
+  full
+  test
+
   
 
   

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/29621dd0/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index 88b223a..4330877 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -24,6 +24,7 @@ import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
 import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.AbstractArtifactResolutionException;
 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
@@ -43,6 +44,9 @@ import org.apache.maven.plugin.descriptor.P

[2/3] maven-surefire git commit: [SUREFIRE-1262] Add modulepath support

2017-11-16 Thread tibordigana
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/29621dd0/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
new file mode 100644
index 000..2b47c03
--- /dev/null
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
@@ -0,0 +1,230 @@
+package org.apache.maven.plugin.surefire.booterclient;
+
+/*
+ * 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.
+ */
+
+import 
org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline;
+import org.apache.maven.plugin.surefire.log.api.ConsoleLogger;
+import org.apache.maven.surefire.booter.AbstractPathConfiguration;
+import org.apache.maven.surefire.booter.Classpath;
+import org.apache.maven.surefire.booter.ModularClasspath;
+import org.apache.maven.surefire.booter.ModularClasspathConfiguration;
+import org.apache.maven.surefire.booter.StartupConfiguration;
+import org.apache.maven.surefire.booter.SurefireBooterForkException;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.ModuleVisitor;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import static java.io.File.createTempFile;
+import static java.io.File.pathSeparatorChar;
+import static 
org.apache.maven.plugin.surefire.SurefireHelper.escapeToPlatformPath;
+import static org.objectweb.asm.Opcodes.ASM6;
+
+/**
+ * @author mailto:tibordig...@apache.org";>Tibor Digana (tibor17)
+ * @since 2.21.0.Jigsaw
+ */
+public class ModularClasspathForkConfiguration
+extends DefaultForkConfiguration
+{
+@SuppressWarnings( "checkstyle:parameternumber" )
+public ModularClasspathForkConfiguration( @Nonnull Classpath bootClasspath,
+  @Nonnull File tempDirectory,
+  @Nullable String debugLine,
+  @Nonnull File workingDirectory,
+  @Nonnull Properties 
modelProperties,
+  @Nullable String argLine,
+  @Nonnull Map 
environmentVariables,
+  boolean debug,
+  int forkCount,
+  boolean reuseForks,
+  @Nonnull Platform pluginPlatform,
+  @Nonnull ConsoleLogger log )
+{
+super( bootClasspath, tempDirectory, debugLine, workingDirectory, 
modelProperties, argLine,
+environmentVariables, debug, forkCount, reuseForks, 
pluginPlatform, log );
+}
+
+@Override
+protected void resolveClasspath( OutputStreamFlushableCommandline cli, 
String startClass,
+ StartupConfiguration config )
+throws SurefireBooterForkException
+{
+try
+{
+AbstractPathConfiguration pathConfig = 
config.getClasspathConfiguration();
+
+ModularClasspathConfiguration modularClasspathConfiguration =
+pathConfig.toRealPath( ModularClasspathConfiguration.class 
);
+
+ModularClasspath modularClasspath = 
modularClasspathConfiguration.getModularClasspath();
+
+File descriptor = modularClasspath.getModuleDescriptor();
+List modulePath = modularClasspath.getModulePath();
+Collection