You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Tim Dysinger <ti...@dysinger.net> on 2006/04/26 19:50:21 UTC

maven-resources-plugin problem

Over at the AndroMDA project we are trying to use the maven  
resources / filtering facility to copy resources to another directory  
besides target/classes.

Since the maven-resources-plugin defaults to target/classes as it's  
output directory and only allows you to select a path within that  
directory, we have resorted to using a path pattern such as ../some/ 
other/directory as a hack to get it to work outside of target/ 
classes.  This works on Windows.

However, on Linux and OS X, the build will break and fail because, in  
the order of things, resources get copy/filtered BEFORE target/ 
classes gets created.  Unix does not like the double dot notation  
used on directories that don't exist.

I see a two simple solutions:

Simplest but sort of a hack ) Patch the maven-resources-plugin to  
CREATE the output directory ( if it is missing ) before the path is  
applied.  In this case, all would function as it has been - no  
changes are needed to the POM XSD and everything works on Windows,  
Linux and Mac.

Not as simple but more flexible ) Patch the maven-resources-plugin to  
allow for an explicit output directory in addition to a path within  
that directory.  This would require a change to the POM XSD which  
would probably slow down the patch.  This would be the most desirable  
in the next major version of the POM though, IMO.

Is there a preference on the approach?  If so I can submit a patch.

There is a bug filed for this problem here but it does not look like  
anything has been done in recent months: http://jira.codehaus.org/ 
browse/MRESOURCES-8

I would be happy to help resolve this as it is keeping me from doing  
regular builds for AndroMDA.

-Tim



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org