Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] Best practices for includes resources outside of project base directory

I have a Maven war project which includes the following for including some resources

<webResources>
<!-- Include SQL for dbmaintain -->
<webResource>
<directory>../../sql</directory>
<targetPath>WEB-INF/sql</targetPath>
<includes>
<include>**/*.sql</include>
</includes>
</webResource>
<!-- Include compiled reports -->
<webResource>
<directory>../../reports</directory>
<targetPath>WEB-INF/reports</targetPath>
<includes>
<include>**/*.jasper</include>
<!-- Include XSLT for reports -->
<include>**/*.xslt</include>
</includes>
</webResource>
</webResources>

This has always worked fine in Maven (2 & 3) as well as the old m2eclipse.  The new m2e complains with "Access "/home/collin/Code/intouch.git/java/intouch-webapp/../../reports" directory outside of project base directory"

I know Maven is convention over configuration but this is just forcing convention.  To me, putting all my Jasper reports and application SQL inside <root>/java/webapp/src/main/reports instead of <root>/reports is just silly.

What are the best practices for dealing with resources that should be included in a WAR, but just don't make sense to include inside the actual Java webapp project

Regards,
Collin

Back to the top