Hello. I've created test app and attached lifecycle-mapping there: https://github.com/ivelichko/m2e-filtering-test-app I'm able to reproduce the issue on fresh install eclipse-j2ee-kepler without additional plugins.
Steps to reproduce: 1. import maven project 2. Project -> Clean 3. Run M2eFilteringAppTest.java as JUnit test, it shoud pass 4. Change something in M2eFilteringAppTest.java, for example, add space character 5. Run M2eFilteringAppTest.java as JUnit test, it fails 6. Project -> Clean solves the issue Thanks 30.05.2014, 15:24, "Igor Fedorenko" <[email protected]>: > build-helper:reserve-network-port does not write any resources and it > should be safe to map it to <execute/>. I will need a small standalone > example project and exact steps to reproduce the problem before I can > suggest anything specific. > > Generally, though, I always manage test port allocation from the test > code itself. Splitting test logic between build and java never made much > sense to me. > > -- > Regards, > Igor > > On 2014-05-30, 6:27, Oramah Maalhur wrote: >> Sorry, it was my fault. >> I've completely forgotten , that application uses the goal reserve-ports of >> build-helper-maven-plugin to create that variables and I force this goal to >> "execute" in Lifecycle Mappings. >> Anyway, is there any chance to see reserve-ports working in m2e ? >> Thanks. >> >> 30.05.2014, 02:57, "Igor Fedorenko" <[email protected]>: >>> This is not expected, but I'll need a small example project to be able to >>> help troubleshoot the problem. >>> >>> On May 29, 2014 6:31:09 PM EDT, OramahMaalhur <[email protected]> >>> wrote: >>>> Hello. >>>> I'm using Eclipse Kepler Service Release 2 (Build id: 20140224-0627) >>>> with m2e 1.4.1.20140328-1. I have maven project with configured test >>>> resources filtering and there are several properties files in >>>> src/test/resources with ${..} variables. The issue is, when I run JUnit >>>> >>>> Tests in Eclipse, resources are not filtered and variables in test >>>> properties are not substituted with values. >>>> As far as I understand m2e performs resource filtering when resource is >>>> >>>> changed, but some other builder (Java builder I guess) simply copies >>>> resource with raw ${..} to target/test-classes/ every time autobuild is >>>> >>>> triggered. After I perform "Clean" manually, everything is ok but it's >>>> not so convenient to do "clean" every time before running junit. >>>> I have tried different order of builder and played with excluding that >>>> properties from java build path without any luck. I've also tried to >>>> set >>>> up custom builder calling "mvn resources:testResources", but this leads >>>> >>>> to some kind of race when resource in target/test-classes is >>>> periodically updated by different builders. >>>> What is the way to solve this issue? >>>> >>>> Thanks in assistance. >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> m2e-users mailing list >>>> [email protected] >>>> https://dev.eclipse.org/mailman/listinfo/m2e-users >>> -- >>> Sent from my Android device with K-9 Mail. Please excuse my brevity. _______________________________________________ m2e-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/m2e-users
