Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 0.0.11
-
Fix Version/s: 0.9.0
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
At this moment Eclipse or M2Eclipse doesn't have any resource building and filtering like Maven2 does. This means that everything that you configure in the project->build->resources (or test-resources) doesn't get reflected in Eclipse. This creates a great gap between Eclipse and Maven2 IMHO.
For me personally the resource filtering is very important. Here is the reason why: I am working on a EJB3 project. This project has several UnitTests that use the database. Every developer has it's own instance on the database to prevent conflicts when running Unit-Tests (data gets added and deleted by DBUnit). That is why there are profiles that set the database test connection for every developer. The configuration file containing the connection gets read by an external library. I can't influence it, so I can't change the way the file gets read, so I am not able to filter the variables before the configuration is read. I could change the file but that won't work either. The problem is that m2eclipse Plugin configures the Classpath so that the classpath output folder of a resource directory is the same as resource directory itself and not /target/classes or /target/test-classes. I know that there is a good reason for it (explained in MNGECLIPSE-15) but now it causes the problem that when I would rewrite the file I would change the actual source file. That is not anything I really would want.
Before using this Eclipse Plugin I used the standard eclipse command from maven2 to setup my eclipse environment. This configures the classpath resoures output tot the /target/classes or /target/test-classes directory. I then added an extra builder for the project that started the mvn process-resources and process-test-resources when certain files got changed. This workes fine.
Couldn't some solution be implemented that uses the resource configuration of POM to setup the resource directory and does the resource processing like Maven2 does? Or at least and option that the output directories of the resource directories are /target/classes and target/test-classes? This way I could use my own builder solution.
You can still add maven builder for this project. There are several reasons to not add it automatically.