How do you copy your scripts during war packaging? The proper/supported way to get custom web resources deployed in wtp is to define these web resources in the maven-war-plugin configuration : http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html
See http://wiki.eclipse.org/M2E-WTP_FAQ#What_is_this_web_resources_folder.3F to understand how m2e-wtp deals with maven-war-plugin's web resources. So, if your not using maven-war-plugin webResources, then the plugin responsible for the copying the files needs to copy them to target/m2e-wtp/web-resources/ Be aware that, that kind of plugin is generally not supported OOTB by m2e, you'll most likely need to setup a lifecycle mapping execution : http://wiki.eclipse.org/M2E_plugin_execution_not_covered#execute_plugin_goal There are 3 ways to activate profiles in m2e : - make the profile auto activated, via their <activation> definition - set the activated profile in the project properties : right-click on project > properties > maven > active maven profiles (this will override any automatically enabled profiles) - using the profile management UI from JBoss Tools (See https://community.jboss.org/en/tools/blog/2011/09/19/adding-some-grease-to-jboss-tools-33-m3 and http://docs.jboss.org/tools/whatsnew/maven/maven-news-3.3.0.M3.html#itemname1 ) HIH Fred Bricon On Sat, Jun 16, 2012 at 9:18 AM, [email protected] <[email protected]>wrote: > Hi Fred, > > Thanks for your response. I've been working on another project and haven't > had a chance to look into this until now. > > OK, I'm able to get my maven webapp module to run on server, sort of, > using m2e-wtp, without moving the WEB-INF/conf directory back. > > However, we have a folder under javascripts in webapp called jquery, where > we store customized jquery javascript codes. In our pom.xml file, we have a > development profile to copy javascripts/jquery to javascripts/jquery-dev > during war packaging. m2e-wftp failed to also copy and rename directory, > only javascript/jquery folder got copied, so none of the jquery javascript > functionalities is working. > > How does m2e-wtp handle profiles or how should I set up in my pom.xml for > it to profiles? You mentioned it reads the pom.xml, and configure the > project, can you point me to some documentations on this. I'd like to > understand how m2e-wtp deploys the web application. > Thanks very much! > > David > >> Date: Mon, 7 May 2012 10:24:54 +0200 >> From: Fred Bricon <[email protected]> >> To: Maven Integration for Eclipse users mailing list >> <[email protected]> >> Subject: Re: [m2e-users] running webapp on eclipse using tomcat >> Message-ID: >> < >> cag2ouxrqa3zmgx7g0yqpt10an0i6i4jv4vmq1dpgczombby...@mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> David, >> >> m2e-wtp reads your pom.xml to configure the project to be deployed via Run >> As > Run on Server, it makes no assumptions about the original webapp >> directory setup. >> When moving your resources from src/main/webapp/WEB-INF/conf back to >> src/main/resource/, they will end up behing deployed to WEB-INF/classes >> instead of WEB-INF/conf. So if a CLI-built war works fine but fails when >> deployed via WTP, I'm interested in seeing your pom.xml. >> Could you make a sample project that reproduce this error and open a >> ticket >> at https://issues.sonatype.org/browse/MECLIPSEWTP ? >> >> Regards, >> >> Fred Bricon >> > > _______________________________________________ > m2e-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/m2e-users > > -- "Have you tried turning it off and on again" - The IT Crowd
_______________________________________________ m2e-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/m2e-users
