Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

future proof method that is marked for incompatible change #6

Merged
merged 10 commits into from Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 29 additions & 9 deletions pom.xml
Expand Up @@ -97,19 +97,26 @@ under the License.
<artifactId>maven-model</artifactId>
<version>${mavenVersion}</version>
</dependency>

<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.3.0</version>
<artifactId>plexus-component-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-interpolation</artifactId>
<version>1.26</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
<version>0.0.0.M2a</version>
</dependency>

<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-filtering</artifactId>
Expand All @@ -122,11 +129,11 @@ under the License.
<version>2.6</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-interpolation</artifactId>
<version>1.26</version>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.8.1</version>
<scope>compile</scope>
</dependency>

<dependency>
Expand All @@ -147,6 +154,19 @@ under the License.
<version>4.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-api</artifactId>
<version>0.9.0.M2</version>
<scope>test</scope>
</dependency>

</dependencies>

<profiles>
Expand Down
1 change: 1 addition & 0 deletions src/it/MRESOURCES-257/verify.groovy
Expand Up @@ -20,4 +20,5 @@ assert new File(basedir, 'target/classes/test.txt').exists();

content = new File(basedir, 'target/classes/test.txt').text;
assert content.contains( 'jdoe@example.com' );
assert content.contains( 'orga' );
return true;
Expand Up @@ -27,6 +27,7 @@
import java.util.List;
import java.util.Properties;

import org.apache.commons.lang3.StringUtils;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.model.Resource;
import org.apache.maven.plugin.AbstractMojo;
Expand All @@ -45,8 +46,6 @@
import org.codehaus.plexus.context.Context;
import org.codehaus.plexus.context.ContextException;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.StringUtils;

/**
* Copy resources for the main source code to the main output directory. Always uses the project.build.resources element
Expand Down Expand Up @@ -311,16 +310,16 @@ public void execute()
return;
}

if ( StringUtils.isEmpty( encoding ) && isFilteringEnabled( getResources() ) )
if ( StringUtils.isBlank( encoding ) && isFilteringEnabled( getResources() ) )
{
getLog().warn( "File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING
+ ", i.e. build is platform dependent!" );
getLog().warn( "Please take a look into the FAQ: https://maven.apache.org/general.html#encoding-warning" );
getLog().warn( "File encoding has not been set, using platform encoding "
+ System.getProperty( "file.encoding" )
+ ". Build is platform dependent!" );
getLog().warn( "See https://maven.apache.org/general.html#encoding-warning" );
}

try
{

List<String> combinedFilters = getCombinedFiltersList();

MavenResourcesExecution mavenResourcesExecution =
Expand Down