Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] M2E-WTP and Processed Web Resources

Yes that is correct. Any folder defined as a <webResource> will be copied over to target/m2e-wtp/web-resources thus deployed automatically by WTP.

You can take a look at how wro4j-maven-plugin (http://code.google.com/p/wro4j/) and m2e-wro4j (https://github.com/jbosstools/m2e-wro4j) deal with a similar problem : 
Basically, if the maven wro4j plugin generates the files to ${project.build.directory}/${project.build.finalName}/ then m2e-wro4j will generate them to ${project.build.directory}/m2e-wtp/web-resources/ instead (if that folder exists). This is explained in https://community.jboss.org/en/tools/blog/2012/01/17/css-and-js-minification-using-eclipse-maven-and-wro4j

HIH

Fred Bricon

On Wed, Apr 18, 2012 at 10:22 PM, Ian Brandt <ian@xxxxxxxxxxxxx> wrote:

Greetings,

I'm looking to patch the YUI Compressor Maven Plugin to be m2e 1.1 compatible per http://wiki.eclipse.org/M2E_compatible_maven_plugins.  I also want the output to be hot-deployed by m2e-wtp when inside Eclipse, and be included by the Maven WAR Plugin as well.

My rough thinking is to output to ${project.build.directory}/processed-resources or so, and instruct users to add that as a webResources directory for the Maven WAR Plugin.  If I'm correctly reading https://github.com/sonatype/m2eclipse-wtp/wiki/What-is-this-web-resources-folder%3F, my understanding is that m2e-wtp will add the WAR plugin's webResources to .settings/org.eclipse.wst.common.component automatically upon project configuration.  Then so long as I buildContext.refresh('${project.build.directory}/processed-resources') after compression the resources will be hot-deployed.

Does that all sound right, and if so is it the best practice for something like this?

Thanks,

Ian
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev



--
"Have you tried turning it off and on again" - The IT Crowd

Back to the top