From 97e8ae273784d86d3cb6b7849848c05919ac4896 Mon Sep 17 00:00:00 2001
From: Jason van Zyl
Date: Thu, 29 Nov 2012 08:47:44 -0800
Subject: [PATCH 001/102] - wind this back to version 2.2
---
.../src/main/resources/META-INF/plexus/default-bindings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/maven-core/src/main/resources/META-INF/plexus/default-bindings.xml b/maven-core/src/main/resources/META-INF/plexus/default-bindings.xml
index 39fe4bb8a3..09ecba441e 100644
--- a/maven-core/src/main/resources/META-INF/plexus/default-bindings.xml
+++ b/maven-core/src/main/resources/META-INF/plexus/default-bindings.xml
@@ -258,7 +258,7 @@ Mappings to default lifecycle, specific for each packaging.
org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
- org.apache.maven.plugins:maven-war-plugin:2.3:war
+ org.apache.maven.plugins:maven-war-plugin:2.2:war
org.apache.maven.plugins:maven-install-plugin:2.4:install
From a3047b362941c714c6a6cce2657e12743a6e1667 Mon Sep 17 00:00:00 2001
From: olivier lamy
Date: Fri, 30 Nov 2012 00:07:15 +0100
Subject: [PATCH 002/102] test push
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 3b97b69e1f..c53f01d78a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
22
../pom/maven/pom.xml
-
+
maven
3.1-SNAPSHOT
pom
From 1fe432b5de7f74fa2e6859245f8d3e63675a0286 Mon Sep 17 00:00:00 2001
From: olivier lamy
Date: Fri, 30 Nov 2012 00:07:27 +0100
Subject: [PATCH 003/102] revert test push
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index c53f01d78a..3b97b69e1f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
22
../pom/maven/pom.xml
-
+
maven
3.1-SNAPSHOT
pom
From 620137ebca11958057fd01055d2322ce210a3c11 Mon Sep 17 00:00:00 2001
From: Jason van Zyl
Date: Thu, 29 Nov 2012 21:51:11 -0800
Subject: [PATCH 004/102] MNG-5386: Dispose of ClassRealms after invocation to
prevent out of Permgen errors (update to classworlds 2.4.1)
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 3b97b69e1f..8ca52d81db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,7 +42,7 @@
2001
- 2.4
+ 2.4.1
1.2
1.2_Java1.3
3.8.2
From e8df4ca99369faec750590ce167d9bfc0af40f0d Mon Sep 17 00:00:00 2001
From: Kristian Rosenvold
Date: Thu, 29 Nov 2012 22:03:08 +0100
Subject: [PATCH 005/102] o Restored old context classloader so the threads
dont go running around with classloaders that should unload
---
.../maven/artifact/resolver/DefaultArtifactResolver.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
index 9c8364d461..e75c61d603 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
@@ -574,6 +574,7 @@ public class DefaultArtifactResolver
public void run()
{
+ ClassLoader old = Thread.currentThread().getContextClassLoader();
try
{
Thread.currentThread().setContextClassLoader( classLoader );
@@ -602,6 +603,8 @@ public class DefaultArtifactResolver
finally
{
latch.countDown();
+ Thread.currentThread().setContextClassLoader( old );
+
}
}
From 2103c82d57b3f617cafa2796efeda97b85369465 Mon Sep 17 00:00:00 2001
From: Kristian Rosenvold
Date: Thu, 29 Nov 2012 22:17:04 +0100
Subject: [PATCH 006/102] o Changed array to atomicreference since arrays are
not thread-safe
---
.../plugin/internal/DefaultLegacySupport.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java
index aea096316e..53e5f3028f 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java
@@ -19,9 +19,11 @@ package org.apache.maven.plugin.internal;
* under the License.
*/
+import java.util.concurrent.atomic.AtomicReference;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.LegacySupport;
import org.codehaus.plexus.component.annotations.Component;
+
import org.sonatype.aether.RepositorySystemSession;
/**
@@ -37,29 +39,29 @@ public class DefaultLegacySupport
implements LegacySupport
{
- private static final ThreadLocal session = new InheritableThreadLocal();
+ private static final ThreadLocal> session = new InheritableThreadLocal>();
public void setSession( MavenSession session )
{
if ( session == null )
{
- MavenSession[] oldSession = DefaultLegacySupport.session.get();
+ AtomicReference oldSession = DefaultLegacySupport.session.get();
if ( oldSession != null )
{
- oldSession[0] = null;
+ oldSession.set( null);
DefaultLegacySupport.session.remove();
}
}
else
{
- DefaultLegacySupport.session.set( new MavenSession[] { session } );
+ DefaultLegacySupport.session.set( new AtomicReference( session ));
}
}
public MavenSession getSession()
{
- MavenSession[] currentSession = DefaultLegacySupport.session.get();
- return currentSession != null ? currentSession[0] : null;
+ AtomicReference currentSession = DefaultLegacySupport.session.get();
+ return currentSession != null ? currentSession.get() : null;
}
public RepositorySystemSession getRepositorySession()
From 9712df3ded86482a1809d7652fda774d13585e8d Mon Sep 17 00:00:00 2001
From: Kristian Rosenvold
Date: Thu, 29 Nov 2012 18:01:00 +0100
Subject: [PATCH 007/102] o Fixed another classloader leak where core was
grabbing random elements in plugin classloaders
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 8ca52d81db..f78cc44d7a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -47,8 +47,8 @@
1.2_Java1.3
3.8.2
1.5.5
- 1.14
- 3.0.9
+ 1.16
+ 3.0.10
2.3.0
2.3
1.3
From a278bec9d3238136beed50b658a7a0aa6b4b110a Mon Sep 17 00:00:00 2001
From: Kristian Rosenvold
Date: Thu, 29 Nov 2012 18:45:00 +0100
Subject: [PATCH 008/102] o Fixed another super-subtle classloader leak
---
.../plugin/internal/DefaultLegacySupport.java | 15 ++--
.../internal/DefaultLegacySupportTest.java | 74 +++++++++++++++++++
2 files changed, 82 insertions(+), 7 deletions(-)
create mode 100644 maven-core/src/test/java/org/apache/maven/plugin/internal/DefaultLegacySupportTest.java
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java
index 53e5f3028f..78790d7956 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java
@@ -43,14 +43,15 @@ public class DefaultLegacySupport
public void setSession( MavenSession session )
{
- if ( session == null )
+ AtomicReference reference = DefaultLegacySupport.session.get();
+ if ( reference != null )
{
- AtomicReference oldSession = DefaultLegacySupport.session.get();
- if ( oldSession != null )
- {
- oldSession.set( null);
- DefaultLegacySupport.session.remove();
- }
+ reference.set( null);
+ }
+
+ if ( session == null && reference != null)
+ {
+ DefaultLegacySupport.session.remove();
}
else
{
diff --git a/maven-core/src/test/java/org/apache/maven/plugin/internal/DefaultLegacySupportTest.java b/maven-core/src/test/java/org/apache/maven/plugin/internal/DefaultLegacySupportTest.java
new file mode 100644
index 0000000000..d350770cbc
--- /dev/null
+++ b/maven-core/src/test/java/org/apache/maven/plugin/internal/DefaultLegacySupportTest.java
@@ -0,0 +1,74 @@
+package org.apache.maven.plugin.internal;
+/*
+ * 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 junit.framework.TestCase;
+import org.apache.maven.execution.DefaultMavenExecutionRequest;
+import org.apache.maven.execution.MavenExecutionRequest;
+import org.apache.maven.execution.MavenSession;
+
+import java.util.concurrent.CountDownLatch;
+
+/**
+ * @author Kristian Rosenvold
+ */
+public class DefaultLegacySupportTest extends TestCase {
+ final CountDownLatch latch = new CountDownLatch(1);
+ final DefaultLegacySupport defaultLegacySupport = new DefaultLegacySupport();
+
+ public void testSetSession() throws Exception {
+
+ MavenExecutionRequest mavenExecutionRequest = new DefaultMavenExecutionRequest();
+ MavenSession m1 = new MavenSession(null, null, mavenExecutionRequest, null);
+ defaultLegacySupport.setSession(m1);
+
+ MyRunnable myRunnable = new MyRunnable();
+ Thread thread = new Thread(myRunnable);
+ thread.start();
+
+ MavenSession m2 = new MavenSession(null, null, mavenExecutionRequest, null);
+ defaultLegacySupport.setSession(m2);
+ latch.countDown();
+ thread.join();
+ assertNull( myRunnable.getSession());
+ }
+
+
+ class MyRunnable implements Runnable {
+
+ private volatile MavenSession session;
+
+ public void run() {
+ try
+ {
+ latch.await();
+ }
+ catch (InterruptedException ingore)
+ {
+ // Test may fail if we get interrupted
+ }
+ session = defaultLegacySupport.getSession();
+ }
+
+ public MavenSession getSession() {
+ return session;
+ }
+ }
+
+}
From 4c8b3009d1e6f7f2df221f0cfc7a4b9ca36f50a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Fri, 30 Nov 2012 19:56:20 +0100
Subject: [PATCH 009/102] removed non-aggregate reportSets which duplicate
default ones (then cause twice plugin invocation)
---
pom.xml | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/pom.xml b/pom.xml
index f78cc44d7a..7c53729fda 100644
--- a/pom.xml
+++ b/pom.xml
@@ -488,13 +488,6 @@
-
- non-aggregate
-
- javadoc
- test-javadoc
-
-
aggregate
false
@@ -509,13 +502,6 @@
maven-jxr-plugin
2.3
-
- non-aggregate
-
- jxr
- test-jxr
-
-
aggregate
false
From d5e5717dd7955a036d0e991db1db71d964f97a4c Mon Sep 17 00:00:00 2001
From: Jason van Zyl
Date: Fri, 30 Nov 2012 15:05:12 -0800
Subject: [PATCH 010/102] [MNG-5390] mvn -rf (no argument) results in NPE
Created a simple primordial logger that implements the error methods required between CLI parsing and logger initialization. I don't want to have to look to see if the logger is null.
---
.../java/org/apache/maven/cli/MavenCli.java | 7 +
.../maven/cli/logging/PrintStreamLogger.java | 187 ------------
.../maven/cli/logging/Slf4jStdoutLogger.java | 284 ++++++++++++++++++
3 files changed, 291 insertions(+), 187 deletions(-)
delete mode 100644 maven-embedder/src/main/java/org/apache/maven/cli/logging/PrintStreamLogger.java
create mode 100644 maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jStdoutLogger.java
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index 772f984494..78b054c0a9 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -40,6 +40,7 @@ import org.apache.maven.Maven;
import org.apache.maven.cli.event.DefaultEventSpyContext;
import org.apache.maven.cli.event.ExecutionEventLogger;
import org.apache.maven.cli.logging.Slf4jLoggerManager;
+import org.apache.maven.cli.logging.Slf4jStdoutLogger;
import org.apache.maven.cli.transfer.ConsoleMavenTransferListener;
import org.apache.maven.cli.transfer.QuietMavenTransferListener;
import org.apache.maven.cli.transfer.Slf4jMavenTransferListener;
@@ -262,6 +263,12 @@ public class MavenCli
private void cli( CliRequest cliRequest )
throws Exception
{
+ //
+ // Parsing errors can happen during the processing of the arguments and we prefer not having to check if the logger is null
+ // and make construct this so we can use an SLF4J logger everywhere
+ //
+ slf4jLogger = new Slf4jStdoutLogger();
+
CLIManager cliManager = new CLIManager();
try
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/PrintStreamLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/PrintStreamLogger.java
deleted file mode 100644
index 53025a0daa..0000000000
--- a/maven-embedder/src/main/java/org/apache/maven/cli/logging/PrintStreamLogger.java
+++ /dev/null
@@ -1,187 +0,0 @@
-package org.apache.maven.cli.logging;
-
-/*
- * 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 java.io.PrintStream;
-
-import org.apache.maven.Maven;
-import org.codehaus.plexus.logging.AbstractLogger;
-import org.codehaus.plexus.logging.Logger;
-
-/**
- * Logs to a user-supplied {@link PrintStream}.
- *
- * @author Benjamin Bentmann
- */
-public class PrintStreamLogger
- extends AbstractLogger
-{
-
- public interface Provider
- {
- PrintStream getStream();
- }
-
- private Provider provider;
-
- private static final String FATAL_ERROR = "[FATAL] ";
-
- private static final String ERROR = "[ERROR] ";
-
- private static final String WARNING = "[WARNING] ";
-
- private static final String INFO = "[INFO] ";
-
- private static final String DEBUG = "[DEBUG] ";
-
- public PrintStreamLogger( Provider provider )
- {
- super( Logger.LEVEL_INFO, Maven.class.getName() );
-
- if ( provider == null )
- {
- throw new IllegalArgumentException( "output stream provider missing" );
- }
- this.provider = provider;
- }
-
- public PrintStreamLogger( PrintStream out )
- {
- super( Logger.LEVEL_INFO, Maven.class.getName() );
-
- setStream( out );
- }
-
- public void setStream( final PrintStream out )
- {
- if ( out == null )
- {
- throw new IllegalArgumentException( "output stream missing" );
- }
-
- this.provider = new Provider()
- {
- public PrintStream getStream()
- {
- return out;
- }
- };
- }
-
- public void debug( String message, Throwable throwable )
- {
- if ( isDebugEnabled() )
- {
- PrintStream out = provider.getStream();
-
- out.print( DEBUG );
- out.println( message );
-
- if ( null != throwable )
- {
- throwable.printStackTrace( out );
- }
- }
- }
-
- public void info( String message, Throwable throwable )
- {
- if ( isInfoEnabled() )
- {
- PrintStream out = provider.getStream();
-
- out.print( INFO );
- out.println( message );
-
- if ( null != throwable )
- {
- throwable.printStackTrace( out );
- }
- }
- }
-
- public void warn( String message, Throwable throwable )
- {
- if ( isWarnEnabled() )
- {
- PrintStream out = provider.getStream();
-
- out.print( WARNING );
- out.println( message );
-
- if ( null != throwable )
- {
- throwable.printStackTrace( out );
- }
- }
- }
-
- public void error( String message, Throwable throwable )
- {
- if ( isErrorEnabled() )
- {
- PrintStream out = provider.getStream();
-
- out.print( ERROR );
- out.println( message );
-
- if ( null != throwable )
- {
- throwable.printStackTrace( out );
- }
- }
- }
-
- public void fatalError( String message, Throwable throwable )
- {
- if ( isFatalErrorEnabled() )
- {
- PrintStream out = provider.getStream();
-
- out.print( FATAL_ERROR );
- out.println( message );
-
- if ( null != throwable )
- {
- throwable.printStackTrace( out );
- }
- }
- }
-
- public void close()
- {
- PrintStream out = provider.getStream();
-
- if ( out == System.out || out == System.err )
- {
- out.flush();
- }
- else
- {
- out.close();
- }
- }
-
- public Logger getChildLogger( String arg0 )
- {
- return this;
- }
-
-}
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jStdoutLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jStdoutLogger.java
new file mode 100644
index 0000000000..f1a27ae511
--- /dev/null
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jStdoutLogger.java
@@ -0,0 +1,284 @@
+package org.apache.maven.cli.logging;
+
+import java.io.PrintStream;
+
+import org.slf4j.Logger;
+import org.slf4j.Marker;
+
+public class Slf4jStdoutLogger
+ implements Logger
+{
+ private static final String ERROR = "[ERROR] ";
+
+ private PrintStream out = System.out;
+
+ //
+ // These are the only methods we need in our primordial logger
+ //
+ public void error( String msg )
+ {
+ out.print( ERROR );
+ out.println( msg );
+ }
+
+ public void error( String msg, Throwable t )
+ {
+ error( msg );
+
+ if ( null != t )
+ {
+ t.printStackTrace( out );
+ }
+ }
+
+ //
+ // Don't need any of this
+ //
+ public String getName()
+ {
+ return null;
+ }
+
+ public boolean isTraceEnabled()
+ {
+ return false;
+ }
+
+ public void trace( String msg )
+ {
+ }
+
+ public void trace( String format, Object arg )
+ {
+ }
+
+ public void trace( String format, Object arg1, Object arg2 )
+ {
+ }
+
+ public void trace( String format, Object... arguments )
+ {
+ }
+
+ public void trace( String msg, Throwable t )
+ {
+ }
+
+ public boolean isTraceEnabled( Marker marker )
+ {
+ return false;
+ }
+
+ public void trace( Marker marker, String msg )
+ {
+ }
+
+ public void trace( Marker marker, String format, Object arg )
+ {
+ }
+
+ public void trace( Marker marker, String format, Object arg1, Object arg2 )
+ {
+ }
+
+ public void trace( Marker marker, String format, Object... argArray )
+ {
+ }
+
+ public void trace( Marker marker, String msg, Throwable t )
+ {
+ }
+
+ public boolean isDebugEnabled()
+ {
+ return false;
+ }
+
+ public void debug( String msg )
+ {
+ }
+
+ public void debug( String format, Object arg )
+ {
+ }
+
+ public void debug( String format, Object arg1, Object arg2 )
+ {
+ }
+
+ public void debug( String format, Object... arguments )
+ {
+ }
+
+ public void debug( String msg, Throwable t )
+ {
+ }
+
+ public boolean isDebugEnabled( Marker marker )
+ {
+ return false;
+ }
+
+ public void debug( Marker marker, String msg )
+ {
+ }
+
+ public void debug( Marker marker, String format, Object arg )
+ {
+ }
+
+ public void debug( Marker marker, String format, Object arg1, Object arg2 )
+ {
+ }
+
+ public void debug( Marker marker, String format, Object... arguments )
+ {
+ }
+
+ public void debug( Marker marker, String msg, Throwable t )
+ {
+ }
+
+ public boolean isInfoEnabled()
+ {
+ return false;
+ }
+
+ public void info( String msg )
+ {
+ }
+
+ public void info( String format, Object arg )
+ {
+ }
+
+ public void info( String format, Object arg1, Object arg2 )
+ {
+ }
+
+ public void info( String format, Object... arguments )
+ {
+ }
+
+ public void info( String msg, Throwable t )
+ {
+ }
+
+ public boolean isInfoEnabled( Marker marker )
+ {
+ return false;
+ }
+
+ public void info( Marker marker, String msg )
+ {
+ }
+
+ public void info( Marker marker, String format, Object arg )
+ {
+ }
+
+ public void info( Marker marker, String format, Object arg1, Object arg2 )
+ {
+ }
+
+ public void info( Marker marker, String format, Object... arguments )
+ {
+ }
+
+ public void info( Marker marker, String msg, Throwable t )
+ {
+ }
+
+ public boolean isWarnEnabled()
+ {
+ return false;
+ }
+
+ public void warn( String msg )
+ {
+ }
+
+ public void warn( String format, Object arg )
+ {
+ }
+
+ public void warn( String format, Object... arguments )
+ {
+ }
+
+ public void warn( String format, Object arg1, Object arg2 )
+ {
+ }
+
+ public void warn( String msg, Throwable t )
+ {
+ }
+
+ public boolean isWarnEnabled( Marker marker )
+ {
+ return false;
+ }
+
+ public void warn( Marker marker, String msg )
+ {
+ }
+
+ public void warn( Marker marker, String format, Object arg )
+ {
+ }
+
+ public void warn( Marker marker, String format, Object arg1, Object arg2 )
+ {
+ }
+
+ public void warn( Marker marker, String format, Object... arguments )
+ {
+ }
+
+ public void warn( Marker marker, String msg, Throwable t )
+ {
+ }
+
+ public boolean isErrorEnabled()
+ {
+ return false;
+ }
+
+ public void error( String format, Object arg )
+ {
+ }
+
+ public void error( String format, Object arg1, Object arg2 )
+ {
+ }
+
+ public void error( String format, Object... arguments )
+ {
+ }
+
+ public boolean isErrorEnabled( Marker marker )
+ {
+ return false;
+ }
+
+ public void error( Marker marker, String msg )
+ {
+ }
+
+ public void error( Marker marker, String format, Object arg )
+ {
+ }
+
+ public void error( Marker marker, String format, Object arg1, Object arg2 )
+ {
+ }
+
+ public void error( Marker marker, String format, Object... arguments )
+ {
+ }
+
+ public void error( Marker marker, String msg, Throwable t )
+ {
+ }
+
+}
From a4c34bfa3fbc4ba96bffddc2464e8a0203819da3 Mon Sep 17 00:00:00 2001
From: Jason van Zyl
Date: Fri, 30 Nov 2012 15:13:07 -0800
Subject: [PATCH 011/102] - fix typo
---
maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index 78b054c0a9..b57a1d4b5e 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -265,7 +265,7 @@ public class MavenCli
{
//
// Parsing errors can happen during the processing of the arguments and we prefer not having to check if the logger is null
- // and make construct this so we can use an SLF4J logger everywhere
+ // and construct this so we can use an SLF4J logger everywhere.
//
slf4jLogger = new Slf4jStdoutLogger();
From fee1640d65561d26b02acdcbf1dff0d108b4f2ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Sat, 1 Dec 2012 04:27:23 +0100
Subject: [PATCH 012/102] [MNG-5395] don't inject DefaultMavenPluginManager's
logger into Mojos but create a dedicated logger with Mojo implementation name
---
.../maven/plugin/internal/DefaultMavenPluginManager.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
index 603e670403..4429f44771 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
@@ -83,6 +83,7 @@ import org.codehaus.plexus.configuration.PlexusConfiguration;
import org.codehaus.plexus.configuration.PlexusConfigurationException;
import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.logging.LoggerManager;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.StringUtils;
@@ -110,6 +111,9 @@ public class DefaultMavenPluginManager
@Requirement
private Logger logger;
+ @Requirement
+ private LoggerManager loggerManager;
+
@Requirement
private PlexusContainer container;
@@ -508,7 +512,8 @@ public class DefaultMavenPluginManager
if ( mojo instanceof Mojo )
{
- ( (Mojo) mojo ).setLog( new DefaultLog( logger ) );
+ Logger mojoLogger = loggerManager.getLoggerForComponent( mojoDescriptor.getImplementation() );
+ ( (Mojo) mojo ).setLog( new DefaultLog( mojoLogger ) );
}
Xpp3Dom dom = mojoExecution.getConfiguration();
From aebb64702065e1b161f5fcd24e1b3349b5f75677 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Sat, 1 Dec 2012 09:14:57 +0100
Subject: [PATCH 013/102] removed unused import
---
maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index b57a1d4b5e..0ba7d6bc66 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -56,7 +56,6 @@ import org.apache.maven.execution.MavenExecutionResult;
import org.apache.maven.lifecycle.LifecycleExecutionException;
import org.apache.maven.lifecycle.internal.LifecycleWeaveBuilder;
import org.apache.maven.model.building.ModelProcessor;
-import org.apache.maven.plugin.PluginRealmCache;
import org.apache.maven.project.MavenProject;
import org.apache.maven.properties.internal.EnvironmentUtils;
import org.apache.maven.settings.building.DefaultSettingsBuildingRequest;
From 1062524b39952e040b2fe7f0073ce4c4d3a00630 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Sat, 1 Dec 2012 09:35:12 +0100
Subject: [PATCH 014/102] [MNG-5396] changed logger name for execution events
and batch transfer (was MavenCli)
this shows some logging patterns we should discuss about and document
our conventions
---
.../src/main/java/org/apache/maven/cli/MavenCli.java | 4 ++--
.../org/apache/maven/cli/event/ExecutionEventLogger.java | 9 ++++++++-
.../maven/cli/transfer/Slf4jMavenTransferListener.java | 9 ++++++++-
3 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index 0ba7d6bc66..81d520b65d 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -894,7 +894,7 @@ public class MavenCli
transferListener = getBatchTransferListener();
}
- ExecutionListener executionListener = new ExecutionEventLogger( slf4jLogger );
+ ExecutionListener executionListener = new ExecutionEventLogger();
executionListener = eventSpyDispatcher.chainListener( executionListener );
String alternatePomFile = null;
@@ -1160,7 +1160,7 @@ public class MavenCli
protected TransferListener getBatchTransferListener()
{
- return new Slf4jMavenTransferListener( slf4jLogger );
+ return new Slf4jMavenTransferListener();
}
protected void customizeContainer( PlexusContainer container )
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
index 819f179e12..f55141d4c3 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
@@ -31,9 +31,10 @@ import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.project.MavenProject;
import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
- * Logs execution events to a user-supplied logger.
+ * Logs execution events to logger, eventually user-supplied.
*
* @author Benjamin Bentmann
*/
@@ -44,6 +45,12 @@ public class ExecutionEventLogger
private static final int LINE_LENGTH = 72;
+ public ExecutionEventLogger()
+ {
+ logger = LoggerFactory.getLogger( ExecutionEventLogger.class );
+ }
+
+ // TODO should we deprecate?
public ExecutionEventLogger( Logger logger )
{
if ( logger == null )
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java
index 27ff90d464..f09c768959 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java
@@ -24,6 +24,7 @@ import java.text.DecimalFormatSymbols;
import java.util.Locale;
import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.sonatype.aether.transfer.AbstractTransferListener;
import org.sonatype.aether.transfer.TransferCancelledException;
import org.sonatype.aether.transfer.TransferEvent;
@@ -33,8 +34,14 @@ public class Slf4jMavenTransferListener
extends AbstractTransferListener
{
- protected Logger out;
+ protected final Logger out;
+ public Slf4jMavenTransferListener()
+ {
+ this.out = LoggerFactory.getLogger( Slf4jMavenTransferListener.class );
+ }
+
+ // TODO should we deprecate?
public Slf4jMavenTransferListener( Logger out )
{
this.out = out;
From 1a1fe6d50802713d969ed08d6fa06dec53cf90e9 Mon Sep 17 00:00:00 2001
From: Kristian Rosenvold
Date: Sat, 1 Dec 2012 10:53:45 +0100
Subject: [PATCH 015/102] o Made lower bound of executor threads 0 for artifact
resolver
Ideally I think we should just get rid of the whole executor and use new Thread() instead,
which would mean we'd need some way of constraining thread counts.
Freeing the threads mean they also release the classloader
---
.../apache/maven/artifact/resolver/DefaultArtifactResolver.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
index e75c61d603..2b978b0b44 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
@@ -111,7 +111,7 @@ public class DefaultArtifactResolver
else
{
executor =
- new ThreadPoolExecutor( threads, threads, 3, TimeUnit.SECONDS, new LinkedBlockingQueue(), new DaemonThreadCreator());
+ new ThreadPoolExecutor( 0, threads, 3, TimeUnit.SECONDS, new LinkedBlockingQueue(), new DaemonThreadCreator());
}
}
From 86004d6022958e19ddafeb99766b7babdafd5567 Mon Sep 17 00:00:00 2001
From: Kristian Rosenvold
Date: Sat, 1 Dec 2012 11:16:17 +0100
Subject: [PATCH 016/102] o Classworlds 2.4.2
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 7c53729fda..bfb4792fa9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,7 +42,7 @@
2001
- 2.4.1
+ 2.4.2
1.2
1.2_Java1.3
3.8.2
From af70de4b967bbc352bed1e57491f66c2f4723530 Mon Sep 17 00:00:00 2001
From: olivier lamy
Date: Sat, 1 Dec 2012 12:24:39 +0100
Subject: [PATCH 017/102] fix scm informations
---
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index bfb4792fa9..c97b7f317b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,9 +84,9 @@
- scm:svn:http://svn.apache.org/repos/asf/maven/maven-3/trunk
- scm:svn:https://svn.apache.org/repos/asf/maven/maven-3/trunk
- http://svn.apache.org/viewvc/maven/maven-3/trunk
+ scm:git:https://git-wip-us.apache.org/repos/asf/maven.git
+ scm:git:https://git-wip-us.apache.org/repos/asf/maven.git
+ https://git-wip-us.apache.org/repos/asf?p=maven.git
jira
From df162a5a359f195d2db39b9a3890fc4af0c14ae6 Mon Sep 17 00:00:00 2001
From: rfscholte
Date: Sat, 1 Dec 2012 23:20:55 +0100
Subject: [PATCH 018/102] [MNG-5398] scriptSourceDirectory in superpom is not
prefixed with ${project.basedir}/
---
.../src/main/resources/org/apache/maven/model/pom-4.0.0.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml b/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
index 1e70e8a016..47d17e5bc7 100644
--- a/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
+++ b/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
@@ -56,7 +56,7 @@ under the License.
${project.artifactId}-${project.version}
${project.build.directory}/test-classes
${project.basedir}/src/main/java
- src/main/scripts
+ ${project.build.directory}/src/main/scripts
${project.basedir}/src/test/java
From e052ebaa7ba6d6d8858fe9eb4571479e977e8fc1 Mon Sep 17 00:00:00 2001
From: rfscholte
Date: Sat, 1 Dec 2012 23:22:28 +0100
Subject: [PATCH 019/102] [MNG-5399] Upgrade version of maven-release-plugin in
superpom
---
.../src/main/resources/org/apache/maven/model/pom-4.0.0.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml b/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
index 47d17e5bc7..931f87b32f 100644
--- a/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
+++ b/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
@@ -86,7 +86,7 @@ under the License.
maven-release-plugin
- 2.0
+ 2.3.2
From dbef526ede1e6b77d156e2b1f1b9dee377cd4cb9 Mon Sep 17 00:00:00 2001
From: rfscholte
Date: Sat, 1 Dec 2012 23:55:16 +0100
Subject: [PATCH 020/102] [MNG-5398] scriptSourceDirectory in superpom is not
prefixed with ${project.basedir}/ (now with the right expression)
---
.../src/main/resources/org/apache/maven/model/pom-4.0.0.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml b/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
index 931f87b32f..f1f8a2a104 100644
--- a/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
+++ b/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
@@ -56,7 +56,7 @@ under the License.
${project.artifactId}-${project.version}
${project.build.directory}/test-classes
${project.basedir}/src/main/java
- ${project.build.directory}/src/main/scripts
+ ${project.basedir}/src/main/scripts
${project.basedir}/src/test/java
From 327e1b7e80f9157d2fb99736d4dc1f2d8b3648ae Mon Sep 17 00:00:00 2001
From: rfscholte
Date: Sun, 2 Dec 2012 00:02:13 +0100
Subject: [PATCH 021/102] [MNG-5400] Upgrade version of maven-dependency-plugin
in superpom to 2.5
---
.../src/main/resources/org/apache/maven/model/pom-4.0.0.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml b/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
index f1f8a2a104..3501f39063 100644
--- a/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
+++ b/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
@@ -82,7 +82,7 @@ under the License.
maven-dependency-plugin
- 2.1
+ 2.5
maven-release-plugin
From 75ea1e42975b780cf57962b4d377c60ccdd634ea Mon Sep 17 00:00:00 2001
From: Kristian Rosenvold
Date: Sat, 1 Dec 2012 21:30:57 +0100
Subject: [PATCH 022/102] [MNG-5208] Parallel (-T option) multi module build
fires wrong project failed event
Patch by Stefan Eder , applied with minor modifications
---
.../maven/lifecycle/internal/BuilderCommon.java | 11 +++++------
.../lifecycle/internal/LifecycleModuleBuilder.java | 4 ++--
.../lifecycle/internal/LifecycleWeaveBuilder.java | 4 ++--
3 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
index 2e63647487..a0187378b6 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
@@ -48,7 +48,7 @@ import java.util.Set;
/**
* Common code that is shared by the LifecycleModuleBuilder and the LifeCycleWeaveBuilder
- *
+ *
* @since 3.0
* @author Kristian Rosenvold
* Builds one or more lifecycles for a full module
@@ -133,9 +133,8 @@ public class BuilderCommon
return executionPlan;
}
- public void handleBuildError( final ReactorContext buildContext, final MavenSession rootSession,
- final MavenProject mavenProject, Exception e, final long buildStartTime )
- {
+ public void handleBuildError(final ReactorContext buildContext, final MavenSession rootSession, final MavenSession currentSession,
+ final MavenProject mavenProject, Exception e, final long buildStartTime) {
if ( e instanceof RuntimeException )
{
e = new InternalErrorException( "Internal error: " + e, e );
@@ -147,7 +146,7 @@ public class BuilderCommon
buildContext.getResult().addBuildSummary( new BuildFailure( mavenProject, buildEndTime - buildStartTime, e ) );
- eventCatapult.fire( ExecutionEvent.Type.ProjectFailed, rootSession, null, e );
+ eventCatapult.fire( ExecutionEvent.Type.ProjectFailed, currentSession, null, e );
if ( MavenExecutionRequest.REACTOR_FAIL_NEVER.equals( rootSession.getReactorFailureBehavior() ) )
{
@@ -187,4 +186,4 @@ public class BuilderCommon
}
-}
\ No newline at end of file
+}
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
index fe69c0a120..a0056b42a9 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
@@ -32,7 +32,7 @@ import java.util.HashSet;
/**
* Builds one or more lifecycles for a full module
- *
+ *
* @since 3.0
* @author Benjamin Bentmann
* @author Jason van Zyl
@@ -92,7 +92,7 @@ public class LifecycleModuleBuilder
}
catch ( Exception e )
{
- builderCommon.handleBuildError( reactorContext, rootSession, currentProject, e, buildStartTime );
+ builderCommon.handleBuildError(reactorContext, rootSession, session, currentProject, e, buildStartTime);
}
finally
{
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
index 12058e5307..4b267282fe 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
@@ -277,8 +277,8 @@ public class LifecycleWeaveBuilder
}
catch ( Exception e )
{
- builderCommon.handleBuildError( reactorContext, rootSession, projectBuild.getProject(), e,
- buildStartTime );
+ builderCommon.handleBuildError( reactorContext, rootSession, projectBuild.getSession(),
+ projectBuild.getProject(), e, buildStartTime );
}
finally
{
From ab86435af10a9b7dfe2f13daacc978d535f818a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Sun, 2 Dec 2012 11:21:57 +0100
Subject: [PATCH 023/102] stay with fluido skin 1.2.1 because of MSKINS-69
---
src/site/site.xml | 146 +++++++++++++++++++++++-----------------------
1 file changed, 73 insertions(+), 73 deletions(-)
diff --git a/src/site/site.xml b/src/site/site.xml
index 291d8ced9f..fb96718f68 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -1,74 +1,74 @@
-
-
-
-
-
-
-
- ${project.name}
- http://maven.apache.org/images/apache-maven-project.png
- http://maven.apache.org/
-
-
- http://maven.apache.org/images/maventxt_logo_200.gif
-
-
-
- org.apache.maven.skins
- maven-fluido-skin
- 1.3.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ ${project.name}
+ http://maven.apache.org/images/apache-maven-project.png
+ http://maven.apache.org/
+
+
+ http://maven.apache.org/images/maventxt_logo_200.gif
+
+
+
+ org.apache.maven.skins
+ maven-fluido-skin
+ 1.2.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 71a8427df6286955c17ce1d6701804896c2b7ec3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Sun, 2 Dec 2012 12:38:12 +0100
Subject: [PATCH 024/102] code formatting
---
.../maven/lifecycle/internal/BuilderCommon.java | 7 ++++---
.../lifecycle/internal/LifecycleModuleBuilder.java | 4 ++--
.../lifecycle/internal/LifecycleWeaveBuilder.java | 11 +++++------
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
index a0187378b6..2c228ba645 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
@@ -133,8 +133,10 @@ public class BuilderCommon
return executionPlan;
}
- public void handleBuildError(final ReactorContext buildContext, final MavenSession rootSession, final MavenSession currentSession,
- final MavenProject mavenProject, Exception e, final long buildStartTime) {
+ public void handleBuildError( final ReactorContext buildContext, final MavenSession rootSession,
+ final MavenSession currentSession, final MavenProject mavenProject, Exception e,
+ final long buildStartTime )
+ {
if ( e instanceof RuntimeException )
{
e = new InternalErrorException( "Internal error: " + e, e );
@@ -185,5 +187,4 @@ public class BuilderCommon
return project.getGroupId() + ':' + project.getArtifactId() + ':' + project.getVersion();
}
-
}
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
index a0056b42a9..c8a3cf4a2d 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
@@ -92,7 +92,7 @@ public class LifecycleModuleBuilder
}
catch ( Exception e )
{
- builderCommon.handleBuildError(reactorContext, rootSession, session, currentProject, e, buildStartTime);
+ builderCommon.handleBuildError( reactorContext, rootSession, session, currentProject, e, buildStartTime );
}
finally
{
@@ -101,4 +101,4 @@ public class LifecycleModuleBuilder
Thread.currentThread().setContextClassLoader( reactorContext.getOriginalContextClassLoader() );
}
}
-}
\ No newline at end of file
+}
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
index 4b267282fe..9447480817 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
@@ -375,13 +375,14 @@ public class LifecycleWeaveBuilder
return null;
}
- private static boolean isThreadLockedAndEmpty(Artifact artifact){
- return artifact instanceof ThreadLockedArtifact && !((ThreadLockedArtifact) artifact).hasReal();
+ private static boolean isThreadLockedAndEmpty( Artifact artifact )
+ {
+ return artifact instanceof ThreadLockedArtifact && !( (ThreadLockedArtifact) artifact ).hasReal();
}
private static Artifact findDependency( MavenProject project, Artifact upStreamArtifact )
{
- if ( upStreamArtifact == null || isThreadLockedAndEmpty(upStreamArtifact))
+ if ( upStreamArtifact == null || isThreadLockedAndEmpty( upStreamArtifact ) )
{
return null;
}
@@ -483,8 +484,6 @@ public class LifecycleWeaveBuilder
artifactInThis.setFile( upstream.getFile() );
artifactInThis.setRepository( upstream.getRepository() );
artifactInThis.setResolved( true ); // Or maybe upstream.isResolved()....
-
}
}
-
-}
\ No newline at end of file
+}
From 543870467f11597d815ba9fbce48b5b21be22983 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Sun, 2 Dec 2012 20:22:52 +0100
Subject: [PATCH 025/102] fixed errors reported by Checkstyle
---
.../repository/ArtifactRepositoryPolicy.java | 1 -
.../versioning/ComparableVersion.java | 18 ++--
.../versioning/DefaultArtifactVersion.java | 2 +-
.../maven/artifact/ArtifactScopeEnum.java | 2 +-
.../DefaultRepositoryMetadataManager.java | 30 +++---
.../repository/metadata/MetadataBridge.java | 1 -
.../resolver/DefaultArtifactResolver.java | 97 ++++++++++++-------
.../AbstractStringBasedModelInterpolator.java | 6 +-
.../validation/DefaultModelValidator.java | 4 -
.../maven/repository/MetadataGraphNode.java | 4 +-
.../DefaultArtifactRepositoryFactory.java | 2 +-
.../DefaultLegacyArtifactCollector.java | 4 +-
.../repository/metadata/ArtifactMetadata.java | 16 +--
.../repository/metadata/MetadataGraph.java | 2 +-
.../metadata/MetadataGraphEdge.java | 10 +-
.../metadata/MetadataResolution.java | 2 +-
.../project/DefaultModelBuildingListener.java | 16 +--
.../apache/maven/project/MavenProject.java | 30 +++---
.../maven/project/ProjectBuildingRequest.java | 2 +-
.../maven/repository/RepositorySystem.java | 12 +--
.../apache/maven/cli/CLIReportingUtils.java | 12 ++-
.../java/org/apache/maven/cli/MavenCli.java | 2 +-
22 files changed, 157 insertions(+), 118 deletions(-)
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java
index 306c90b965..f76e2c1377 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java
@@ -21,7 +21,6 @@ package org.apache.maven.artifact.repository;
import java.util.Calendar;
import java.util.Date;
-import java.util.TimeZone;
/**
* Describes a set of policies for a repository to use under certain conditions.
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
index da654c8492..481e845d87 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
@@ -69,9 +69,9 @@ public class ComparableVersion
private interface Item
{
- final int INTEGER_ITEM = 0;
- final int STRING_ITEM = 1;
- final int LIST_ITEM = 2;
+ int INTEGER_ITEM = 0;
+ int STRING_ITEM = 1;
+ int LIST_ITEM = 2;
int compareTo( Item item );
@@ -86,7 +86,7 @@ public class ComparableVersion
private static class IntegerItem
implements Item
{
- private static final BigInteger BigInteger_ZERO = new BigInteger( "0" );
+ private static final BigInteger BIG_INTEGER_ZERO = new BigInteger( "0" );
private final BigInteger value;
@@ -94,7 +94,7 @@ public class ComparableVersion
private IntegerItem()
{
- this.value = BigInteger_ZERO;
+ this.value = BIG_INTEGER_ZERO;
}
public IntegerItem( String str )
@@ -109,14 +109,14 @@ public class ComparableVersion
public boolean isNull()
{
- return BigInteger_ZERO.equals( value );
+ return BIG_INTEGER_ZERO.equals( value );
}
public int compareTo( Item item )
{
if ( item == null )
{
- return BigInteger_ZERO.equals( value ) ? 0 : 1; // 1.0 == 1, 1.1 > 1
+ return BIG_INTEGER_ZERO.equals( value ) ? 0 : 1; // 1.0 == 1, 1.1 > 1
}
switch ( item.getType() )
@@ -266,7 +266,7 @@ public class ComparableVersion
void normalize()
{
- for( ListIterator- iterator = listIterator( size() ); iterator.hasPrevious(); )
+ for ( ListIterator
- iterator = listIterator( size() ); iterator.hasPrevious(); )
{
Item item = iterator.previous();
if ( item.isNull() )
@@ -327,7 +327,7 @@ public class ComparableVersion
public String toString()
{
StringBuilder buffer = new StringBuilder( "(" );
- for( Iterator
- iter = iterator(); iter.hasNext(); )
+ for ( Iterator
- iter = iterator(); iter.hasNext(); )
{
buffer.append( iter.next() );
if ( iter.hasNext() )
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
index b588340937..db71dc700c 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
@@ -72,7 +72,7 @@ public class DefaultArtifactVersion
{
if ( otherVersion instanceof DefaultArtifactVersion )
{
- return this.comparable.compareTo( ( (DefaultArtifactVersion) otherVersion).comparable );
+ return this.comparable.compareTo( ( (DefaultArtifactVersion) otherVersion ).comparable );
}
else
{
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java b/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java
index 574f7d6d55..c6d02c6fde 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java
@@ -108,7 +108,7 @@ public enum ArtifactScopeEnum
{
final ArtifactScopeEnum s = checkScope( scope );
- // system scope is historic only - and simple
+ // system scope is historic only - and simple
if ( id == system.id )
{
return scope.id == system.id;
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java
index 0f1030b2e6..cbdcf07bee 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java
@@ -1,18 +1,22 @@
package org.apache.maven.artifact.repository.metadata;
/*
- * 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.
+ * 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 java.io.File;
@@ -47,7 +51,7 @@ import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
/**
* @author Jason van Zyl
*/
-@Component(role=RepositoryMetadataManager.class)
+@Component( role = RepositoryMetadataManager.class )
public class DefaultRepositoryMetadataManager
extends AbstractLogEnabled
implements RepositoryMetadataManager
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
index a1fb1e8426..8024d310b1 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
@@ -24,7 +24,6 @@ import java.io.File;
import org.apache.maven.artifact.metadata.ArtifactMetadata;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.DefaultArtifactRepository;
-import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
import org.codehaus.plexus.util.FileUtils;
import org.sonatype.aether.RepositoryException;
import org.sonatype.aether.metadata.MergeableMetadata;
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
index 2b978b0b44..18deeb2f5e 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
@@ -1,18 +1,22 @@
package org.apache.maven.artifact.resolver;
/*
- * 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.
+ * 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 java.io.File;
@@ -65,7 +69,7 @@ import org.sonatype.aether.resolution.ArtifactResult;
/**
* @author Jason van Zyl
*/
-@Component(role = ArtifactResolver.class)
+@Component( role = ArtifactResolver.class )
public class DefaultArtifactResolver
implements ArtifactResolver
{
@@ -111,7 +115,8 @@ public class DefaultArtifactResolver
else
{
executor =
- new ThreadPoolExecutor( 0, threads, 3, TimeUnit.SECONDS, new LinkedBlockingQueue(), new DaemonThreadCreator());
+ new ThreadPoolExecutor( 0, threads, 3, TimeUnit.SECONDS, new LinkedBlockingQueue(),
+ new DaemonThreadCreator() );
}
}
@@ -151,19 +156,22 @@ public class DefaultArtifactResolver
}
}
- public void resolve( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository, TransferListener resolutionListener )
+ public void resolve( Artifact artifact, List remoteRepositories,
+ ArtifactRepository localRepository, TransferListener resolutionListener )
throws ArtifactResolutionException, ArtifactNotFoundException
{
resolve( artifact, remoteRepositories, getSession( localRepository ) );
}
- public void resolveAlways( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository )
+ public void resolveAlways( Artifact artifact, List remoteRepositories,
+ ArtifactRepository localRepository )
throws ArtifactResolutionException, ArtifactNotFoundException
{
resolve( artifact, remoteRepositories, getSession( localRepository ) );
}
- private void resolve( Artifact artifact, List remoteRepositories, RepositorySystemSession session )
+ private void resolve( Artifact artifact, List remoteRepositories,
+ RepositorySystemSession session )
throws ArtifactResolutionException, ArtifactNotFoundException
{
if ( artifact == null )
@@ -249,52 +257,73 @@ public class DefaultArtifactResolver
}
}
- public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact, ArtifactRepository localRepository, List remoteRepositories,
+ public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact,
+ ArtifactRepository localRepository,
+ List remoteRepositories,
ArtifactMetadataSource source, ArtifactFilter filter )
throws ArtifactResolutionException, ArtifactNotFoundException
{
- return resolveTransitively( artifacts, originatingArtifact, Collections.EMPTY_MAP, localRepository, remoteRepositories, source, filter );
+ return resolveTransitively( artifacts, originatingArtifact, Collections.EMPTY_MAP, localRepository,
+ remoteRepositories, source, filter );
}
- public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository,
- List remoteRepositories, ArtifactMetadataSource source )
+ public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact,
+ Map managedVersions, ArtifactRepository localRepository,
+ List remoteRepositories,
+ ArtifactMetadataSource source )
throws ArtifactResolutionException, ArtifactNotFoundException
{
- return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository, remoteRepositories, source, null );
+ return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository,
+ remoteRepositories, source, null );
}
- public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository,
- List remoteRepositories, ArtifactMetadataSource source, ArtifactFilter filter )
+ public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact,
+ Map managedVersions, ArtifactRepository localRepository,
+ List remoteRepositories,
+ ArtifactMetadataSource source, ArtifactFilter filter )
throws ArtifactResolutionException, ArtifactNotFoundException
{
- return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository, remoteRepositories, source, filter, null );
+ return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository,
+ remoteRepositories, source, filter, null );
}
- public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact, List remoteRepositories, ArtifactRepository localRepository,
+ public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact,
+ List remoteRepositories,
+ ArtifactRepository localRepository,
ArtifactMetadataSource source )
throws ArtifactResolutionException, ArtifactNotFoundException
{
return resolveTransitively( artifacts, originatingArtifact, localRepository, remoteRepositories, source, null );
}
- public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact, List remoteRepositories, ArtifactRepository localRepository,
- ArtifactMetadataSource source, List listeners )
+ public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact,
+ List remoteRepositories,
+ ArtifactRepository localRepository,
+ ArtifactMetadataSource source,
+ List listeners )
throws ArtifactResolutionException, ArtifactNotFoundException
{
return resolveTransitively( artifacts, originatingArtifact, Collections.EMPTY_MAP, localRepository,
remoteRepositories, source, null, listeners );
}
- public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository,
- List remoteRepositories, ArtifactMetadataSource source, ArtifactFilter filter, List listeners )
+ public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact,
+ Map managedVersions, ArtifactRepository localRepository,
+ List remoteRepositories,
+ ArtifactMetadataSource source, ArtifactFilter filter,
+ List listeners )
throws ArtifactResolutionException, ArtifactNotFoundException
{
- return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository, remoteRepositories, source, filter, listeners, null );
+ return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository,
+ remoteRepositories, source, filter, listeners, null );
}
- public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository,
- List remoteRepositories, ArtifactMetadataSource source, ArtifactFilter filter, List listeners,
+ public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact,
+ Map managedVersions, ArtifactRepository localRepository,
+ List remoteRepositories,
+ ArtifactMetadataSource source, ArtifactFilter filter,
+ List listeners,
List conflictResolvers )
throws ArtifactResolutionException, ArtifactNotFoundException
{
@@ -336,7 +365,7 @@ public class DefaultArtifactResolver
{
Artifact rootArtifact = request.getArtifact();
Set artifacts = request.getArtifactDependencies();
- Map managedVersions = request.getManagedVersionMap();
+ Map managedVersions = request.getManagedVersionMap();
List listeners = request.getListeners();
ArtifactFilter collectionFilter = request.getCollectionFilter();
ArtifactFilter resolutionFilter = request.getResolutionFilter();
diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
index aff88e0a03..f4a1b5c41a 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java
@@ -283,7 +283,7 @@ public abstract class AbstractStringBasedModelInterpolator
pathTranslator ) );
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings( "unchecked" )
protected String interpolateInternal( String src, List valueSources,
List postProcessors, boolean debug )
throws ModelInterpolationException
@@ -296,7 +296,7 @@ public abstract class AbstractStringBasedModelInterpolator
Logger logger = getLogger();
String result = src;
- synchronized( this )
+ synchronized ( this )
{
for ( ValueSource vs : valueSources )
@@ -315,7 +315,7 @@ public abstract class AbstractStringBasedModelInterpolator
{
result = interpolator.interpolate( result, recursionInterceptor );
}
- catch( InterpolationException e )
+ catch ( InterpolationException e )
{
throw new ModelInterpolationException( e.getMessage(), e );
}
diff --git a/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java b/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java
index a6782d69f0..0095f80382 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java
@@ -19,15 +19,11 @@ package org.apache.maven.project.validation;
* under the License.
*/
-import java.util.List;
-import org.apache.maven.model.InputLocation;
import org.apache.maven.model.Model;
import org.apache.maven.model.building.DefaultModelBuildingRequest;
import org.apache.maven.model.building.ModelBuildingRequest;
import org.apache.maven.model.building.ModelProblem;
import org.apache.maven.model.building.ModelProblemCollector;
-import org.apache.maven.model.building.ModelProblem.Severity;
-import org.apache.maven.model.building.ModelProblem.Version;
import org.apache.maven.model.building.ModelProblemCollectorRequest;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/MetadataGraphNode.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataGraphNode.java
index 3940cf336d..22394e7078 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/MetadataGraphNode.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/MetadataGraphNode.java
@@ -41,8 +41,8 @@ public class MetadataGraphNode
public MetadataGraphNode()
{
- inNodes = new ArrayList(4);
- exNodes = new ArrayList(8);
+ inNodes = new ArrayList( 4 );
+ exNodes = new ArrayList( 8 );
}
public MetadataGraphNode( MavenArtifactMetadata metadata )
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/DefaultArtifactRepositoryFactory.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/DefaultArtifactRepositoryFactory.java
index 85a6bc45da..4bc911673d 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/DefaultArtifactRepositoryFactory.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/repository/DefaultArtifactRepositoryFactory.java
@@ -43,7 +43,7 @@ public class DefaultArtifactRepositoryFactory
private String globalChecksumPolicy;
@Requirement( role = ArtifactRepositoryLayout.class )
- private Map repositoryLayouts;
+ private Map repositoryLayouts;
public ArtifactRepositoryLayout getLayout( String layoutId )
throws UnknownRepositoryLayoutException
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
index 651d46e8ce..d69e8125f8 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
@@ -63,10 +63,10 @@ import org.codehaus.plexus.logging.Logger;
public class DefaultLegacyArtifactCollector
implements LegacyArtifactCollector
{
- @Requirement(hint="nearest")
+ @Requirement( hint = "nearest" )
private ConflictResolver defaultConflictResolver;
- @Requirement
+ @Requirement
private Logger logger;
@Requirement
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java
index 00749470d5..2666eafb62 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java
@@ -28,7 +28,6 @@ import org.apache.maven.artifact.ArtifactScopeEnum;
* Artifact Metadata that is resolved independent of Artifact itself.
*
* @author Oleg Gusakov
- *
*/
public class ArtifactMetadata
{
@@ -291,7 +290,7 @@ public class ArtifactMetadata
return artifactExists;
}
- public void setArtifactExists(boolean artifactExists)
+ public void setArtifactExists( boolean artifactExists )
{
this.artifactExists = artifactExists;
}
@@ -302,7 +301,7 @@ public class ArtifactMetadata
return dependencies;
}
- public void setDependencies(Collection dependencies)
+ public void setDependencies( Collection dependencies )
{
this.dependencies = dependencies;
}
@@ -312,7 +311,7 @@ public class ArtifactMetadata
return artifactUri;
}
- public void setArtifactUri(String artifactUri)
+ public void setArtifactUri( String artifactUri )
{
this.artifactUri = artifactUri;
}
@@ -322,23 +321,28 @@ public class ArtifactMetadata
{
return why;
}
- public void setWhy(String why)
+
+ public void setWhy( String why )
{
this.why = why;
}
+
//-------------------------------------------------------------------
public String getError()
{
return error;
}
- public void setError(String error)
+
+ public void setError( String error )
{
this.error = error;
}
+
public boolean isError()
{
return error == null;
}
+
//------------------------------------------------------------------
public String getDependencyConflictId()
{
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
index d898739275..b116c69f06 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
@@ -294,7 +294,7 @@ public class MetadataGraph
//------------------------------------------------------------------------
public List getEdgesBetween( MetadataGraphVertex vFrom, MetadataGraphVertex vTo )
{
- List edges = getIncidentEdges(vTo);
+ List edges = getIncidentEdges( vTo );
if ( edges == null || edges.isEmpty() )
{
return null;
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java
index 4a50b207b7..9d86933ab2 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java
@@ -125,10 +125,10 @@ public class MetadataGraphEdge
this.depth = depth;
}
- public boolean isResolved()
- {
- return resolved;
- }
+ public boolean isResolved()
+ {
+ return resolved;
+ }
public void setResolved( boolean resolved )
{
@@ -175,7 +175,7 @@ public class MetadataGraphEdge
this.target = target;
}
- @Override
+ @Override
public String toString()
{
return "[ " + "FROM:("
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolution.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolution.java
index 770ae79d2f..9a9130b2fa 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolution.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolution.java
@@ -62,7 +62,7 @@ public class MetadataResolution
return artifactMetadata;
}
- public void setArtifactMetadata(ArtifactMetadata artifactMetadata)
+ public void setArtifactMetadata( ArtifactMetadata artifactMetadata )
{
this.artifactMetadata = artifactMetadata;
}
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java b/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java
index 30423ce4ab..ca2663845b 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java
@@ -97,9 +97,9 @@ class DefaultModelBuildingListener
}
catch ( Exception e )
{
- event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE)
+ event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
.setMessage( "Invalid plugin repository: " + e.getMessage() )
- .setException( e ));
+ .setException( e ) );
}
project.setPluginArtifactRepositories( pluginRepositories );
@@ -115,15 +115,15 @@ class DefaultModelBuildingListener
}
catch ( PluginResolutionException e )
{
- event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE)
+ event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
.setMessage( "Unresolveable build extension: " + e.getMessage())
- .setException( e ));
+ .setException( e ) );
}
catch ( PluginVersionResolutionException e )
{
- event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE)
+ event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
.setMessage( "Unresolveable build extension: " + e.getMessage() )
- .setException( e ));
+ .setException( e ) );
}
projectBuildingHelper.selectProjectRealm( project );
@@ -138,9 +138,9 @@ class DefaultModelBuildingListener
}
catch ( Exception e )
{
- event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE)
+ event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
.setMessage( "Invalid artifact repository: " + e.getMessage() )
- .setException( e ));
+ .setException( e ) );
}
project.setRemoteArtifactRepositories( remoteRepositories );
}
diff --git a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
index 5090c3e4f7..0349e8aa86 100644
--- a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
+++ b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
@@ -1,18 +1,22 @@
package org.apache.maven.project;
/*
- * 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.
+ * 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.RepositoryUtils;
@@ -1477,7 +1481,7 @@ public class MavenProject
for ( int ax = 0; ax < attachedArtifacts.size(); ax++ )
{
Artifact a = attachedArtifacts.get( ax );
- if ( a.equals( artifact ))
+ if ( a.equals( artifact ) )
{
if ( logger != null )
{
diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java
index 39522f6843..db8fe902fa 100644
--- a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java
@@ -79,7 +79,7 @@ public interface ProjectBuildingRequest
*/
Properties getUserProperties();
- void setProject(MavenProject mavenProject);
+ void setProject( MavenProject mavenProject );
MavenProject getProject();
diff --git a/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java b/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java
index 147b7cf8ef..7bcd442539 100644
--- a/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java
+++ b/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java
@@ -42,17 +42,17 @@ import org.sonatype.aether.RepositorySystemSession;
*/
public interface RepositorySystem
{
- final String DEFAULT_LOCAL_REPO_ID = "local";
+ String DEFAULT_LOCAL_REPO_ID = "local";
- final String userHome = System.getProperty( "user.home" );
+ String userHome = System.getProperty( "user.home" );
- final File userMavenConfigurationHome = new File( userHome, ".m2" );
+ File userMavenConfigurationHome = new File( userHome, ".m2" );
- final File defaultUserLocalRepository = new File( userMavenConfigurationHome, "repository" );
+ File defaultUserLocalRepository = new File( userMavenConfigurationHome, "repository" );
- final String DEFAULT_REMOTE_REPO_ID = "central";
+ String DEFAULT_REMOTE_REPO_ID = "central";
- final String DEFAULT_REMOTE_REPO_URL = "http://repo.maven.apache.org/maven2";
+ String DEFAULT_REMOTE_REPO_URL = "http://repo.maven.apache.org/maven2";
Artifact createArtifact( String groupId, String artifactId, String version, String packaging );
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
index 0f8262b102..8f1ae8e163 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
@@ -53,11 +53,15 @@ public final class CLIReportingUtils
Properties properties = getBuildProperties();
StringBuffer version = new StringBuffer();
version.append( createMavenVersionString( properties ) ).append( LS );
- version.append( reduce( properties.getProperty( "distributionShortName" ) + " home: " + System.getProperty( "maven.home", "" ) ) ).append( LS );
- version.append( "Java version: " + System.getProperty( "java.version", "" ) + ", vendor: " + System.getProperty( "java.vendor", "" ) ).append( LS );
+ version.append( reduce( properties.getProperty( "distributionShortName" ) + " home: "
+ + System.getProperty( "maven.home", "" ) ) ).append( LS );
+ version.append( "Java version: " + System.getProperty( "java.version", "" )
+ + ", vendor: " + System.getProperty( "java.vendor", "" ) ).append( LS );
version.append( "Java home: " + System.getProperty( "java.home", "" ) ).append( LS );
- version.append( "Default locale: " + Locale.getDefault() + ", platform encoding: " + System.getProperty( "file.encoding", "" ) ).append( LS );
- version.append( "OS name: \"" + Os.OS_NAME + "\", version: \"" + Os.OS_VERSION + "\", arch: \"" + Os.OS_ARCH + "\", family: \"" + Os.OS_FAMILY + "\"" );
+ version.append( "Default locale: " + Locale.getDefault() + ", platform encoding: "
+ + System.getProperty( "file.encoding", "" ) ).append( LS );
+ version.append( "OS name: \"" + Os.OS_NAME + "\", version: \"" + Os.OS_VERSION + "\", arch: \"" + Os.OS_ARCH
+ + "\", family: \"" + Os.OS_FAMILY + "\"" );
return version.toString();
}
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index 81d520b65d..e744e65ed3 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -233,7 +233,7 @@ public class MavenCli
}
finally
{
- if (localContainer != null)
+ if ( localContainer != null )
{
localContainer.dispose();
}
From b63904c9db0e6760d8f0f52488242272a70b7d70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Mon, 3 Dec 2012 02:21:58 +0100
Subject: [PATCH 026/102] fixed errors reported by Checkstyle (once again...)
---
.../maven/profiles/DefaultProfileManager.java | 5 -
.../SystemPropertyProfileActivator.java | 2 +-
.../internal/LifecycleDependencyResolver.java | 37 +++--
.../internal/ThreadLockedArtifact.java | 10 +-
.../DefaultLifecycleBindingsInjector.java | 4 +-
.../maven/plugin/BuildPluginManager.java | 28 ++--
.../plugin/DefaultBuildPluginManager.java | 30 ++--
.../plugin/internal/DefaultLegacySupport.java | 14 +-
.../internal/PluginDependenciesResolver.java | 2 +-
.../plugin/prefix/PluginPrefixResult.java | 6 +-
.../project/DefaultModelBuildingListener.java | 2 +-
.../maven/project/DefaultProjectBuilder.java | 28 ++--
.../model/building/DefaultModelBuilder.java | 128 ++++++++++--------
.../model/building/DefaultModelProblem.java | 3 +-
.../DefaultModelProblemCollector.java | 7 +-
.../maven/model/building/ModelProblem.java | 3 +-
.../model/building/ModelProblemCollector.java | 3 -
.../ModelProblemCollectorRequest.java | 50 +++----
.../AbstractStringBasedModelInterpolator.java | 4 +-
.../ProblemDetectingValueSource.java | 3 +-
.../StringSearchModelInterpolator.java | 10 +-
.../plugin/DefaultReportingConverter.java | 6 +-
.../model/profile/DefaultProfileSelector.java | 8 +-
.../JdkVersionProfileActivator.java | 2 +-
.../validation/DefaultModelValidator.java | 10 +-
25 files changed, 218 insertions(+), 187 deletions(-)
diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java b/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
index ae3d2c51c1..740c2cd93a 100644
--- a/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
+++ b/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
@@ -20,13 +20,10 @@ package org.apache.maven.profiles;
*/
import org.apache.maven.model.Activation;
-import org.apache.maven.model.InputLocation;
import org.apache.maven.model.Profile;
import org.apache.maven.model.building.ModelProblem;
import org.apache.maven.model.building.ModelProblemCollector;
-import org.apache.maven.model.building.ModelProblem.Severity;
import org.apache.maven.model.profile.DefaultProfileActivationContext;
-import org.apache.maven.model.profile.ProfileActivationContext;
import org.apache.maven.model.profile.ProfileSelector;
import org.apache.maven.profiles.activation.ProfileActivationException;
import org.codehaus.plexus.MutablePlexusContainer;
@@ -36,13 +33,11 @@ import org.codehaus.plexus.component.repository.exception.ComponentLookupExcepti
import org.codehaus.plexus.logging.Logger;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
-import org.apache.maven.model.building.ModelProblem.Version;
import org.apache.maven.model.building.ModelProblemCollectorRequest;
@Deprecated
diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
index 4186415418..a03267dc2d 100644
--- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
+++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
@@ -63,7 +63,7 @@ public class SystemPropertyProfileActivator
+ profile.getId() + "'" );
}
- if ( name.startsWith("!") )
+ if ( name.startsWith( "!" ) )
{
reverseName = true;
name = name.substring( 1 );
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
index a549ce2b33..075283d3dc 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
@@ -1,20 +1,33 @@
package org.apache.maven.lifecycle.internal;
/*
- * 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
+ * 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
+ * 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.
+ * 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 java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
import org.apache.maven.RepositoryUtils;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.ArtifactUtils;
@@ -37,8 +50,6 @@ import org.sonatype.aether.graph.DependencyNode;
import org.sonatype.aether.util.filter.AndDependencyFilter;
import org.sonatype.aether.util.filter.ScopeDependencyFilter;
-import java.util.*;
-
/**
* Resolves dependencies for the artifacts in context of the lifecycle build
*
@@ -49,7 +60,7 @@ import java.util.*;
*
* NOTE: This class is not part of any public api and can be changed or deleted without prior notice.
*/
-@Component(role = LifecycleDependencyResolver.class)
+@Component( role = LifecycleDependencyResolver.class )
public class LifecycleDependencyResolver
{
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ThreadLockedArtifact.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ThreadLockedArtifact.java
index b566e641d8..9c6cf40119 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ThreadLockedArtifact.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/ThreadLockedArtifact.java
@@ -52,8 +52,8 @@ class ThreadLockedArtifact
public boolean hasReal()
{
- return real != null &&
- ( !( real instanceof ThreadLockedArtifact ) || ( (ThreadLockedArtifact) real ).hasReal() );
+ return real != null
+ && ( !( real instanceof ThreadLockedArtifact ) || ( (ThreadLockedArtifact) real ).hasReal() );
}
public String getGroupId()
@@ -96,17 +96,17 @@ class ThreadLockedArtifact
return real.hasClassifier();
}
- private static final InheritableThreadLocal threadArtifact =
+ private static final InheritableThreadLocal THREAD_ARTIFACT =
new InheritableThreadLocal();
public void attachToThread()
{
- threadArtifact.set( this );
+ THREAD_ARTIFACT.set( this );
}
public File getFile()
{
- final ThreadLockedArtifact lockedArtifact = threadArtifact.get();
+ final ThreadLockedArtifact lockedArtifact = THREAD_ARTIFACT.get();
if ( lockedArtifact != null && this != lockedArtifact && mustLock() )
{
try
diff --git a/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java b/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java
index d2486b480f..5cb33637e5 100644
--- a/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java
+++ b/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java
@@ -66,9 +66,9 @@ public class DefaultLifecycleBindingsInjector
if ( defaultPlugins == null )
{
- problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE)
+ problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
.setMessage( "Unknown packaging: " + packaging )
- .setLocation( model.getLocation( "packaging" )));
+ .setLocation( model.getLocation( "packaging" ) ) );
}
else if ( !defaultPlugins.isEmpty() )
{
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/BuildPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/BuildPluginManager.java
index 48eed40bde..5e93bcebde 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/BuildPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/BuildPluginManager.java
@@ -1,18 +1,22 @@
package org.apache.maven.plugin;
/*
- * 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.
+ * 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 java.util.List;
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java
index 3ae2c58cc5..fee2eb0eac 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java
@@ -1,18 +1,22 @@
package org.apache.maven.plugin;
/*
- * 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.
+ * 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 java.io.ByteArrayOutputStream;
@@ -33,7 +37,7 @@ import org.sonatype.aether.repository.RemoteRepository;
// TODO: the antrun plugin has its own configurator, the only plugin that does. might need to think about how that works
// TODO: remove the coreArtifactFilterManager
-@Component(role = BuildPluginManager.class)
+@Component( role = BuildPluginManager.class )
public class DefaultBuildPluginManager
implements BuildPluginManager
{
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java
index 78790d7956..a71a0007a5 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java
@@ -39,29 +39,29 @@ public class DefaultLegacySupport
implements LegacySupport
{
- private static final ThreadLocal> session = new InheritableThreadLocal>();
+ private static final ThreadLocal> SESSION = new InheritableThreadLocal>();
public void setSession( MavenSession session )
{
- AtomicReference reference = DefaultLegacySupport.session.get();
+ AtomicReference reference = DefaultLegacySupport.SESSION.get();
if ( reference != null )
{
- reference.set( null);
+ reference.set( null );
}
- if ( session == null && reference != null)
+ if ( session == null && reference != null )
{
- DefaultLegacySupport.session.remove();
+ DefaultLegacySupport.SESSION.remove();
}
else
{
- DefaultLegacySupport.session.set( new AtomicReference( session ));
+ DefaultLegacySupport.SESSION.set( new AtomicReference( session ) );
}
}
public MavenSession getSession()
{
- AtomicReference currentSession = DefaultLegacySupport.session.get();
+ AtomicReference currentSession = DefaultLegacySupport.SESSION.get();
return currentSession != null ? currentSession.get() : null;
}
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/PluginDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/PluginDependenciesResolver.java
index 1aa578eddb..60d83141a1 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/PluginDependenciesResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/PluginDependenciesResolver.java
@@ -50,7 +50,7 @@ public interface PluginDependenciesResolver
* @return The resolved plugin artifact, never {@code null}.
* @throws PluginResolutionException If the plugin artifact could not be resolved.
*/
- public Artifact resolve( Plugin plugin, List repositories, RepositorySystemSession session )
+ Artifact resolve( Plugin plugin, List repositories, RepositorySystemSession session )
throws PluginResolutionException;
/**
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixResult.java b/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixResult.java
index f21b6701d8..0e67f37bea 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixResult.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixResult.java
@@ -1,7 +1,5 @@
package org.apache.maven.plugin.prefix;
-import org.sonatype.aether.repository.ArtifactRepository;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -11,7 +9,7 @@ import org.sonatype.aether.repository.ArtifactRepository;
* "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
+ * 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
@@ -21,6 +19,8 @@ import org.sonatype.aether.repository.ArtifactRepository;
* under the License.
*/
+import org.sonatype.aether.repository.ArtifactRepository;
+
/**
* Describes the result of a plugin prefix resolution request.
*
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java b/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java
index ca2663845b..3aebe9b4b7 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java
@@ -116,7 +116,7 @@ class DefaultModelBuildingListener
catch ( PluginResolutionException e )
{
event.getProblems().add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
- .setMessage( "Unresolveable build extension: " + e.getMessage())
+ .setMessage( "Unresolveable build extension: " + e.getMessage() )
.setException( e ) );
}
catch ( PluginVersionResolutionException e )
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
index 4e4db80d4b..a242ee579c 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
@@ -1,18 +1,22 @@
package org.apache.maven.project;
/*
- * 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.
+ * 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 java.io.File;
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
index e075f7b0e6..90a20eb0ec 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
@@ -317,7 +317,7 @@ public class DefaultModelBuilder
}
message += currentData.getId();
- problems.add( new ModelProblemCollectorRequest(ModelProblem.Severity.FATAL, ModelProblem.Version.BASE).setMessage(message));
+ problems.add( new ModelProblemCollectorRequest( ModelProblem.Severity.FATAL, ModelProblem.Version.BASE ).setMessage( message ) );
throw problems.newModelBuildingException();
}
}
@@ -409,7 +409,7 @@ public class DefaultModelBuilder
modelValidator.validateEffectiveModel( resultModel, request, problems );
- if ( hasModelErrors(problems) )
+ if ( hasModelErrors( problems ) )
{
throw problems.newModelBuildingException();
}
@@ -471,15 +471,15 @@ public class DefaultModelBuilder
if ( pomFile != null )
{
- problems.add( new ModelProblemCollectorRequest(Severity.ERROR, Version.V20)
- .setMessage("Malformed POM " + modelSource.getLocation() + ": " + e.getMessage())
- .setException(e ));
+ problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.V20 )
+ .setMessage( "Malformed POM " + modelSource.getLocation() + ": " + e.getMessage() )
+ .setException( e ) );
}
else
{
- problems.add( new ModelProblemCollectorRequest(Severity.WARNING, Version.V20)
- .setMessage("Malformed POM " + modelSource.getLocation() + ": " + e.getMessage())
- .setException(e));
+ problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.V20 )
+ .setMessage( "Malformed POM " + modelSource.getLocation() + ": " + e.getMessage() )
+ .setException( e ) );
}
}
@@ -491,9 +491,9 @@ public class DefaultModelBuilder
}
catch ( ModelParseException e )
{
- problems.add( new ModelProblemCollectorRequest(Severity.FATAL, Version.BASE)
- .setMessage("Non-parseable POM " + modelSource.getLocation() + ": " + e.getMessage())
- .setException(e));
+ problems.add( new ModelProblemCollectorRequest( Severity.FATAL, Version.BASE )
+ .setMessage( "Non-parseable POM " + modelSource.getLocation() + ": " + e.getMessage() )
+ .setException( e ) );
throw problems.newModelBuildingException();
}
catch ( IOException e )
@@ -511,9 +511,9 @@ public class DefaultModelBuilder
msg = e.getClass().getSimpleName();
}
}
- problems.add( new ModelProblemCollectorRequest(Severity.FATAL, Version.BASE)
- .setMessage("Non-readable POM " + modelSource.getLocation() + ": " + msg)
- .setException(e ));
+ problems.add( new ModelProblemCollectorRequest( Severity.FATAL, Version.BASE )
+ .setMessage( "Non-readable POM " + modelSource.getLocation() + ": " + msg )
+ .setException( e ) );
throw problems.newModelBuildingException();
}
@@ -522,7 +522,7 @@ public class DefaultModelBuilder
problems.setSource( model );
modelValidator.validateRawModel( model, request, problems );
- if ( hasFatalErrors(problems) )
+ if ( hasFatalErrors( problems ) )
{
throw problems.newModelBuildingException();
}
@@ -562,10 +562,10 @@ public class DefaultModelBuilder
}
catch ( InvalidRepositoryException e )
{
- problems.add( new ModelProblemCollectorRequest(Severity.ERROR, Version.BASE)
- .setMessage( "Invalid repository " + repository.getId() + ": " + e.getMessage())
- .setLocation(repository.getLocation( "" ))
- .setException(e) );
+ problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+ .setMessage( "Invalid repository " + repository.getId() + ": " + e.getMessage() )
+ .setLocation( repository.getLocation( "" ) )
+ .setException( e ) );
}
}
}
@@ -617,9 +617,9 @@ public class DefaultModelBuilder
if ( versions.get( key ) == null && managedVersions.get( key ) == null )
{
InputLocation location = plugins.get( key ).getLocation( "" );
- problems.add( new ModelProblemCollectorRequest(Severity.WARNING, Version.V20)
- .setMessage( "'build.plugins.plugin.version' for " + key + " is missing.")
- .setLocation(location));
+ problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.V20 )
+ .setMessage( "'build.plugins.plugin.version' for " + key + " is missing." )
+ .setLocation( location ) );
}
}
}
@@ -694,10 +694,10 @@ public class DefaultModelBuilder
if ( !"pom".equals( parentModel.getPackaging() ) )
{
- problems.add( new ModelProblemCollectorRequest(Severity.ERROR, Version.BASE)
- .setMessage( "Invalid packaging for parent POM " + ModelProblemUtils.toSourceHint( parentModel ) + ", must be \"pom\" but is \""
- + parentModel.getPackaging() + "\"")
- .setLocation(parentModel.getLocation( "packaging" )));
+ problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+ .setMessage( "Invalid packaging for parent POM " + ModelProblemUtils.toSourceHint( parentModel )
+ + ", must be \"pom\" but is \"" + parentModel.getPackaging() + "\"" )
+ .setLocation( parentModel.getLocation( "packaging" ) ) );
}
}
else
@@ -749,9 +749,9 @@ public class DefaultModelBuilder
buffer.append( ", please verify your project structure" );
problems.setSource( childModel );
- problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.BASE)
- .setMessage( buffer.toString())
- .setLocation( parent.getLocation( "" )));
+ problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.BASE )
+ .setMessage( buffer.toString() )
+ .setLocation( parent.getLocation( "" ) ) );
return null;
}
if ( version == null || !version.equals( parent.getVersion() ) )
@@ -843,10 +843,10 @@ public class DefaultModelBuilder
}
}
- problems.add( new ModelProblemCollectorRequest(Severity.FATAL, Version.BASE)
- .setMessage( buffer.toString())
- .setLocation(parent.getLocation( "" ))
- .setException(e));
+ problems.add( new ModelProblemCollectorRequest( Severity.FATAL, Version.BASE )
+ .setMessage( buffer.toString() )
+ .setLocation( parent.getLocation( "" ) )
+ .setException( e ) );
throw problems.newModelBuildingException();
}
@@ -912,23 +912,26 @@ public class DefaultModelBuilder
if ( groupId == null || groupId.length() <= 0 )
{
- problems.add( new ModelProblemCollectorRequest(Severity.ERROR, Version.BASE)
- .setMessage( "'dependencyManagement.dependencies.dependency.groupId' for " + dependency.getManagementKey() + " is missing.")
- .setLocation( dependency.getLocation( "" )));
+ problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+ .setMessage( "'dependencyManagement.dependencies.dependency.groupId' for "
+ + dependency.getManagementKey() + " is missing." )
+ .setLocation( dependency.getLocation( "" ) ) );
continue;
}
if ( artifactId == null || artifactId.length() <= 0 )
{
- problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE)
- .setMessage( "'dependencyManagement.dependencies.dependency.artifactId' for " + dependency.getManagementKey() + " is missing.")
- .setLocation( dependency.getLocation( "" )));
+ problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+ .setMessage( "'dependencyManagement.dependencies.dependency.artifactId' for "
+ + dependency.getManagementKey() + " is missing." )
+ .setLocation( dependency.getLocation( "" ) ) );
continue;
}
if ( version == null || version.length() <= 0 )
{
- problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE)
- .setMessage( "'dependencyManagement.dependencies.dependency.version' for " + dependency.getManagementKey() + " is missing.")
- .setLocation( dependency.getLocation( "" )));
+ problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+ .setMessage( "'dependencyManagement.dependencies.dependency.version' for "
+ + dependency.getManagementKey() + " is missing." )
+ .setLocation( dependency.getLocation( "" ) ) );
continue;
}
@@ -942,7 +945,7 @@ public class DefaultModelBuilder
message += modelId + " -> ";
}
message += imported;
- problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE ).setMessage( message ));
+ problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE ).setMessage( message ) );
continue;
}
@@ -976,8 +979,8 @@ public class DefaultModelBuilder
problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
.setMessage( buffer.toString() )
- .setLocation( dependency.getLocation( "" ))
- .setException( e ));
+ .setLocation( dependency.getLocation( "" ) )
+ .setException( e ) );
continue;
}
@@ -1076,24 +1079,31 @@ public class DefaultModelBuilder
&& ( version == null || message.contains( version ) );
}
- protected boolean hasModelErrors(ModelProblemCollectorExt problems) {
- if (problems instanceof DefaultModelProblemCollector) {
- return ((DefaultModelProblemCollector)problems).hasErrors();
- } else {
- //the default execution path only knows the DefaultModelProblemCollector,
- // only reason it's not in signature is because it's package private
- throw new IllegalStateException();
+ protected boolean hasModelErrors( ModelProblemCollectorExt problems )
+ {
+ if ( problems instanceof DefaultModelProblemCollector )
+ {
+ return ( (DefaultModelProblemCollector) problems ).hasErrors();
+ }
+ else
+ {
+ // the default execution path only knows the DefaultModelProblemCollector,
+ // only reason it's not in signature is because it's package private
+ throw new IllegalStateException();
}
-
}
- protected boolean hasFatalErrors(ModelProblemCollectorExt problems) {
- if (problems instanceof DefaultModelProblemCollector) {
- return ((DefaultModelProblemCollector)problems).hasFatalErrors();
- } else {
- //the default execution path only knows the DefaultModelProblemCollector,
+ protected boolean hasFatalErrors( ModelProblemCollectorExt problems )
+ {
+ if ( problems instanceof DefaultModelProblemCollector )
+ {
+ return ( (DefaultModelProblemCollector) problems ).hasFatalErrors();
+ }
+ else
+ {
+ // the default execution path only knows the DefaultModelProblemCollector,
// only reason it's not in signature is because it's package private
- throw new IllegalStateException();
+ throw new IllegalStateException();
}
}
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java
index e0effac17f..0d68aaeb5d 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java
@@ -146,7 +146,8 @@ public class DefaultModelProblem
return severity;
}
- public Version getVersion() {
+ public Version getVersion()
+ {
return version;
}
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
index e2573eb69d..114afeb2de 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
@@ -23,10 +23,7 @@ import java.util.EnumSet;
import java.util.List;
import java.util.Set;
-import org.apache.maven.model.InputLocation;
import org.apache.maven.model.Model;
-import org.apache.maven.model.building.ModelProblem.Severity;
-import org.apache.maven.model.building.ModelProblem.Version;
import org.apache.maven.model.io.ModelParseException;
/**
@@ -174,7 +171,9 @@ class DefaultModelProblemCollector
column = e.getColumnNumber();
}
- ModelProblem problem = new DefaultModelProblem( req.getMessage(), req.getSeverity(), req.getVersion(), source, line, column, modelId, req.getException() );
+ ModelProblem problem =
+ new DefaultModelProblem( req.getMessage(), req.getSeverity(), req.getVersion(), source, line, column,
+ modelId, req.getException() );
add( problem );
}
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblem.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblem.java
index 811f2e0a16..555f033c92 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblem.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblem.java
@@ -41,7 +41,8 @@ public interface ModelProblem
}
- enum Version {
+ enum Version
+ {
//based on ModeBuildingResult.validationLevel
BASE,
V20,
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollector.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollector.java
index b2321037fc..961d40abdf 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollector.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollector.java
@@ -19,9 +19,6 @@ package org.apache.maven.model.building;
* under the License.
*/
-import java.util.List;
-import org.apache.maven.model.InputLocation;
-
/**
* Collects problems that are encountered during model building. The primary purpose of this component is to account for
* the fact that the problem reporter has/should not have information about the calling context and hence cannot provide
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorRequest.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorRequest.java
index d91c5c2ed5..60bfdde207 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorRequest.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemCollectorRequest.java
@@ -1,20 +1,24 @@
-/*
- * Copyright 2012 The Apache Software Foundation.
- *
- * Licensed 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.
- */
package org.apache.maven.model.building;
+/*
+ * 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.model.InputLocation;
import org.apache.maven.model.building.ModelProblem.Severity;
import org.apache.maven.model.building.ModelProblem.Version;
@@ -38,17 +42,17 @@ public final class ModelProblemCollectorRequest
* @param severity
* @param version
*/
- public ModelProblemCollectorRequest(Severity severity, Version version)
+ public ModelProblemCollectorRequest( Severity severity, Version version )
{
this.severity = severity;
this.version = version;
- if (severity == null)
+ if ( severity == null )
{
- throw new IllegalStateException("No severity declared");
+ throw new IllegalStateException( "No severity declared" );
}
- if (version == null)
+ if ( version == null )
{
- throw new IllegalStateException("No version declared.");
+ throw new IllegalStateException( "No version declared." );
}
}
@@ -67,7 +71,7 @@ public final class ModelProblemCollectorRequest
return exception;
}
- public ModelProblemCollectorRequest setException(Exception exception)
+ public ModelProblemCollectorRequest setException( Exception exception )
{
this.exception = exception;
return this;
@@ -78,7 +82,7 @@ public final class ModelProblemCollectorRequest
return message;
}
- public ModelProblemCollectorRequest setMessage(String message)
+ public ModelProblemCollectorRequest setMessage( String message )
{
this.message = message;
return this;
@@ -89,7 +93,7 @@ public final class ModelProblemCollectorRequest
return location;
}
- public ModelProblemCollectorRequest setLocation(InputLocation location)
+ public ModelProblemCollectorRequest setLocation( InputLocation location )
{
this.location = location;
return this;
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
index dc8b41b6ad..57e11c3c21 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
@@ -45,7 +45,6 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Properties;
-import org.apache.maven.model.building.ModelProblem;
import org.apache.maven.model.building.ModelProblem.Version;
import org.apache.maven.model.building.ModelProblemCollectorRequest;
@@ -244,7 +243,8 @@ public abstract class AbstractStringBasedModelInterpolator
}
catch ( InterpolationException e )
{
- problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE ).setMessage( e.getMessage() ).setException( e ));
+ problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+ .setMessage( e.getMessage() ).setException( e ) );
}
interpolator.clearFeedback();
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java
index 106414eaf5..8167baf7ec 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java
@@ -20,7 +20,6 @@ package org.apache.maven.model.interpolation;
*/
import java.util.List;
-import org.apache.maven.model.building.ModelProblem;
import org.apache.maven.model.building.ModelProblemCollector;
import org.apache.maven.model.building.ModelProblem.Severity;
@@ -65,7 +64,7 @@ class ProblemDetectingValueSource
{
msg += " Please use ${" + newPrefix + expression.substring( bannedPrefix.length() ) + "} instead.";
}
- problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.V20 ).setMessage( msg ));
+ problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.V20 ).setMessage( msg ) );
}
return value;
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
index d4bc534618..2ef7eb1333 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
@@ -49,7 +49,7 @@ public class StringSearchModelInterpolator
extends AbstractStringBasedModelInterpolator
{
- private static final Map, InterpolateObjectAction.CacheItem> cachedEntries =
+ private static final Map, InterpolateObjectAction.CacheItem> CACHED_ENTRIES =
new ConcurrentHashMap, InterpolateObjectAction.CacheItem>( 80, 0.75f, 2 );
// Empirical data from 3.x, actual =40
@@ -161,11 +161,11 @@ public class StringSearchModelInterpolator
private CacheItem getCacheEntry( Class> cls )
{
- CacheItem cacheItem = cachedEntries.get( cls );
+ CacheItem cacheItem = CACHED_ENTRIES.get( cls );
if ( cacheItem == null )
{
cacheItem = new CacheItem( cls );
- cachedEntries.put( cls, cacheItem );
+ CACHED_ENTRIES.put( cls, cacheItem );
}
return cacheItem;
}
@@ -247,7 +247,7 @@ public class StringSearchModelInterpolator
}
else if ( Collection.class.isAssignableFrom( type ) )
{
- throw new RuntimeException("We dont interpolate into collections, use a list instead");
+ throw new RuntimeException( "We dont interpolate into collections, use a list instead" );
}
else if ( Map.class.isAssignableFrom( type ) )
{
@@ -278,7 +278,7 @@ public class StringSearchModelInterpolator
}
}
- static abstract class CacheField
+ abstract static class CacheField
{
protected final Field field;
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
index 6a95b97cf3..f8a2a93ba9 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
@@ -108,9 +108,9 @@ public class DefaultReportingConverter
&& request.getValidationLevel() >= ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_1 )
{
- problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.V31)
- .setMessage( "The section is deprecated, please move the reports to the section of the new Maven Site Plugin.")
- .setLocation( reporting.getLocation( "" ) ));
+ problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.V31 )
+ .setMessage( "The section is deprecated, please move the reports to the section of the new Maven Site Plugin." )
+ .setLocation( reporting.getLocation( "" ) ) );
}
for ( ReportPlugin plugin : reporting.getPlugins() )
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileSelector.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileSelector.java
index dc004105fb..c376c999e3 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileSelector.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileSelector.java
@@ -115,10 +115,10 @@ public class DefaultProfileSelector
}
catch ( RuntimeException e )
{
- problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE)
- .setMessage( "Failed to determine activation for profile " + profile.getId())
- .setLocation( profile.getLocation( "" ))
- .setException( e ));
+ problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
+ .setMessage( "Failed to determine activation for profile " + profile.getId() )
+ .setLocation( profile.getLocation( "" ) )
+ .setException( e ) );
return false;
}
}
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java
index 7fa55378a2..62b6cfb7b5 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java
@@ -65,7 +65,7 @@ public class JdkVersionProfileActivator
{
problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
.setMessage( "Failed to determine Java version for profile " + profile.getId() )
- .setLocation(activation.getLocation( "jdk" ) ) );
+ .setLocation( activation.getLocation( "jdk" ) ) );
return false;
}
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 ff084f7201..77219a7b04 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
@@ -62,7 +62,7 @@ public class DefaultModelValidator
implements ModelValidator
{
- private static final Pattern ID_REGEX = Pattern.compile("[A-Za-z0-9_\\-.]+");
+ private static final Pattern ID_REGEX = Pattern.compile( "[A-Za-z0-9_\\-.]+" );
private static final String ILLEGAL_FS_CHARS = "\\/:\"<>|?*";
@@ -230,8 +230,9 @@ public class DefaultModelValidator
{
if ( !"pom".equals( model.getPackaging() ) )
{
- addViolation( problems, Severity.ERROR, Version.BASE,"packaging", null, "with value '" + model.getPackaging()
- + "' is invalid. Aggregator projects " + "require 'pom' as packaging.", model );
+ addViolation( problems, Severity.ERROR, Version.BASE, "packaging", null,
+ "with value '" + model.getPackaging() + "' is invalid. Aggregator projects "
+ + "require 'pom' as packaging.", model );
}
for ( int i = 0, n = model.getModules().size(); i < n; i++ )
@@ -850,7 +851,8 @@ public class DefaultModelValidator
buffer.append( ' ' ).append( message );
- problems.add( new ModelProblemCollectorRequest( severity, version ).setMessage( buffer.toString() ).setLocation( getLocation( fieldName, tracker )));
+ problems.add( new ModelProblemCollectorRequest( severity, version )
+ .setMessage( buffer.toString() ).setLocation( getLocation( fieldName, tracker ) ) );
}
private static InputLocation getLocation( String fieldName, InputLocationTracker tracker )
From 971f1cf749fad05c41a2589f51629d1c68902e6a Mon Sep 17 00:00:00 2001
From: olivier lamy
Date: Mon, 3 Dec 2012 13:43:11 +0100
Subject: [PATCH 027/102] add a timeout to prevent hanging too long
---
build.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.xml b/build.xml
index 2322be3c84..72a6a881e2 100644
--- a/build.xml
+++ b/build.xml
@@ -247,7 +247,7 @@ Do you want to continue?
-
+
From b3a91ebe35e5c6adbbe1a7d1f960e4c8b72347af Mon Sep 17 00:00:00 2001
From: olivier lamy
Date: Mon, 3 Dec 2012 13:45:24 +0100
Subject: [PATCH 028/102] add more memory too
---
build.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.xml b/build.xml
index 72a6a881e2..3a6d0302f5 100644
--- a/build.xml
+++ b/build.xml
@@ -247,7 +247,7 @@ Do you want to continue?
-
+
From d32fb267b241f2f836d7702c111d0af44d73676c Mon Sep 17 00:00:00 2001
From: olivier lamy
Date: Mon, 3 Dec 2012 13:47:28 +0100
Subject: [PATCH 029/102] oups I missed something here.
---
build.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.xml b/build.xml
index 3a6d0302f5..4bbbec927f 100644
--- a/build.xml
+++ b/build.xml
@@ -247,7 +247,7 @@ Do you want to continue?
-
+
From 5ccb925067825fe64519cd6d0464838ef5f11885 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Mon, 3 Dec 2012 19:10:23 +0100
Subject: [PATCH 030/102] added Plexus LoggerManager injection
---
maven-embedder/src/site/apt/logging.apt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/maven-embedder/src/site/apt/logging.apt b/maven-embedder/src/site/apt/logging.apt
index cb860d0748..fc3834efc4 100644
--- a/maven-embedder/src/site/apt/logging.apt
+++ b/maven-embedder/src/site/apt/logging.apt
@@ -22,7 +22,7 @@ Maven Logging
* Getting Logger Instance
- Plexus Logger can be injected in Plexus component using Plexus annotations
+ Plexus Logger and LoggerManager can be injected in Plexus component using Plexus annotations
+------+
import org.codehaus.plexus.logging.Logger;
@@ -35,6 +35,9 @@ public class DefaultMyComponent
{
@Requirement
private Logger logger;
+
+ @Requirement
+ private LoggerManager loggerManager;
}
+------+
From ac213ec571d838bec24adc85991f5e30dab87a92 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Mon, 3 Dec 2012 23:27:47 +0100
Subject: [PATCH 031/102] [MNG-5245] updated maven-site-plugin to 3.2
---
maven-core/src/main/resources/META-INF/plexus/components.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/maven-core/src/main/resources/META-INF/plexus/components.xml b/maven-core/src/main/resources/META-INF/plexus/components.xml
index 07515533e5..6282ba0971 100644
--- a/maven-core/src/main/resources/META-INF/plexus/components.xml
+++ b/maven-core/src/main/resources/META-INF/plexus/components.xml
@@ -129,10 +129,10 @@ under the License.
- org.apache.maven.plugins:maven-site-plugin:3.1:site
+ org.apache.maven.plugins:maven-site-plugin:3.2:site
- org.apache.maven.plugins:maven-site-plugin:3.1:deploy
+ org.apache.maven.plugins:maven-site-plugin:3.2:deploy
From 618d12906d044054815dc0b100065061767ab60b Mon Sep 17 00:00:00 2001
From: Jason van Zyl
Date: Mon, 3 Dec 2012 19:58:40 -0800
Subject: [PATCH 032/102] [maven-release-plugin] prepare release maven-3.1.0
---
apache-maven/pom.xml | 2 +-
maven-aether-provider/pom.xml | 2 +-
maven-artifact/pom.xml | 2 +-
maven-compat/pom.xml | 2 +-
maven-core/pom.xml | 2 +-
maven-embedder/pom.xml | 2 +-
maven-model-builder/pom.xml | 2 +-
maven-model/pom.xml | 2 +-
maven-plugin-api/pom.xml | 2 +-
maven-repository-metadata/pom.xml | 2 +-
maven-settings-builder/pom.xml | 2 +-
maven-settings/pom.xml | 2 +-
pom.xml | 3 ++-
13 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index ce547e777e..aeb177ffa8 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -21,7 +21,7 @@
org.apache.maven
maven
- 3.1-SNAPSHOT
+ 3.1.0
apache-maven
diff --git a/maven-aether-provider/pom.xml b/maven-aether-provider/pom.xml
index 6c611771d8..720ebd4a2e 100644
--- a/maven-aether-provider/pom.xml
+++ b/maven-aether-provider/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.1-SNAPSHOT
+ 3.1.0
maven-aether-provider
diff --git a/maven-artifact/pom.xml b/maven-artifact/pom.xml
index 2b1256e426..2ac838edab 100644
--- a/maven-artifact/pom.xml
+++ b/maven-artifact/pom.xml
@@ -16,7 +16,7 @@
org.apache.maven
maven
- 3.1-SNAPSHOT
+ 3.1.0
maven-artifact
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
index 3bdb1aa53c..f58bbf05fb 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
@@ -16,7 +16,7 @@
org.apache.maven
maven
- 3.1-SNAPSHOT
+ 3.1.0
maven-compat
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index 41e2079298..ad494a3cc7 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -16,7 +16,7 @@
org.apache.maven
maven
- 3.1-SNAPSHOT
+ 3.1.0
maven-core
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index 587398f371..8708ce5f4e 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -16,7 +16,7 @@
org.apache.maven
maven
- 3.1-SNAPSHOT
+ 3.1.0
maven-embedder
diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml
index a5b1aa196f..868bed97d9 100644
--- a/maven-model-builder/pom.xml
+++ b/maven-model-builder/pom.xml
@@ -16,7 +16,7 @@
org.apache.maven
maven
- 3.1-SNAPSHOT
+ 3.1.0
maven-model-builder
diff --git a/maven-model/pom.xml b/maven-model/pom.xml
index f00f6b034c..fc42596f75 100644
--- a/maven-model/pom.xml
+++ b/maven-model/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.1-SNAPSHOT
+ 3.1.0
maven-model
diff --git a/maven-plugin-api/pom.xml b/maven-plugin-api/pom.xml
index 227f574526..9bfe8a38bc 100644
--- a/maven-plugin-api/pom.xml
+++ b/maven-plugin-api/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.1-SNAPSHOT
+ 3.1.0
maven-plugin-api
diff --git a/maven-repository-metadata/pom.xml b/maven-repository-metadata/pom.xml
index 18da94ccb6..70e2f2fd31 100644
--- a/maven-repository-metadata/pom.xml
+++ b/maven-repository-metadata/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.1-SNAPSHOT
+ 3.1.0
maven-repository-metadata
diff --git a/maven-settings-builder/pom.xml b/maven-settings-builder/pom.xml
index 4538b2da9c..a1cd161815 100644
--- a/maven-settings-builder/pom.xml
+++ b/maven-settings-builder/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.1-SNAPSHOT
+ 3.1.0
maven-settings-builder
diff --git a/maven-settings/pom.xml b/maven-settings/pom.xml
index 01fbd886f8..b4abe63319 100644
--- a/maven-settings/pom.xml
+++ b/maven-settings/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.1-SNAPSHOT
+ 3.1.0
maven-settings
diff --git a/pom.xml b/pom.xml
index c97b7f317b..50b289ceb8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
maven
- 3.1-SNAPSHOT
+ 3.1.0
pom
Apache Maven
@@ -87,6 +87,7 @@
scm:git:https://git-wip-us.apache.org/repos/asf/maven.git
scm:git:https://git-wip-us.apache.org/repos/asf/maven.git
https://git-wip-us.apache.org/repos/asf?p=maven.git
+ maven-3.1.0
jira
From 73e144598736aa8ccb5836b70a2d0fd8b26c9fcf Mon Sep 17 00:00:00 2001
From: Jason van Zyl
Date: Mon, 3 Dec 2012 19:58:46 -0800
Subject: [PATCH 033/102] [maven-release-plugin] prepare for next development
iteration
---
apache-maven/pom.xml | 2 +-
maven-aether-provider/pom.xml | 2 +-
maven-artifact/pom.xml | 2 +-
maven-compat/pom.xml | 2 +-
maven-core/pom.xml | 2 +-
maven-embedder/pom.xml | 2 +-
maven-model-builder/pom.xml | 2 +-
maven-model/pom.xml | 2 +-
maven-plugin-api/pom.xml | 2 +-
maven-repository-metadata/pom.xml | 2 +-
maven-settings-builder/pom.xml | 2 +-
maven-settings/pom.xml | 2 +-
pom.xml | 4 ++--
13 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index aeb177ffa8..ce547e777e 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -21,7 +21,7 @@
org.apache.maven
maven
- 3.1.0
+ 3.1-SNAPSHOT
apache-maven
diff --git a/maven-aether-provider/pom.xml b/maven-aether-provider/pom.xml
index 720ebd4a2e..6c611771d8 100644
--- a/maven-aether-provider/pom.xml
+++ b/maven-aether-provider/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.1.0
+ 3.1-SNAPSHOT
maven-aether-provider
diff --git a/maven-artifact/pom.xml b/maven-artifact/pom.xml
index 2ac838edab..2b1256e426 100644
--- a/maven-artifact/pom.xml
+++ b/maven-artifact/pom.xml
@@ -16,7 +16,7 @@
org.apache.maven
maven
- 3.1.0
+ 3.1-SNAPSHOT
maven-artifact
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
index f58bbf05fb..3bdb1aa53c 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
@@ -16,7 +16,7 @@
org.apache.maven
maven
- 3.1.0
+ 3.1-SNAPSHOT
maven-compat
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index ad494a3cc7..41e2079298 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -16,7 +16,7 @@
org.apache.maven
maven
- 3.1.0
+ 3.1-SNAPSHOT
maven-core
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index 8708ce5f4e..587398f371 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -16,7 +16,7 @@
org.apache.maven
maven
- 3.1.0
+ 3.1-SNAPSHOT
maven-embedder
diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml
index 868bed97d9..a5b1aa196f 100644
--- a/maven-model-builder/pom.xml
+++ b/maven-model-builder/pom.xml
@@ -16,7 +16,7 @@
org.apache.maven
maven
- 3.1.0
+ 3.1-SNAPSHOT
maven-model-builder
diff --git a/maven-model/pom.xml b/maven-model/pom.xml
index fc42596f75..f00f6b034c 100644
--- a/maven-model/pom.xml
+++ b/maven-model/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.1.0
+ 3.1-SNAPSHOT
maven-model
diff --git a/maven-plugin-api/pom.xml b/maven-plugin-api/pom.xml
index 9bfe8a38bc..227f574526 100644
--- a/maven-plugin-api/pom.xml
+++ b/maven-plugin-api/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.1.0
+ 3.1-SNAPSHOT
maven-plugin-api
diff --git a/maven-repository-metadata/pom.xml b/maven-repository-metadata/pom.xml
index 70e2f2fd31..18da94ccb6 100644
--- a/maven-repository-metadata/pom.xml
+++ b/maven-repository-metadata/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.1.0
+ 3.1-SNAPSHOT
maven-repository-metadata
diff --git a/maven-settings-builder/pom.xml b/maven-settings-builder/pom.xml
index a1cd161815..4538b2da9c 100644
--- a/maven-settings-builder/pom.xml
+++ b/maven-settings-builder/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.1.0
+ 3.1-SNAPSHOT
maven-settings-builder
diff --git a/maven-settings/pom.xml b/maven-settings/pom.xml
index b4abe63319..01fbd886f8 100644
--- a/maven-settings/pom.xml
+++ b/maven-settings/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.1.0
+ 3.1-SNAPSHOT
maven-settings
diff --git a/pom.xml b/pom.xml
index 50b289ceb8..626195d825 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
maven
- 3.1.0
+ 3.1-SNAPSHOT
pom
Apache Maven
@@ -87,7 +87,7 @@
scm:git:https://git-wip-us.apache.org/repos/asf/maven.git
scm:git:https://git-wip-us.apache.org/repos/asf/maven.git
https://git-wip-us.apache.org/repos/asf?p=maven.git
- maven-3.1.0
+ HEAD
jira
From 19492b485a1a9ec26aadc22b51aa058ce1c405bd Mon Sep 17 00:00:00 2001
From: Anders Hammar
Date: Tue, 4 Dec 2012 13:50:03 +0100
Subject: [PATCH 034/102] [MNG-5403] tar.gz release artifacts have wrong
permissions on directories
Upgrading to m-assembly-p v2.4 solves this.
Signed-off-by: Anders Hammar
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 626195d825..e32d6dc694 100644
--- a/pom.xml
+++ b/pom.xml
@@ -393,7 +393,7 @@
org.apache.maven.plugins
maven-assembly-plugin
- 2.2-beta-5
+ 2.4
org.codehaus.mojo
From f95ab2e7cdb488442ab923abe6ec856efc993dd3 Mon Sep 17 00:00:00 2001
From: Anders Hammar
Date: Wed, 5 Dec 2012 14:21:04 +0100
Subject: [PATCH 035/102] [MNG-5402] Better build number for git
Signed-off-by: Anders Hammar
---
maven-core/pom.xml | 94 ++++++-------------
.../apache/maven/cli/CLIReportingUtils.java | 2 +-
pom.xml | 2 +-
3 files changed, 29 insertions(+), 69 deletions(-)
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index 41e2079298..3e18639f15 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -124,73 +124,33 @@
+
+ org.codehaus.mojo
+ buildnumber-maven-plugin
+
+
+ create-noncanonicalrev
+
+ create-timestamp
+
+
+ 'NON-CANONICAL_'yyyy-MM-dd_HH-mm_'${user.name}'
+ nonCanonicalRevision
+
+
+
+ create-buildnumber
+
+ create
+
+
+ false
+ false
+ ${nonCanonicalRevision}
+
+
+
+
-
-
-
- svn-buildnumber
-
-
- .svn
-
-
-
-
-
- org.codehaus.mojo
- buildnumber-maven-plugin
-
-
- generate-resources
-
- create
-
-
-
-
- false
- false
-
- javasvn
-
-
-
-
-
-
-
- non-canonical-buildnumber
-
-
- .svn
-
-
-
-
-
- org.codehaus.mojo
- buildnumber-maven-plugin
-
-
- generate-resources
-
- create
-
-
-
-
- false
- false
- NON-CANONICAL_{0,date,yyyy-MM-dd_HH-mm}_{1}
-
- - timestamp
- - ${user.name}
-
-
-
-
-
-
-
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
index 8f1ae8e163..6173959a1f 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
@@ -83,7 +83,7 @@ public final class CLIReportingUtils
if ( rev != null || timestamp != null )
{
msg += " (";
- msg += ( rev != null ? "r" + rev : "" );
+ msg += ( rev != null ? rev : "" );
if ( timestamp != null )
{
SimpleDateFormat fmt = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ssZ" );
diff --git a/pom.xml b/pom.xml
index e32d6dc694..d6739391d2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -398,7 +398,7 @@
org.codehaus.mojo
buildnumber-maven-plugin
- 1.0
+ 1.2
org.apache.maven.plugins
From 23bd8d98a66ea7bc078a96447ee7ed8555ceaaf0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Sat, 8 Dec 2012 16:05:37 +0100
Subject: [PATCH 036/102] added @since info
---
.../classrealm/DefaultClassRealmManager.java | 7 +++++--
.../maven/plugin/descriptor/MojoDescriptor.java | 16 ++++++++++++++--
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
index 0db5b4b29f..e6e15d2c31 100644
--- a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
+++ b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
@@ -127,7 +127,7 @@ public class DefaultClassRealmManager
return mavenRealm;
}
- private void importMavenApi( Map imports )
+ private void importMavenApi( Map imports, boolean importSlf4japi )
{
ClassRealm coreRealm = getCoreRealm();
@@ -219,7 +219,10 @@ public class DefaultClassRealmManager
// imports.put( "com.google.inject.util.*", coreRealm );
// SLF4J
- imports.put( "org.slf4j.*", coreRealm );
+ if ( importSlf4japi )
+ {
+ imports.put( "org.slf4j.*", coreRealm );
+ }
}
/**
diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
index d73f66d5f4..8c3d9da894 100644
--- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
+++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
@@ -108,7 +108,10 @@ public class MojoDescriptor
/** Specify the required dependencies in a specified scope */
private String dependencyResolutionRequired = null;
- /** The scope of (transitive) dependencies that should be collected but not resolved. */
+ /**
+ * The scope of (transitive) dependencies that should be collected but not resolved.
+ * @since 3.0-alpha-3
+ */
private String dependencyCollectionRequired;
/** By default, the Mojo needs a Maven project to be executed */
@@ -132,7 +135,10 @@ public class MojoDescriptor
/** By default, the Mojo don't need reports to run */
private boolean requiresReports = false;
- /** By default, mojos are not threadsafe */
+ /**
+ * By default, mojos are not threadsafe
+ * @since 3.0-beta-2
+ */
private boolean threadSafe = false;
/**
@@ -271,6 +277,9 @@ public class MojoDescriptor
return dependencyResolutionRequired;
}
+ /**
+ * @since 3.0-alpha-3
+ */
public void setDependencyCollectionRequired( String requiresDependencyCollection )
{
this.dependencyCollectionRequired = requiresDependencyCollection;
@@ -284,6 +293,7 @@ public class MojoDescriptor
* full dependency resolution might fail due to projects which haven't been built yet.
*
* @return The scope of (transitive) dependencies that should be collected or {@code null} if none.
+ * @since 3.0-alpha-3
*/
public String getDependencyCollectionRequired()
{
@@ -664,6 +674,7 @@ public class MojoDescriptor
/**
* @return True if the Mojo
is thread-safe and can be run safely in parallel
+ * @since 3.0-beta-2
*/
public boolean isThreadSafe()
{
@@ -672,6 +683,7 @@ public class MojoDescriptor
/**
* @param threadSafe indicates that the mojo is thread-safe and can be run safely in parallel
+ * @since 3.0-beta-2
*/
public void setThreadSafe( boolean threadSafe )
{
From d6544c4814a91c15d67a05d60e18f91a72fc57a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Sat, 8 Dec 2012 17:47:12 +0100
Subject: [PATCH 037/102] reverted change that got in previous commit by
inadvertance
---
.../apache/maven/classrealm/DefaultClassRealmManager.java | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
index e6e15d2c31..0db5b4b29f 100644
--- a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
+++ b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
@@ -127,7 +127,7 @@ public class DefaultClassRealmManager
return mavenRealm;
}
- private void importMavenApi( Map imports, boolean importSlf4japi )
+ private void importMavenApi( Map imports )
{
ClassRealm coreRealm = getCoreRealm();
@@ -219,10 +219,7 @@ public class DefaultClassRealmManager
// imports.put( "com.google.inject.util.*", coreRealm );
// SLF4J
- if ( importSlf4japi )
- {
- imports.put( "org.slf4j.*", coreRealm );
- }
+ imports.put( "org.slf4j.*", coreRealm );
}
/**
From c8536bf89f30b68cc00e4c23c28f6a2370d8ec4c Mon Sep 17 00:00:00 2001
From: Jason van Zyl
Date: Sat, 8 Dec 2012 19:30:57 -0500
Subject: [PATCH 038/102] - make m2e happy on import
---
maven-core/pom.xml | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index 3e18639f15..dcc269947b 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -152,5 +152,34 @@
+
+
+
+
+ org.eclipse.m2e
+ lifecycle-mapping
+ 1.0.0
+
+
+
+
+
+ org.codehaus.mojo
+ buildnumber-maven-plugin
+ [1.2,)
+
+ create-timestamp
+
+
+
+
+
+
+
+
+
+
+
+
From 3d4a06c7009f159a40fd94d911b5d41e07330701 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Wed, 12 Dec 2012 01:57:02 +0100
Subject: [PATCH 039/102] added ClassRealmManager entry point
---
maven-core/src/site/apt/index.apt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/maven-core/src/site/apt/index.apt b/maven-core/src/site/apt/index.apt
index 72d4696a7d..4043c80ccd 100644
--- a/maven-core/src/site/apt/index.apt
+++ b/maven-core/src/site/apt/index.apt
@@ -26,4 +26,9 @@ Maven Core
({{{./xref/org/apache/maven/plugin/internal/DefaultMavenPluginManager.html}source}}),
* {{{./apidocs/org/apache/maven/plugin/PluginParameterExpressionEvaluator.html}PluginParameterExpressionEvaluator}}, used to
- evaluate plugin parameters values during Mojo configuration.
+ evaluate plugin parameters values during Mojo configuration,
+
+ * {{{/guides/mini/guide-maven-classloading.html}classloader hierarchy}} done by <<>> component
+ ({{{./apidocs/org/apache/maven/classrealm/ClassRealmManager.html}javadoc}}),
+ with its <<>> implementation
+ ({{{./xref/org/apache/maven/classrealm/DefaultClassRealmManager.html}source}}).
From 87952bd073388d95da37b1b0e13640c6966729aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Wed, 12 Dec 2012 17:37:03 +0100
Subject: [PATCH 040/102] added link to Plexus Classworlds
---
maven-core/src/site/apt/index.apt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/maven-core/src/site/apt/index.apt b/maven-core/src/site/apt/index.apt
index 4043c80ccd..f1c63294ce 100644
--- a/maven-core/src/site/apt/index.apt
+++ b/maven-core/src/site/apt/index.apt
@@ -31,4 +31,5 @@ Maven Core
* {{{/guides/mini/guide-maven-classloading.html}classloader hierarchy}} done by <<>> component
({{{./apidocs/org/apache/maven/classrealm/ClassRealmManager.html}javadoc}}),
with its <<>> implementation
- ({{{./xref/org/apache/maven/classrealm/DefaultClassRealmManager.html}source}}).
+ ({{{./xref/org/apache/maven/classrealm/DefaultClassRealmManager.html}source}}), using
+ {{{http://plexus.codehaus.org/plexus-classworlds/}Plexus Classworlds}}.
From a40df3ab833b237c8c6a9234c3c5093503f46781 Mon Sep 17 00:00:00 2001
From: olivier lamy
Date: Fri, 14 Dec 2012 14:51:09 +0100
Subject: [PATCH 041/102] configure memory for forked java
---
build.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/build.xml b/build.xml
index 4bbbec927f..14628b2b24 100644
--- a/build.xml
+++ b/build.xml
@@ -247,8 +247,9 @@ Do you want to continue?
-
+
+
From d8cc98c8be85f87e205e08c9783ce4269ab479d2 Mon Sep 17 00:00:00 2001
From: olivier lamy
Date: Fri, 14 Dec 2012 15:00:10 +0100
Subject: [PATCH 042/102] make fork or not configurable for ci testing
---
build.xml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/build.xml b/build.xml
index 14628b2b24..2dcf0944c8 100644
--- a/build.xml
+++ b/build.xml
@@ -36,6 +36,8 @@ END SNIPPET: ant-bootstrap -->
+
+
Building ${distributionName} ...
@@ -247,9 +249,9 @@ Do you want to continue?
-
+
-
+
From 68a54c7e227702fce27a597b3e589afca9090c13 Mon Sep 17 00:00:00 2001
From: olivier lamy
Date: Fri, 14 Dec 2012 15:29:00 +0100
Subject: [PATCH 043/102] revert ${maven-compile.jvmargs} usage as look to fail
on ci but not locally , sorry olamy != ant guru :-)
---
build.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/build.xml b/build.xml
index 2dcf0944c8..6b93808323 100644
--- a/build.xml
+++ b/build.xml
@@ -38,6 +38,7 @@ END SNIPPET: ant-bootstrap -->
+
Building ${distributionName} ...
@@ -249,9 +250,9 @@ Do you want to continue?
-
+
-
+
From 866f2c58b85a6a34297b913a69569535f5f84684 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Sat, 15 Dec 2012 10:48:38 +0100
Subject: [PATCH 044/102] prepared svnpubsub for site
---
pom.xml | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/pom.xml b/pom.xml
index d6739391d2..7ed3df43f4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,7 +38,7 @@
number of other development tools for reporting or the build
process.
- ${siteUrl}
+ http://maven.apache.org/ref/${project.version}
2001
@@ -62,10 +62,7 @@
apache-maven
Maven
Apache Maven
-
- scp://people.apache.org/www/maven.apache.org/ref/${project.version}/
- http://maven.apache.org/ref/${project.version}/
-
+ ${user.home}/maven-sites
@@ -100,7 +97,7 @@
apache.website
- ${siteDeployUrl}
+ scm:svn:https://svn.apache.org/repos/infra/websites/production/maven/content/ref/${project.version}
@@ -412,6 +409,15 @@
+
+ org.apache.maven.plugins
+ maven-scm-publish-plugin
+ 1.0-beta-2
+
+ ${maven.site.cache}/ref/${project.version}
+ true
+
+
From 38e3de00cbbf9ed969d61e5a2fbefd8d24642711 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Sat, 15 Dec 2012 10:56:15 +0100
Subject: [PATCH 045/102] javadoc formatting
---
.../DefaultInheritanceAssembler.java | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java b/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
index a66be04dea..92f44052f4 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
@@ -58,12 +58,17 @@ public class DefaultInheritanceAssembler
/**
* Calculates the relative path from the base directory of the parent to the parent directory of the base directory
- * of the child. The general idea is to adjust inherited URLs to match the project layout (in SCM). This calculation
- * is only a heuristic based on our conventions. In detail, the algo relies on the following assumptions. The parent
- * uses aggregation and refers to the child via the modules section. The module path to the child is considered to
- * point at the POM rather than its base directory if the path ends with ".xml" (ignoring case). The name of the
- * child's base directory matches the artifact id of the child. Note that for the sake of independence from the user
- * environment, the filesystem is intentionally not used for the calculation.
+ * of the child. The general idea is to adjust inherited URLs to match the project layout (in SCM).
+ *
+ * This calculation is only a heuristic based on our conventions.
+ * In detail, the algo relies on the following assumptions:
+ * - The parent uses aggregation and refers to the child via the modules section
+ * - The module path to the child is considered to
+ * point at the POM rather than its base directory if the path ends with ".xml" (ignoring case)
+ * - The name of the child's base directory matches the artifact id of the child.
+ *
+ * Note that for the sake of independence from the user
+ * environment, the filesystem is intentionally not used for the calculation.
*
* @param child The child model, must not be null
.
* @param parent The parent model, may be null
.
From 950b9b3c58f74ebce30dc224f8a101972eac8d0b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Sat, 15 Dec 2012 11:14:31 +0100
Subject: [PATCH 046/102] added more pointers to sources
---
maven-model-builder/src/site/apt/index.apt | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/maven-model-builder/src/site/apt/index.apt b/maven-model-builder/src/site/apt/index.apt
index ed3930c4d4..0b604c9edb 100644
--- a/maven-model-builder/src/site/apt/index.apt
+++ b/maven-model-builder/src/site/apt/index.apt
@@ -24,23 +24,31 @@ Maven Model Builder
** profile activation (see {{{./apidocs/org/apache/maven/model/profile/activation/package-summary.html}available activators}})
- ** model normalization
+ ** model normalization: <<>> ({{{./apidocs/org/apache/maven/model/normalization/ModelNormalizer.html}javadoc}}),
+ with its <<>> implementation
+ ({{{./xref/org/apache/maven/model/normalization/DefaultModelNormalizer.html}source}})
** profile injection
** parent resolution until {{{./super-pom.html}super-pom}}
- ** inheritance assembly
+ ** inheritance assembly: <<>> ({{{./apidocs/org/apache/maven/model/inheritance/InheritanceAssembler.html}javadoc}}),
+ with its <<>> implementation
+ ({{{./xref/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.html}source}})
** model interpolation (see below)
- ** url normalization
+ ** url normalization: <<>> ({{{./apidocs/org/apache/maven/model/path/UrlNormalizer.html}javadoc}}),
+ with its <<>> implementation
+ ({{{./xref/org/apache/maven/model/path/DefaultUrlNormalizer.html}source}})
[]
* phase 2
- ** model path translation
+ ** model path translation: <<>> ({{{./apidocs/org/apache/maven/model/path/ModelPathTranslator.html}javadoc}}),
+ with its <<>> implementation
+ ({{{./xref/org/apache/maven/model/path/DefaultModelPathTranslator.html}source}})
** plugin management injection
@@ -56,7 +64,9 @@ Maven Model Builder
** <(optional)> plugins configuration
- ** effective model validation
+ ** effective model validation: <<>> ({{{./apidocs/org/apache/maven/model/validation/ModelValidator.html}javadoc}}),
+ with its <<>> implementation
+ ({{{./xref/org/apache/maven/model/validation/DefaultModelValidator.html}source}})
[]
From a07fdf076cc4b590cfa2a0e608fcbd75ce63ec3b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Sat, 15 Dec 2012 21:06:57 +0100
Subject: [PATCH 047/102] improved javadoc
---
.../maven/model/merge/MavenModelMerger.java | 31 ++++----
.../apache/maven/model/merge/ModelMerger.java | 71 +++++++++++--------
2 files changed, 56 insertions(+), 46 deletions(-)
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
index 92c0ee6a94..568bbcb2a0 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java
@@ -52,7 +52,8 @@ import org.apache.maven.model.Scm;
import org.apache.maven.model.Site;
/**
- * The domain-specific model merger for the Maven POM.
+ * The domain-specific model merger for the Maven POM, overriding generic code from parent class when necessary with
+ * more adapted algorithms.
*
* @author Benjamin Bentmann
*/
@@ -631,45 +632,45 @@ public class MavenModelMerger
}
@Override
- protected Object getPluginKey( Plugin object )
+ protected Object getPluginKey( Plugin plugin )
{
- return object.getKey();
+ return plugin.getKey();
}
@Override
- protected Object getPluginExecutionKey( PluginExecution object )
+ protected Object getPluginExecutionKey( PluginExecution pluginExecution )
{
- return object.getId();
+ return pluginExecution.getId();
}
@Override
- protected Object getReportPluginKey( ReportPlugin object )
+ protected Object getReportPluginKey( ReportPlugin reportPlugin )
{
- return object.getKey();
+ return reportPlugin.getKey();
}
@Override
- protected Object getReportSetKey( ReportSet object )
+ protected Object getReportSetKey( ReportSet reportSet )
{
- return object.getId();
+ return reportSet.getId();
}
@Override
- protected Object getRepositoryBaseKey( RepositoryBase object )
+ protected Object getRepositoryBaseKey( RepositoryBase repositoryBase )
{
- return object.getId();
+ return repositoryBase.getId();
}
@Override
- protected Object getExtensionKey( Extension object )
+ protected Object getExtensionKey( Extension extension )
{
- return object.getGroupId() + ':' + object.getArtifactId();
+ return extension.getGroupId() + ':' + extension.getArtifactId();
}
@Override
- protected Object getExclusionKey( Exclusion object )
+ protected Object getExclusionKey( Exclusion exclusion )
{
- return object.getGroupId() + ':' + object.getArtifactId();
+ return exclusion.getGroupId() + ':' + exclusion.getArtifactId();
}
private String appendPath( String parentPath, Map