Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Changing pom.xml properties in Eclipse

Hi Anton,
yes, you are right however I might not want to specify that property value to pom.xml because that wouldn't work for other people who would like to run my test project in Eclipse (ie other team members). 

---
Rastislav

----- Original Message -----
> From: "Anton Tanasenko" <atg.sleepless@xxxxxxxxx>
> To: "Maven Integration for Eclipse developers mailing list" <m2e-dev@xxxxxxxxxxx>
> Sent: Thursday, March 10, 2016 3:31:23 PM
> Subject: Re: [m2e-dev] Changing pom.xml properties in Eclipse
> 
> Hi Rastislav,
> 
> You should be able to achieve a similar behaviour with m2e profile in your
> pom.xml. It will only be active in m2e.
> 
> <profiles>
>  <profile>
>    <id>m2e</id>
>    <activation>
>      <property>
>        <name>m2e.version</name>
>      </property>
>    </activation>
>    <properties>
>      <yourProperty>your value</yourProperty>
>    </properties>
>  </profile>
> </profiles>
> 
> 2016-03-10 16:03 GMT+02:00 Rastislav Wagner < rawagner@xxxxxxxxxx > :
> 
> 
> Hello everybody,
> 
> I've created a plugin which allows you to change properties in your pom.xml
> within Eclipse IDE. Please take a look at this video which shows how it
> works[1].
> 
> 
> My use-case is following:
> I have a file on which I apply maven resource filtering. After filtering this
> file should contain a path to a runtime which I'm later using when running
> tests.
> When I do this using maven build, maven downloads this runtime and thanks to
> resource filtering path is set accordingly.
> However when Im using Eclipse IDE to build and run my tests I would like to
> do a different filtering - pointing to a runtime which I've downloaded
> previously to some other folder.
> Using my plugin I can set a different value of property defined in my pom.xml
> and keep using resource filtering without changing a single file in my
> project.
> 
> If you think that other m2e users could benefit from this feature I can
> create a gerrit pull request.
> 
> To try this plugin[2] yourself you will also need this branch of m2e[3].
> 
> Let me know what you think.Thanks.
> 
> [1] https://youtu.be/Njk-otnw9a0
> [2] https://github.com/rawagner/m2e-properties
> [3] https://github.com/rawagner/m2e-core/tree/m2e-properties
> 
> 
> ---
> Rastislav Wagner
> JBDS QA
> 
> Red Hat Czech
> Purkynova 111, 612 00 Brno, Czech Republic
> _______________________________________________
> m2e-dev mailing list
> m2e-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/m2e-dev
> 
> 
> 
> --
> Regards,
> Anton.
> 
> _______________________________________________
> m2e-dev mailing list
> m2e-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/m2e-dev


Back to the top