[ 
https://issues.apache.org/jira/browse/MRRESOURCES-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16694269#comment-16694269
 ] 

ASF GitHub Bot commented on MRRESOURCES-102:
--------------------------------------------

judby commented on a change in pull request #2: Implement MRRESOURCES-102
URL: 
https://github.com/apache/maven-remote-resources-plugin/pull/2#discussion_r235259046
 
 

 ##########
 File path: 
src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
 ##########
 @@ -1336,6 +1341,41 @@ else if ( appendedVmResourceFile.exists() )
         }
     }
 
+    private void copyBundleResource( ClassLoader classLoader, String 
bundleResource, File to )
+        throws IOException
+    {
+        URL resUrl = classLoader.getResource( bundleResource );
+        if ( resUrl != null )
+        {
+            FileUtils.copyURLToFile( resUrl, to );
+        }
+    }
+
+    private void filterBundleResource( ClassLoader classLoader, String 
bundleResource, File to )
+        throws IOException, MojoExecutionException
+    {
+        File tmpFile = null;
+        try
+        {
+            tmpFile = File.createTempFile( "maven-remote-resources-plugin", 
null );
+            tmpFile.deleteOnExit();
 
 Review comment:
   Consider moving `deleteOnExit()` to the finally block, where the file will 
either be deleted at once, or a warning will be written.
   `deleteOnExit()` adds the `Path` to a list of files to delete on exit and 
does not scale well if there are many files.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Filtering of non-.vm files
> --------------------------
>
>                 Key: MRRESOURCES-102
>                 URL: https://issues.apache.org/jira/browse/MRRESOURCES-102
>             Project: Maven Remote Resources Plugin
>          Issue Type: New Feature
>    Affects Versions: 1.5
>            Reporter: Falko Modler
>            Priority: Major
>
> It would be a very welcomed addition if the plugin would also filter 
> non-verlocity (.vm) files.
> See also: MRRESOURCES-83
> Renaming the files in question to *.vm is not an option for me because:
> - MRRESOURCES-94
> - the module _providing_ the file(s) also needs them _without_ .vm suffix 
> (fixing this would require some other plugin)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to