This is an automated email from the git hooks/post-receive script. skitt pushed a commit to branch maven-3.5.2 in repository maven.
commit 136f2c158edddb85389dc3112a8403c0d0d3cfd8 Author: Stephen Kitt <sk...@debian.org> Date: Fri Feb 9 20:57:58 2018 +0100 New upstream version 3.5.2 --- apache-maven/pom.xml | 2 +- apache-maven/src/bin/mvn | 8 ++ .../src/conf/logging/simplelogger.properties | 1 + maven-artifact/pom.xml | 2 +- maven-builder-support/pom.xml | 2 +- maven-compat/pom.xml | 2 +- maven-core/pom.xml | 2 +- .../maven/classrealm/DefaultClassRealmManager.java | 2 +- .../maven/plugin/DefaultBuildPluginManager.java | 5 +- .../classrealm/DefaultClassRealmManagerTest.java | 101 --------------------- 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-resolver-provider/pom.xml | 2 +- maven-settings-builder/pom.xml | 2 +- maven-settings/pom.xml | 2 +- maven-slf4j-provider/pom.xml | 22 +---- .../java/org/slf4j/impl/MavenSimpleLogger.java | 6 +- .../java/org/slf4j/impl/StaticLoggerBinder.java | 89 ++++++++++++++++++ .../src/main/script/patch-slf4j-simple.groovy | 53 ----------- pom.xml | 6 +- 23 files changed, 124 insertions(+), 195 deletions(-) diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml index eb97543..ba28fa2 100644 --- a/apache-maven/pom.xml +++ b/apache-maven/pom.xml @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>apache-maven</artifactId> diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn index fa6164b..e3a5848 100755 --- a/apache-maven/src/bin/mvn +++ b/apache-maven/src/bin/mvn @@ -188,6 +188,14 @@ export MAVEN_PROJECTBASEDIR MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" export MAVEN_CMD_LINE_ARGS +# detect cygwin or mingw pseudo-terminal for Jansi +# workaround for https://github.com/fusesource/jansi-native/issues/11 +if $cygwin || $mingw; then + if [ -t 1 ]; then + MAVEN_OPTS="-Djansi.passthrough=true $MAVEN_OPTS" + fi +fi + exec "$JAVACMD" \ $MAVEN_OPTS \ $MAVEN_DEBUG_OPTS \ diff --git a/apache-maven/src/conf/logging/simplelogger.properties b/apache-maven/src/conf/logging/simplelogger.properties index 8dea717..64b331b 100644 --- a/apache-maven/src/conf/logging/simplelogger.properties +++ b/apache-maven/src/conf/logging/simplelogger.properties @@ -20,6 +20,7 @@ org.slf4j.simpleLogger.showDateTime=false org.slf4j.simpleLogger.showThreadName=false org.slf4j.simpleLogger.showLogName=false org.slf4j.simpleLogger.logFile=System.out +org.slf4j.simpleLogger.cacheOutputStream=true org.slf4j.simpleLogger.levelInBrackets=true org.slf4j.simpleLogger.log.Sisu=info org.slf4j.simpleLogger.warnLevelString=WARNING diff --git a/maven-artifact/pom.xml b/maven-artifact/pom.xml index 8a978a8..3772dd9 100644 --- a/maven-artifact/pom.xml +++ b/maven-artifact/pom.xml @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>maven-artifact</artifactId> diff --git a/maven-builder-support/pom.xml b/maven-builder-support/pom.xml index 02682ab..0b6328e 100644 --- a/maven-builder-support/pom.xml +++ b/maven-builder-support/pom.xml @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>maven-builder-support</artifactId> diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml index 9d3542e..1935ebf 100644 --- a/maven-compat/pom.xml +++ b/maven-compat/pom.xml @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>maven-compat</artifactId> diff --git a/maven-core/pom.xml b/maven-core/pom.xml index 78a7dc6..8ab5bcc 100644 --- a/maven-core/pom.xml +++ b/maven-core/pom.xml @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>maven-core</artifactId> 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 013ab23..6ce1925 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 @@ -120,7 +120,7 @@ public class DefaultClassRealmManager { try { - ClassRealm classRealm = world.newRealm( realmId, PARENT_CLASSLOADER ); + ClassRealm classRealm = world.newRealm( realmId, null ); if ( logger.isDebugEnabled() ) { 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 3af1125..b4f7a4d 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 @@ -106,11 +106,8 @@ public class DefaultBuildPluginManager throw new PluginExecutionException( mojoExecution, project, e ); } - // use project realm as thread context classloader to enable components from all extensions=true plugins - ClassRealm tccl = mojoExecution.getPlugin().isExtensions() ? project.getClassRealm() : pluginRealm; - ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader( tccl ); + Thread.currentThread().setContextClassLoader( pluginRealm ); MavenSession oldSession = legacySupport.getSession(); diff --git a/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java b/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java deleted file mode 100644 index 726199f..0000000 --- a/maven-core/src/test/java/org/apache/maven/classrealm/DefaultClassRealmManagerTest.java +++ /dev/null @@ -1,101 +0,0 @@ -package org.apache.maven.classrealm; - -/* - * 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.ServiceLoader; - -import javax.script.ScriptEngineFactory; - -import org.apache.maven.model.Model; -import org.apache.maven.model.Plugin; -import org.codehaus.plexus.ContainerConfiguration; -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.junit.Test; - -public class DefaultClassRealmManagerTest extends PlexusTestCase -{ - private ClassRealmManager classRealmManager; - - @Override - protected void setUp() - throws Exception - { - super.setUp(); - this.classRealmManager = lookup( ClassRealmManager.class ); - } - - @Override - protected void customizeContainerConfiguration( ContainerConfiguration configuration ) - { - configuration.setClassPathScanning( PlexusConstants.SCANNING_INDEX ); - } - - @Test - public void testMNG6275_pluginRealmDefaultParentClassLoader() - { - Plugin plugin = new Plugin(); - plugin.setVersion( "VERSION" ); - - ClassLoader parent = null; - - ClassRealm pluginRealm = classRealmManager.createPluginRealm( plugin, parent, null, null, null ); - ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, pluginRealm ); - assertTrue( sef.iterator().hasNext() ); - } - - @Test - public void testMNG6275_extensionRealmDefaultParentClassLoader() - { - Plugin extension = new Plugin(); - extension.setVersion( "VERSION" ); - - ClassRealm extensionRealm = classRealmManager.createExtensionRealm( extension, null ); - ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, extensionRealm ); - assertTrue( sef.iterator().hasNext() ); - } - - @Test - public void testMNG6275_projectRealmDefaultParentClassLoader() - { - Model model = new Model(); - - ClassRealm projectRealm = classRealmManager.createProjectRealm( model, null ); - ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, projectRealm ); - assertTrue( sef.iterator().hasNext() ); - } - - @Test - public void testMNG6275_mavenApiRealmDefaultParentClassLoader() - { - ClassRealm mavenApiRealm = classRealmManager.getMavenApiRealm(); - ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, mavenApiRealm ); - assertTrue( sef.iterator().hasNext() ); - } - - @Test - public void testMNG6275_coreRealmDefaultParentClassLoader() - { - ClassRealm coreRealm = classRealmManager.getCoreRealm(); - ServiceLoader<ScriptEngineFactory> sef = ServiceLoader.load( ScriptEngineFactory.class, coreRealm ); - assertTrue( sef.iterator().hasNext() ); - } -} diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml index b759470..6dd1641 100644 --- a/maven-embedder/pom.xml +++ b/maven-embedder/pom.xml @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>maven-embedder</artifactId> diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml index d44ff50..f6ebe27 100644 --- a/maven-model-builder/pom.xml +++ b/maven-model-builder/pom.xml @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>maven-model-builder</artifactId> diff --git a/maven-model/pom.xml b/maven-model/pom.xml index a321d35..6897154 100644 --- a/maven-model/pom.xml +++ b/maven-model/pom.xml @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>maven-model</artifactId> diff --git a/maven-plugin-api/pom.xml b/maven-plugin-api/pom.xml index 9e81210..57c7ad5 100644 --- a/maven-plugin-api/pom.xml +++ b/maven-plugin-api/pom.xml @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>maven-plugin-api</artifactId> diff --git a/maven-repository-metadata/pom.xml b/maven-repository-metadata/pom.xml index 18c23bf..605363d 100644 --- a/maven-repository-metadata/pom.xml +++ b/maven-repository-metadata/pom.xml @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>maven-repository-metadata</artifactId> diff --git a/maven-resolver-provider/pom.xml b/maven-resolver-provider/pom.xml index c78fde1..f6e1774 100644 --- a/maven-resolver-provider/pom.xml +++ b/maven-resolver-provider/pom.xml @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>maven-resolver-provider</artifactId> diff --git a/maven-settings-builder/pom.xml b/maven-settings-builder/pom.xml index dd60239..0a3393d 100644 --- a/maven-settings-builder/pom.xml +++ b/maven-settings-builder/pom.xml @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>maven-settings-builder</artifactId> diff --git a/maven-settings/pom.xml b/maven-settings/pom.xml index cd00975..882a495 100644 --- a/maven-settings/pom.xml +++ b/maven-settings/pom.xml @@ -25,7 +25,7 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>maven-settings</artifactId> diff --git a/maven-slf4j-provider/pom.xml b/maven-slf4j-provider/pom.xml index e7fdf96..f756874 100644 --- a/maven-slf4j-provider/pom.xml +++ b/maven-slf4j-provider/pom.xml @@ -25,14 +25,14 @@ under the License. <parent> <groupId>org.apache.maven</groupId> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> </parent> <artifactId>maven-slf4j-provider</artifactId> <name>Maven SLF4J Simple Provider</name> <description> - Maven SLF4J provider based on SLF4J's simple provider, monkey-patched to support Maven styled colors + Maven SLF4J provider based on SLF4J's simple provider, extended to support Maven styled colors for levels and stacktraces rendering. </description> @@ -63,6 +63,7 @@ under the License. <overWrite>false</overWrite> <outputDirectory>${project.build.directory}/generated-sources/slf4j-simple</outputDirectory> <includes>org/slf4j/impl/*.java</includes> + <excludes>org/slf4j/impl/StaticLoggerBinder*</excludes> </artifactItem> </artifactItems> </configuration> @@ -94,23 +95,6 @@ under the License. </execution> </executions> </plugin> - <plugin> - <groupId>org.codehaus.gmaven</groupId> - <artifactId>groovy-maven-plugin</artifactId> - <version>2.0</version> - <executions> - <execution> - <id>patch-slf4j-simple</id> - <phase>process-sources</phase> - <goals> - <goal>execute</goal> - </goals> - <configuration> - <source>${project.basedir}/src/main/script/patch-slf4j-simple.groovy</source> - </configuration> - </execution> - </executions> - </plugin> </plugins> </build> </project> \ No newline at end of file diff --git a/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java b/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java index 17f1f48..3c1ca4f 100644 --- a/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java +++ b/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLogger.java @@ -56,8 +56,12 @@ public class MavenSimpleLogger } @Override - protected void renderThrowable( Throwable t, PrintStream stream ) + protected void writeThrowable( Throwable t, PrintStream stream ) { + if ( t == null ) + { + return; + } stream.print( buffer().failure( t.getClass().getName() ) ); if ( t.getMessage() != null ) { diff --git a/maven-slf4j-provider/src/main/java/org/slf4j/impl/StaticLoggerBinder.java b/maven-slf4j-provider/src/main/java/org/slf4j/impl/StaticLoggerBinder.java new file mode 100644 index 0000000..ba01d83 --- /dev/null +++ b/maven-slf4j-provider/src/main/java/org/slf4j/impl/StaticLoggerBinder.java @@ -0,0 +1,89 @@ +package org.slf4j.impl; + +/* + * 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.slf4j.ILoggerFactory; +import org.slf4j.spi.LoggerFactoryBinder; + +/** + * SLF4J LoggerFactoryBinder implementation using MavenSimpleLogger. + * This class is part of the required classes used to specify an + * SLF4J logger provider implementation. + * + * @since 3.5.1 + */ +public final class StaticLoggerBinder + implements LoggerFactoryBinder +{ + /** + * Declare the version of the SLF4J API this implementation is compiled + * against. The value of this field is usually modified with each release. + */ + // to avoid constant folding by the compiler, this field must *not* be final + @SuppressWarnings( { "checkstyle:staticvariablename", "checkstyle:visibilitymodifier" } ) + public static String REQUESTED_API_VERSION = "1.7.25"; // !final + + private static final String LOGGER_FACTORY_CLASS_STR = MavenSimpleLoggerFactory.class.getName(); + + /** + * The unique instance of this class. + */ + private static final StaticLoggerBinder SINGLETON = new StaticLoggerBinder(); + + /** + * The ILoggerFactory instance returned by the {@link #getLoggerFactory} + * method should always be the same object + */ + private final ILoggerFactory loggerFactory; + + /** + * Private constructor to prevent instantiation + */ + private StaticLoggerBinder() + { + loggerFactory = new MavenSimpleLoggerFactory(); + } + + /** + * Returns the singleton of this class. + */ + public static StaticLoggerBinder getSingleton() + { + return SINGLETON; + } + + /** + * Returns the factory. + */ + @Override + public ILoggerFactory getLoggerFactory() + { + return loggerFactory; + } + + /** + * Returns the class name. + */ + @Override + public String getLoggerFactoryClassStr() + { + return LOGGER_FACTORY_CLASS_STR; + } +} diff --git a/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy b/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy deleted file mode 100644 index bba8646..0000000 --- a/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy +++ /dev/null @@ -1,53 +0,0 @@ - -/* - * 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. - */ - -dir = new File( basedir, 'target/generated-sources/slf4j-simple/org/slf4j/impl' ); - -file = new File( dir, 'StaticLoggerBinder.java' ); -content = file.text; - -// check if already patched -if ( content.contains( 'MavenSimpleLoggerFactory' ) ) -{ - println ' slf4j-simple already patched'; - return; -} - - -println ' patching StaticLoggerBinder.java'; -content = content.replaceAll( 'SimpleLoggerFactory', 'MavenSimpleLoggerFactory' ); -file.write( content ); - - -println ' patching SimpleLogger.java'; -file = new File( dir, 'SimpleLogger.java' ); -content = file.text; -content = content.replaceAll( 'private static final int LOG_LEVEL_', 'protected static final int LOG_LEVEL_' ); -content = content.replaceAll( 't.printStackTrace(TARGET_STREAM)', 'renderThrowable(t, TARGET_STREAM);' ); - -index = content.indexOf( 'switch (level) {' ); -end = content.indexOf( '}', index ) + 1; -content = content.substring( 0, index ) + 'buf.append(renderLevel(level));' + content.substring( end ); - -content = content.substring( 0, content.lastIndexOf( '}' ) ); -content += ' protected void renderThrowable(Throwable t, PrintStream stream) {}\n'; -content += ' protected String renderLevel(int level) { return ""; }\n}\n'; - -file.write( content ); diff --git a/pom.xml b/pom.xml index 2c97f6b..7803da7 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ under the License. </parent> <artifactId>maven</artifactId> - <version>3.5.1</version> + <version>3.5.2</version> <packaging>pom</packaging> <name>Apache Maven</name> @@ -66,7 +66,7 @@ under the License. <modelloVersion>1.9.1</modelloVersion> <jxpathVersion>1.3</jxpathVersion> <resolverVersion>1.1.0</resolverVersion> - <slf4jVersion>1.7.22</slf4jVersion> + <slf4jVersion>1.7.25</slf4jVersion> <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile> <!-- Control the name of the distribution and information output by mvn --> <distributionId>apache-maven</distributionId> @@ -98,7 +98,7 @@ under the License. <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</connection> <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven.git</developerConnection> <url>https://github.com/apache/maven/tree/${project.scm.tag}</url> - <tag>maven-3.5.1</tag> + <tag>maven-3.5.2</tag> </scm> <issueManagement> <system>jira</system> -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/maven.git _______________________________________________ pkg-java-commits mailing list pkg-java-comm...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits