Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] webresource filtering with wtp

Derek,

The filtering work is complete on master, that is 0.12.x. I plan to merge 0.13 back to trunk once I complete the remaining tasks I have on 0.12. Should take a few days.

Even if git makes it easier, the current differences between the 2 branches won't make the merge trivial.
I can at least make sure 0.13.x works with the latest m2e-core 0.13.x tomorrow. Web filtering won't be as solid, but you should see something interesting :-)

regards,

Fred Bricon



2011/4/12 Derek Lewis <derek@xxxxxxxxxx>
I see there's been some commits related to filtering, and I'd be quite interested to see if they fix the issues I was having.  There's no new build in the URL I have for the nightlies though. https://repository.sonatype.org/content/sites/forge-sites/m2eclipse-wtp/0.13.0/N/
I tried building it from git, but it's looking for m2e 0.14, which has gone back to 0.13 now, as I understand it?  Would it be possible to get a new nightly build that I could test out?


On 24 March 2011 16:03, Derek Lewis <derek@xxxxxxxxxx> wrote:
Hi Fred,

One other thing I just noticed is that once filtering is working, the
resources don't seem to get redeployed into the wtpwebapps directory
when they're changed.  It looks like this is because they aren't being
re-copied to target/m2eclipse-wtp/webresources when they're edited in
Eclipse.  Is there just some configuration of the wtp configurator
that's needed to make this happen?

Cheers,
Derek Lewis

On 24 March 2011 15:53, Derek Lewis <derek@xxxxxxxxxx> wrote:
> Thanks Fred.  I had previously deleted all the projects from eclipse,
> deleted .project, .classpath, and .settings, and re-imported them, and
> they still weren't working.  When I did "update project
> configuration", it started working.  I looked into it a bit further,
> and it looks like the project isn't being configured correctly when
> it's imported, but is being configured properly when explicitly told
> to update the configuration.
> The .settings/org.eclipse.wst.common.component after a fresh import:
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
>    <wb-module deploy-name="war-with-filtered-resources">
>        <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
>        <property name="context-root" value="war-with-filtered-resources"/>
>        <property name="java-output-path"
> value="/war-with-filtered-resources/target/classes"/>
>    </wb-module>
> </project-modules>
>
> And after "update project configuration":
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
>    <wb-module deploy-name="war-with-filtered-resources">
>        <wb-resource deploy-path="/"
> source-path="/target/m2eclipse-wtp/webresources"/>
>        <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
>        <property name="context-root" value="war-with-filtered-resources"/>
>        <property name="java-output-path"
> value="/war-with-filtered-resources/target/classes"/>
>    </wb-module>
> </project-modules>
>
> It doesn't seem to matter if "target/m2eclipse-wtp/webresources"
> exists or not at the time of import, it doesn't show up as a
> wb-resource until I "update project configuration".  I've attached the
> small sample project I tested this with.
>
> On 24 March 2011 15:12, Fred Bricon <fbricon@xxxxxxxxx> wrote:
>> If you just added this config to the war plugin, you need to make sure the
>> maven configuration is updated (right click on project > maven > update
>> project configuration)
>>
>> You should see a couple things happening :
>> * the Web Resources node in the project explorer should contain a new child
>> : webresources, containing all the filtered resources :
>> http://img848.imageshack.us/f/resourcefiltering.jpg/
>> * if you open the web project/.settings/ you should see the webresources
>> folder is deployed before src/main/webapp :
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project-modules id="moduleCoreId" project-version="1.5.0">
>>     <wb-module deploy-name="webapp">
>>         <wb-resource deploy-path="/WEB-INF/classes"
>> source-path="/src/main/java"/>
>>         <wb-resource deploy-path="/"
>> source-path="/target/m2eclipse-wtp/webresources"/>
>>         <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
>>         <property name="context-root" value="webapp"/>
>>         <property name="java-output-path" value="/webapp/target/classes"/>
>>     </wb-module>
>> </project-modules>
>>
>> Filtering is triggered on workspace modifications.
>> You can try to clean the project or make a modification to one of the files
>> to be filtered and see if the filtered folder is updated.
>>
>> If you can't make it work, please attach a sample project and steps to
>> reproduce the issue to https://issues.sonatype.org/browse/MECLIPSEWTP-22
>>
>> regards,
>>
>> Fred Bricon
>>
>> 2011/3/24 Derek Lewis <derek@xxxxxxxxxx>
>>>
>>> Is this the right place to be posting about the m2eclipse-wtp plugin?
>>>
>>> I notice there was a post back on Jan 26th about a fix for webresource
>>> filtering with m2eclipse-wtp:
>>> http://dev.eclipse.org/mhonarc/lists/m2e-dev/msg00204.html  Has this
>>> been pushed out to the 0.13.x branch?  I'm trying to get that working
>>> with the latest m2e nightly and a m2e-wtp 0.13.x build from yesterday,
>>> but while it's working with maven on the command line, in Eclipse with
>>> wtp it's not filtering the webresource files.  Is there additional
>>> configuration required in the pom to get the m2e-wtp plugin to do the
>>> filtering?
>>>
>>> My pom.xml has the following:
>>>         <plugin>
>>>            <groupId>org.apache.maven.plugins</groupId>
>>>            <artifactId>maven-war-plugin</artifactId>
>>>            <configuration>
>>>              <webResources>
>>>                <resource>
>>>                  <filtering>true</filtering>
>>>                  <directory>src/main/webapp</directory>
>>>                </resource>
>>>              </webResources>
>>>            </configuration>
>>>          </plugin>
>>> Which is copying src/main/webapp/META-INF/context.xml.
>>> _______________________________________________
>>> 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
>>
>




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

Back to the top