You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/02/14 15:53:01 UTC
[camel] branch master updated: Camel-resources-plugin: Fixed CS
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 84f8601 Camel-resources-plugin: Fixed CS
84f8601 is described below
commit 84f8601c07126c90d2e949bd6d4a06ee070bb040
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Feb 14 16:52:24 2020 +0100
Camel-resources-plugin: Fixed CS
---
.../camel/maven/resources/CopyResources.java | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/tooling/maven/camel-resources-plugin/src/main/java/org/apache/camel/maven/resources/CopyResources.java b/tooling/maven/camel-resources-plugin/src/main/java/org/apache/camel/maven/resources/CopyResources.java
index 9c2b347..249e170 100644
--- a/tooling/maven/camel-resources-plugin/src/main/java/org/apache/camel/maven/resources/CopyResources.java
+++ b/tooling/maven/camel-resources-plugin/src/main/java/org/apache/camel/maven/resources/CopyResources.java
@@ -40,28 +40,31 @@ import org.apache.maven.project.MavenProject;
import org.apache.maven.shared.filtering.MavenFilteringException;
import org.apache.maven.shared.filtering.MavenReaderFilter;
-@Mojo( name = "copy-resources", threadSafe = true )
+@Mojo(name = "copy-resources", threadSafe = true)
public class CopyResources extends AbstractMojo {
+ public static final List<String> NON_FILTERED_EXTENSIONS =
+ Collections.unmodifiableList(Arrays.asList("jpg", "jpeg", "gif", "bmp", "png"));
+
+ @Parameter(property = "project", required = true, readonly = true)
+ protected MavenProject project;
+
@Parameter
private String encoding = "UTF-8";
/**
* The output directory into which to copy the resources.
*/
- @Parameter( required = true )
+ @Parameter(required = true)
private File outputDirectory;
/**
* The list of resources we want to transfer. See the Maven Model for a
* description of how to code the resources element.
*/
- @Parameter( required = true )
+ @Parameter(required = true)
private List<Resource> resources;
- @Parameter(property = "project", required = true, readonly = true)
- protected MavenProject project;
-
@Component
private MavenSession session;
@@ -100,16 +103,13 @@ public class CopyResources extends AbstractMojo {
} else {
FileUtil.updateFile(file, output.resolve(dir.relativize(file)));
}
- };
+ }
}
- } catch (IOException| MavenFilteringException e) {
+ } catch (IOException | MavenFilteringException e) {
throw new MojoFailureException("Unable to copy resources", e);
}
}
- public static final List<String> NON_FILTERED_EXTENSIONS =
- Collections.unmodifiableList(Arrays.asList("jpg", "jpeg", "gif", "bmp", "png" ));
-
protected boolean isFiltering(Resource resource, Path file) {
if (resource.isFiltering()) {
String ext = Strings.after(file.getFileName().toString(), ".");