Skip to content

Commit

Permalink
future proof method that is marked for incompatible change (#6)
Browse files Browse the repository at this point in the history
* future proof method that is marked for incompatible change
* remove compile time dependency on plexus-utils
* declare aether
* declare sisu
* remove Latin
* add assert
  • Loading branch information
elharo committed Jul 27, 2020
1 parent b974fb2 commit 6624e45
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 16 deletions.
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

0 comments on commit 6624e45

Please sign in to comment.