[
http://jira.codehaus.org/browse/MRESOURCES-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=128679#action_128679
]
Jonathan Ramsey commented on MRESOURCES-36:
-------------------------------------------
Until this issue is fixed, here is a workaround I've been using successfully.
Add this plugin element into project/build/plugins in your pom.xml, and change
the dir in the mkdir task.
You can have multiple <mkdir> elements for multiple directories. The mkdir task
does nothing if the directory has already been copied by the resources plugin.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>create-empty-directory</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<mkdir dir="${basedir}/target/classes/empty" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
This originally came from the openejb-standalone pom.xml in the openejb project.
http://svn.apache.org/repos/asf/openejb/trunk/openejb3/assembly/openejb-standalone/pom.xml
> resource copy to target/classes: empty directories are ignored
> --------------------------------------------------------------
>
> Key: MRESOURCES-36
> URL: http://jira.codehaus.org/browse/MRESOURCES-36
> Project: Maven 2.x Resources Plugin
> Issue Type: Improvement
> Affects Versions: 2.2
> Reporter: Martin Vysny
> Fix For: 2.3
>
> Attachments: patchfile
>
>
> Hi,
> I have several directories located in the src/test/resources and I
> need them to be copied to target/test-classes. This is of course handled
> by maven-resources-plugin, however it does not copy empty directories. I
> know it sounds insane to access empty dirs using classloader but I have
> my reasons ;)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira