[maven-wagon] branch WAGON-544 updated: Formatting
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch WAGON-544 in repository https://gitbox.apache.org/repos/asf/maven-wagon.git The following commit(s) were added to refs/heads/WAGON-544 by this push: new 6bc6b09 Formatting 6bc6b09 is described below commit 6bc6b09fadc7c32130ce73e69745c373118d42e5 Author: Michael Osipov AuthorDate: Wed Jan 2 22:26:43 2019 +0100 Formatting --- .../providers/ssh/jsch/AbstractJschWagon.java | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/AbstractJschWagon.java b/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/AbstractJschWagon.java index 2cffbba..7e87d2d 100644 --- a/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/AbstractJschWagon.java +++ b/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/AbstractJschWagon.java @@ -486,30 +486,30 @@ public abstract class AbstractJschWagon // This method will be removed as soon as JSch issue #122 is resolved @Override protected void transfer( Resource resource, InputStream input, OutputStream output, int requestType, long maxSize ) -throws IOException -{ -byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; +throws IOException +{ +byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; -TransferEvent transferEvent = new TransferEvent( this, resource, TransferEvent.TRANSFER_PROGRESS, requestType ); -transferEvent.setTimestamp( System.currentTimeMillis() ); +TransferEvent transferEvent = new TransferEvent( this, resource, TransferEvent.TRANSFER_PROGRESS, requestType ); +transferEvent.setTimestamp( System.currentTimeMillis() ); -long remaining = maxSize; -while ( remaining > 0L ) -{ -// let's safely cast to int because the min value will be lower than the buffer size. -int n = input.read( buffer, 0, (int) Math.min( buffer.length, remaining ) ); +long remaining = maxSize; +while ( remaining > 0L ) +{ +// let's safely cast to int because the min value will be lower than the buffer size. +int n = input.read( buffer, 0, (int) Math.min( buffer.length, remaining ) ); -if ( n == -1 ) -{ -break; -} +if ( n == -1 ) +{ +break; +} -fireTransferProgress( transferEvent, buffer, n ); +fireTransferProgress( transferEvent, buffer, n ); -output.write( buffer, 0, n ); +output.write( buffer, 0, n ); -remaining -= n; -} -output.flush(); +remaining -= n; } +output.flush(); +} }
[maven-wagon] 01/01: [WAGON-544] Work around JSch issue #122
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch WAGON-544 in repository https://gitbox.apache.org/repos/asf/maven-wagon.git commit 14eabd661882577187bb161fb2b06ebb93fa4eb6 Author: Michael Osipov AuthorDate: Wed Jan 2 22:10:31 2019 +0100 [WAGON-544] Work around JSch issue #122 The workaround is merely restoring the previous transfer method on AbstractJschWagon only. --- .../java/org/apache/maven/wagon/AbstractWagon.java | 1 - .../providers/ssh/jsch/AbstractJschWagon.java | 33 ++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java b/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java index 8995559..8827b64 100644 --- a/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java +++ b/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java @@ -583,7 +583,6 @@ public abstract class AbstractWagon protected void transfer( Resource resource, InputStream input, OutputStream output, int requestType, long maxSize ) throws IOException { - ByteBuffer buffer = ByteBuffer.allocate( getBufferCapacityForTransfer( resource.getContentLength() ) ); int halfBufferCapacity = buffer.capacity() / 2; diff --git a/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/AbstractJschWagon.java b/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/AbstractJschWagon.java index c645eda..2cffbba 100644 --- a/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/AbstractJschWagon.java +++ b/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/AbstractJschWagon.java @@ -24,7 +24,9 @@ import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; +import java.io.InputStream; import java.io.InputStreamReader; +import java.io.OutputStream; import java.util.List; import java.util.Properties; @@ -479,4 +481,35 @@ public abstract class AbstractJschWagon { this.strictHostKeyChecking = strictHostKeyChecking; } + +/** {@inheritDoc} */ +// This method will be removed as soon as JSch issue #122 is resolved +@Override +protected void transfer( Resource resource, InputStream input, OutputStream output, int requestType, long maxSize ) +throws IOException +{ +byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; + +TransferEvent transferEvent = new TransferEvent( this, resource, TransferEvent.TRANSFER_PROGRESS, requestType ); +transferEvent.setTimestamp( System.currentTimeMillis() ); + +long remaining = maxSize; +while ( remaining > 0L ) +{ +// let's safely cast to int because the min value will be lower than the buffer size. +int n = input.read( buffer, 0, (int) Math.min( buffer.length, remaining ) ); + +if ( n == -1 ) +{ +break; +} + +fireTransferProgress( transferEvent, buffer, n ); + +output.write( buffer, 0, n ); + +remaining -= n; +} +output.flush(); +} }
[maven-wagon] branch WAGON-544 created (now 14eabd6)
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a change to branch WAGON-544 in repository https://gitbox.apache.org/repos/asf/maven-wagon.git. at 14eabd6 [WAGON-544] Work around JSch issue #122 This branch includes the following new commits: new 14eabd6 [WAGON-544] Work around JSch issue #122 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
svn commit: r1850209 - in /maven/website/components: plugins-archives/maven-assembly-plugin-3.1.1/ plugins/maven-assembly-plugin/
Author: eolivelli Date: Wed Jan 2 21:09:27 2019 New Revision: 1850209 Log: Publish maven-assembly-plugin 3.1.1 documentation Added: maven/website/components/plugins-archives/maven-assembly-plugin-3.1.1/ - copied from r1850208, maven/website/components/plugins-archives/maven-assembly-plugin-LATEST/ maven/website/components/plugins/maven-assembly-plugin/ - copied from r1850208, maven/website/components/plugins-archives/maven-assembly-plugin-LATEST/
svn commit: r31742 - /release/maven/plugins/
Author: tibordigana Date: Wed Jan 2 20:37:15 2019 New Revision: 31742 Log: Release Maven Assembly 3.1.1. Added: release/maven/plugins/maven-assembly-plugin-3.1.1-source-release.zip (with props) release/maven/plugins/maven-assembly-plugin-3.1.1-source-release.zip.asc release/maven/plugins/maven-assembly-plugin-3.1.1-source-release.zip.sha512 Removed: release/maven/plugins/maven-assembly-plugin-3.1.0-source-release.zip release/maven/plugins/maven-assembly-plugin-3.1.0-source-release.zip.asc release/maven/plugins/maven-assembly-plugin-3.1.0-source-release.zip.sha512 Added: release/maven/plugins/maven-assembly-plugin-3.1.1-source-release.zip == Binary file - no diff available. Propchange: release/maven/plugins/maven-assembly-plugin-3.1.1-source-release.zip -- svn:mime-type = application/octet-stream Added: release/maven/plugins/maven-assembly-plugin-3.1.1-source-release.zip.asc == --- release/maven/plugins/maven-assembly-plugin-3.1.1-source-release.zip.asc (added) +++ release/maven/plugins/maven-assembly-plugin-3.1.1-source-release.zip.asc Wed Jan 2 20:37:15 2019 @@ -0,0 +1,10 @@ +-BEGIN PGP SIGNATURE- + +iQEcBAABCgAGBQJcJ0CiAAoJENwIY3ymFdIsybAH/2bhCeKeRIQVLVcYAtKmeKjI +yG3cYu/ffcRlvSXffcx8X/7d82uaOjPHQwZ73PVPGkJMa9RehecwefJVgBe9pKLo +/Fsb3eTSaGIi/DY1YJ5DtjtG4YZRfU0TzQTcF4saumDqXAg2HvnI4blOCRGy3fgQ +MomQIxM8WxmNqFz9BIGZdWfKV2LU9naVvLfsTUe/phE2JNkjHPS/34ioeO8yeUcn +7OYIht3juP08MEorTHZgR1s+FcwTZxWQTBrHeSnBX6+yuLXG7t5okIjGn3e+N0wf +O+H1QdoqMKSt6Q24/cOodfiv6wQDLikQ+O5lvv9oiyvq5+Lw+phyBIOnDGCRCqU= +=A+VZ +-END PGP SIGNATURE- Added: release/maven/plugins/maven-assembly-plugin-3.1.1-source-release.zip.sha512 == --- release/maven/plugins/maven-assembly-plugin-3.1.1-source-release.zip.sha512 (added) +++ release/maven/plugins/maven-assembly-plugin-3.1.1-source-release.zip.sha512 Wed Jan 2 20:37:15 2019 @@ -0,0 +1 @@ +249c65e6d92782ea4440c6a0030bbedb89a9db884286550d9541324a4d667aaaf02778973c5a30ef4dbf566a659c841846fbf8bfc0e1e52fe4bd154ac9f78d1b \ No newline at end of file
[maven-wagon] branch no-channels created (now 679f295)
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a change to branch no-channels in repository https://gitbox.apache.org/repos/asf/maven-wagon.git. at 679f295 Read at most possible bytes into the buffer This branch includes the following new commits: new 466ca22 Revert "[WAGON-537] Maven transfer speed of large artifacts is slow due to unsuitable buffer strategy" new 679f295 Read at most possible bytes into the buffer The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[maven-wagon] 01/02: Revert "[WAGON-537] Maven transfer speed of large artifacts is slow due to unsuitable buffer strategy"
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch no-channels in repository https://gitbox.apache.org/repos/asf/maven-wagon.git commit 466ca22e4faec9aca05727859232ace2075ff741 Author: Michael Osipov <1983-01...@gmx.net> AuthorDate: Wed Jan 2 17:14:30 2019 +0100 Revert "[WAGON-537] Maven transfer speed of large artifacts is slow due to unsuitable buffer strategy" This reverts commit ff45ca83be7a2c07706a3a8dde420c897c58be1c. --- .../java/org/apache/maven/wagon/AbstractWagon.java | 85 +++- .../wagon/shared/http/AbstractHttpClientWagon.java | 92 -- 2 files changed, 45 insertions(+), 132 deletions(-) diff --git a/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java b/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java index 8995559..4cbf37d 100644 --- a/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java +++ b/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java @@ -42,14 +42,8 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.nio.ByteBuffer; -import java.nio.channels.Channels; -import java.nio.channels.ReadableByteChannel; import java.util.List; -import static java.lang.Math.max; -import static java.lang.Math.min; - /** * Implementation of common facilities for Wagon providers. * @@ -58,24 +52,7 @@ import static java.lang.Math.min; public abstract class AbstractWagon implements Wagon { -protected static final int DEFAULT_BUFFER_SIZE = 4 * 1024; -protected static final int MAXIMUM_BUFFER_SIZE = 512 * 1024; - -/** - * To efficiently buffer data, use a multiple of 4 KiB as this is likely to match the hardware - * buffer size of certain storage devices. - */ -protected static final int BUFFER_SEGMENT_SIZE = 4 * 1024; - -/** - * The desired minimum amount of chunks in which a {@link Resource} shall be - * {@link #transfer(Resource, InputStream, OutputStream, int, long) transferred}. - * This corresponds to the minimum times {@link #fireTransferProgress(TransferEvent, byte[], int)} - * is executed. 100 notifications is a conservative value that will lead to small chunks for - * any artifact less that {@link #BUFFER_SEGMENT_SIZE} * {@link #MINIMUM_AMOUNT_OF_TRANSFER_CHUNKS} - * in size. - */ -protected static final int MINIMUM_AMOUNT_OF_TRANSFER_CHUNKS = 100; +protected static final int DEFAULT_BUFFER_SIZE = 1024 * 4; protected Repository repository; @@ -583,71 +560,29 @@ public abstract class AbstractWagon protected void transfer( Resource resource, InputStream input, OutputStream output, int requestType, long maxSize ) throws IOException { - -ByteBuffer buffer = ByteBuffer.allocate( getBufferCapacityForTransfer( resource.getContentLength() ) ); -int halfBufferCapacity = buffer.capacity() / 2; +byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; TransferEvent transferEvent = new TransferEvent( this, resource, TransferEvent.TRANSFER_PROGRESS, requestType ); transferEvent.setTimestamp( System.currentTimeMillis() ); -ReadableByteChannel in = Channels.newChannel( input ); - long remaining = maxSize; -while ( remaining > 0L ) +while ( remaining > 0 ) { -int read = in.read( buffer ); +// let's safely cast to int because the min value will be lower than the buffer size. +int n = input.read( buffer, 0, (int) Math.min( buffer.length, remaining ) ); -if ( read == -1 ) +if ( n == -1 ) { -// EOF, but some data has not been written yet. -if ( buffer.position() != 0 ) -{ -buffer.flip(); -fireTransferProgress( transferEvent, buffer.array(), buffer.limit() ); -output.write( buffer.array(), 0, buffer.limit() ); -} - break; } -// Prevent minichunking / fragmentation: when less than half the buffer is utilized, -// read some more bytes before writing and firing progress. -if ( buffer.position() < halfBufferCapacity ) -{ -continue; -} +fireTransferProgress( transferEvent, buffer, n ); -buffer.flip(); -fireTransferProgress( transferEvent, buffer.array(), buffer.limit() ); -output.write( buffer.array(), 0, buffer.limit() ); -remaining -= buffer.limit(); -buffer.clear(); -} -output.flush(); -} +output.write( buffer, 0, n ); -/** - * Provides a buffer size for efficiently transferring the given amount of bytes such that - * it
[maven-wagon] 02/02: Read at most possible bytes into the buffer
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch no-channels in repository https://gitbox.apache.org/repos/asf/maven-wagon.git commit 679f2958c26f460a44932d4de5a196373ba5e225 Author: Michael Osipov AuthorDate: Wed Jan 2 17:50:32 2019 +0100 Read at most possible bytes into the buffer --- .../src/main/java/org/apache/maven/wagon/AbstractWagon.java| 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java b/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java index 4cbf37d..7689c86 100644 --- a/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java +++ b/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java @@ -568,8 +568,7 @@ public abstract class AbstractWagon long remaining = maxSize; while ( remaining > 0 ) { -// let's safely cast to int because the min value will be lower than the buffer size. -int n = input.read( buffer, 0, (int) Math.min( buffer.length, remaining ) ); +int n = input.read( buffer, 0, buffer.length ); if ( n == -1 ) {
[maven-jar-plugin] 01/01: [MJAR-238] Allow setting of module main class
This is an automated email from the ASF dual-hosted git repository. eolivelli pushed a commit to branch MJAR-238 in repository https://gitbox.apache.org/repos/asf/maven-jar-plugin.git commit 29019f67f03702d835c8ab65e536d2e93710b079 Author: Plamen Totev AuthorDate: Sun Sep 30 19:29:13 2018 +0300 [MJAR-238] Allow setting of module main class --- pom.xml| 6 ++ .../invoker.properties | 18 ++ src/it/MJAR-238-modular-jar-main-class/pom.xml | 57 .../src/main/java/module-info.java | 22 +++ .../src/main/java/myproject/HelloWorld.java| 36 +++ src/it/MJAR-238-modular-jar-main-class/verify.bsh | 75 ++ .../apache/maven/plugins/jar/AbstractJarMojo.java | 44 - src/site/apt/usage.apt.vm | 19 ++ 8 files changed, 274 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index fc23b17..461636f 100644 --- a/pom.xml +++ b/pom.xml @@ -76,6 +76,7 @@ 3.3.0 +3.0.0 3.0 7 @@ -97,6 +98,11 @@ ${mavenVersion} + org.apache.maven.shared + file-management + ${mavenFileManagementVersion} + + org.apache.maven maven-archiver ${mavenArchiverVersion} diff --git a/src/it/MJAR-238-modular-jar-main-class/invoker.properties b/src/it/MJAR-238-modular-jar-main-class/invoker.properties new file mode 100644 index 000..9511718 --- /dev/null +++ b/src/it/MJAR-238-modular-jar-main-class/invoker.properties @@ -0,0 +1,18 @@ +# 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. + +invoker.java.version = 9+ diff --git a/src/it/MJAR-238-modular-jar-main-class/pom.xml b/src/it/MJAR-238-modular-jar-main-class/pom.xml new file mode 100644 index 000..ebb31f6 --- /dev/null +++ b/src/it/MJAR-238-modular-jar-main-class/pom.xml @@ -0,0 +1,57 @@ + + +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> + 4.0.0 + org.apache.maven.plugins + mjar-238-modular-jar-main-class + mjar-238-modular-jar-main-class + Verifies that the modular descriptor main class is set for modular Jar files + jar + 1.0-SNAPSHOT + + + + +org.apache.maven.plugins +maven-jar-plugin +@project.version@ + + + + myproject.HelloWorld + + + + + + + + + + maven-compiler-plugin + +1.9 +1.9 + + + + + + diff --git a/src/it/MJAR-238-modular-jar-main-class/src/main/java/module-info.java b/src/it/MJAR-238-modular-jar-main-class/src/main/java/module-info.java new file mode 100644 index 000..fa45034 --- /dev/null +++ b/src/it/MJAR-238-modular-jar-main-class/src/main/java/module-info.java @@ -0,0 +1,22 @@ +/* + * 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. + */ + +module myproject { +exports myproject; +} diff --git a/src/it/MJAR-238-modular-jar-main-class/src/main/java/myproject/HelloWorld.java b/src/it/MJAR-238-modular-jar-main-class/src/main/java/myproject/HelloWorld.java new file mode 100644 index 000..fd0ad83 --- /dev/null +++ b/src/it/MJAR-238-modular-jar-main-class/src/main/java/myproject/HelloWorld.java @@ -0,0 +1,36 @@ +package
[maven-jar-plugin] branch MJAR-238 created (now 29019f6)
This is an automated email from the ASF dual-hosted git repository. eolivelli pushed a change to branch MJAR-238 in repository https://gitbox.apache.org/repos/asf/maven-jar-plugin.git. at 29019f6 [MJAR-238] Allow setting of module main class This branch includes the following new commits: new 29019f6 [MJAR-238] Allow setting of module main class The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[maven-enforcer] 01/01: [MENFORCER-324] - Use System.lineSeparator() instead of '\n'
This is an automated email from the ASF dual-hosted git repository. eolivelli pushed a commit to branch MENFORCER-324 in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git commit a2792ab04ee4650a66798fbf79deff45f11c63ad Author: Josh Soref AuthorDate: Mon Dec 10 23:46:18 2018 -0500 [MENFORCER-324] - Use System.lineSeparator() instead of '\n' --- .../maven/plugins/enforcer/AbstractBanDependencies.java | 4 ++-- .../apache/maven/plugins/enforcer/AbstractRequireFiles.java | 6 +++--- .../java/org/apache/maven/plugins/enforcer/AlwaysFail.java| 2 +- .../java/org/apache/maven/plugins/enforcer/AlwaysPass.java| 2 +- .../plugins/enforcer/BanDuplicatePomDependencyVersions.java | 4 ++-- .../maven/plugins/enforcer/BanTransitiveDependencies.java | 4 ++-- .../java/org/apache/maven/plugins/enforcer/BannedPlugins.java | 2 +- .../org/apache/maven/plugins/enforcer/BannedRepositories.java | 6 +++--- .../apache/maven/plugins/enforcer/DependencyConvergence.java | 9 + .../apache/maven/plugins/enforcer/RequireActiveProfile.java | 4 ++-- .../apache/maven/plugins/enforcer/RequireFilesDontExist.java | 2 +- .../org/apache/maven/plugins/enforcer/RequireFilesExist.java | 2 +- .../apache/maven/plugins/enforcer/RequireNoRepositories.java | 2 +- .../apache/maven/plugins/enforcer/RequirePluginVersions.java | 4 ++-- .../apache/maven/plugins/enforcer/RequireReleaseVersion.java | 2 +- .../apache/maven/plugins/enforcer/RequireSameVersions.java| 7 --- .../apache/maven/plugins/enforcer/RequireSnapshotVersion.java | 2 +- .../apache/maven/plugins/enforcer/RequireUpperBoundDeps.java | 8 .../java/org/apache/maven/plugins/enforcer/EnforceMojo.java | 11 +++ 19 files changed, 44 insertions(+), 39 deletions(-) diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java index 5d3acb1..5bdbaf0 100644 --- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java +++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java @@ -95,7 +95,7 @@ public abstract class AbstractBanDependencies StringBuilder buf = new StringBuilder(); if ( message != null ) { -buf.append( message + "\n" ); +buf.append( message + System.lineSeparator() ); } for ( Artifact artifact : foundExcludes ) { @@ -110,7 +110,7 @@ public abstract class AbstractBanDependencies protected CharSequence getErrorMessage( Artifact artifact ) { -return "Found Banned Dependency: " + artifact.getId() + "\n"; +return "Found Banned Dependency: " + artifact.getId() + System.lineSeparator(); } protected Set getDependenciesToCheck( MavenProject project ) diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractRequireFiles.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractRequireFiles.java index 893917d..90379bd 100644 --- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractRequireFiles.java +++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractRequireFiles.java @@ -90,7 +90,7 @@ public abstract class AbstractRequireFiles StringBuilder buf = new StringBuilder(); if ( message != null ) { -buf.append( message + "\n" ); +buf.append( message + System.lineSeparator() ); } buf.append( getErrorMsg() ); @@ -98,11 +98,11 @@ public abstract class AbstractRequireFiles { if ( file != null ) { -buf.append( file.getAbsolutePath() + "\n" ); +buf.append( file.getAbsolutePath() + System.lineSeparator() ); } else { -buf.append( "(an empty filename was given and allowNulls is false)\n" ); +buf.append( "(an empty filename was given and allowNulls is false)" + System.lineSeparator() ); } } diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysFail.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysFail.java index 9488eb1..9b0045f 100644 --- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysFail.java +++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysFail.java @@ -40,7 +40,7 @@ public class AlwaysFail StringBuffer buf = new StringBuffer(); if ( message != null ) { -buf.append( message ).append( '\n' ); +buf.append( message ).append( System.lineSeparator() ); }
[maven-enforcer] branch MENFORCER-324 updated (53a8e16 -> a2792ab)
This is an automated email from the ASF dual-hosted git repository. eolivelli pushed a change to branch MENFORCER-324 in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git. discard 53a8e16 [MENFORCER-324] - use System.lineSeparator() instead of '\n' add 9106689 [MENFORCER-322] requireProfileIdsExist triggers if profile is defined at parent o Fixed iterating over parent poms. Added IT. add 5ac7679 [MENFORCER-323] - Improve output of "Some plugins are missing valid versions" error new a2792ab [MENFORCER-324] - Use System.lineSeparator() instead of '\n' This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (53a8e16) \ N -- N -- N refs/heads/MENFORCER-324 (a2792ab) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../plugins/enforcer/RequirePluginVersions.java| 7 ++-- .../plugins/enforcer/RequireProfileIdsExist.java | 27 - .../require-plugin-versions-ci/verify.groovy | 2 +- .../MENFORCER-322-module}/pom.xml | 15 +--- .../invoker.properties | 45 +- .../pom.xml| 9 +++-- .../verify.groovy | 4 +- 7 files changed, 69 insertions(+), 40 deletions(-) copy maven-enforcer-plugin/src/it/projects/{require-profile-ids-exist_failure => require-profile-id-exist_defined_in_parent/MENFORCER-322-module}/pom.xml (83%) copy maven-enforcer-plugin/src/it/projects/{always-fail => require-profile-id-exist_defined_in_parent}/invoker.properties (74%) copy maven-enforcer-plugin/src/it/projects/{require-profile-ids-exist_failure => require-profile-id-exist_defined_in_parent}/pom.xml (89%) copy maven-enforcer-plugin/src/it/projects/{require-profile-ids-exist_failure => require-profile-id-exist_defined_in_parent}/verify.groovy (82%)
[maven-scm] branch SCM-777 created (now c212d86)
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a change to branch SCM-777 in repository https://gitbox.apache.org/repos/asf/maven-scm.git. at c212d86 [SCM-777] scm:validate ignores scmCheckWorkingDirectoryUrl configuration in favor of system property This branch includes the following new commits: new c212d86 [SCM-777] scm:validate ignores scmCheckWorkingDirectoryUrl configuration in favor of system property The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[maven-scm] 01/01: [SCM-777] scm:validate ignores scmCheckWorkingDirectoryUrl configuration in favor of system property
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch SCM-777 in repository https://gitbox.apache.org/repos/asf/maven-scm.git commit c212d867cd9af265f99c1f7391d4cd5e5a27f96c Author: Michael Osipov AuthorDate: Wed Jan 2 11:55:19 2019 +0100 [SCM-777] scm:validate ignores scmCheckWorkingDirectoryUrl configuration in favor of system property --- .../src/main/java/org/apache/maven/scm/plugin/ValidateMojo.java | 6 ++ .../org/apache/maven/scm/provider/svn/AbstractSvnScmProvider.java | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ValidateMojo.java b/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ValidateMojo.java index ae6989c..c894d76 100644 --- a/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ValidateMojo.java +++ b/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ValidateMojo.java @@ -56,12 +56,10 @@ public class ValidateMojo private String scmDeveloperConnection; /** - * (Subversion specific) Enables checking that "URL" field returned by svn info matches what is specified - * under the scm tag. + * (Subversion specific) Enables checking that "URL" field returned by 'svn info' matches what is + * specified under the scm tag. */ @Parameter( property = "scmCheckWorkingDirectoryUrl", defaultValue = "false" ) -// Actually unused in the code here. Present for doc purpose, -// see org.apache.maven.scm.provider.svn.AbstractSvnScmProvider.CHECK_WORKING_DIRECTORY_URL private boolean scmCheckWorkingDirectoryUrl; /** diff --git a/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/main/java/org/apache/maven/scm/provider/svn/AbstractSvnScmProvider.java b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/main/java/org/apache/maven/scm/provider/svn/AbstractSvnScmProvider.java index 013afad..c65495b 100644 --- a/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/main/java/org/apache/maven/scm/provider/svn/AbstractSvnScmProvider.java +++ b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/main/java/org/apache/maven/scm/provider/svn/AbstractSvnScmProvider.java @@ -72,8 +72,6 @@ public abstract class AbstractSvnScmProvider private ScmProviderRepository repository; } -private static final String CHECK_WORKING_DIRECTORY_URL = "scmCheckWorkingDirectoryUrl"; - // -- // ScmProvider Implementation // -- @@ -127,7 +125,7 @@ public abstract class AbstractSvnScmProvider private boolean checkWorkingDirectoryUrl() { -return Boolean.getBoolean( CHECK_WORKING_DIRECTORY_URL ); +return StringUtils.isNotEmpty( System.getProperty( "scmCheckWorkingDirectoryUrl.currentWorkingDirectory" ) ); } private String findUrlInfoItem( InfoScmResult infoScmResult )