- This topic has 8 replies, 5 voices, and was last updated 15 years, 11 months ago by Riyad Kalla.
-
AuthorPosts
-
windheartwenMemberIs resources filtering support by maven for eclipse?
I try to add
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
in pom.xmlbut still, I can’t get any resources in the default output folder.
Thanks in advance.
Loyal WaterMemberIs resources filtering support by maven for eclipse?
It is not supported by Maven4MyEclipse. Sorry about that.
windheartwenMemberThanks for reply. Any workaround?
allenparslowMemberIf you are missing a resource that needs to be in the output folder (target/classes or target/test-classes) from src/main/resources or src/test/resources, then try following workaround:
1. Right-click you project, choose properties.
2. In the properties dialog, choose ‘Java Build Path’, then goto the ‘Source’ tab.
3. Under src/main/resources, click on ‘Excluded: **’, then press the ‘Remove Button’.This will output the entire contents of src/main/resources without filtering.
windheartwenMemberAs I have enabled profiles in my pom file, I need filtering. Any other alternatives?
windheartwenMemberAnd will later MyEclipse release will support this function?
Thanks.
Riyad KallaMemberwindheartwen,
Maven4MyEclipse provides integration with Maven. When your pom is processed by Maven (either through Maven4MyEclipse or directly from the command line) Maven is parsing that and following any directives you have set forth in the pom.
In MyEclipse, MyEclipse/Eclipse handles building your project and doesn’t look at your pom for instructions on how to do that, ignoring the filtering statements you have (allenparslow’s solution is exactly right). But when you run from the command line or fire off the build manually from inside MyEclipse, the pom directives will all be honored.
Hope that clarifies why you are seeing this behavior.
cherngjeMember@support-rkalla wrote:
windheartwen,
Maven4MyEclipse provides integration with Maven. When your pom is processed by Maven (either through Maven4MyEclipse or directly from the command line) Maven is parsing that and following any directives you have set forth in the pom.
In MyEclipse, MyEclipse/Eclipse handles building your project and doesn’t look at your pom for instructions on how to do that, ignoring the filtering statements you have (allenparslow’s solution is exactly right). But when you run from the command line or fire off the build manually from inside MyEclipse, the pom directives will all be honored.
Hope that clarifies why you are seeing this behavior.
Hi support-rkalla,
This approach leads to several issues with MyEclipse’s type of projects (for example web and ear project). Where MyEclipse’s web and ear project can be inconsistent with pom set up when deploy with MyEclipse’s regular deploy set up. I don’t think MyEclipse use pom to package the project and deploy it to the container. As matter in fact, MyEclipse still can not support maven ear project.
There are three aspects of this issue. How Eclipse/MyEclipse package the project, what kind of features/fuctions/supports can maven-eclipse plugin provide, and how MyEclipse’s deploy mechanism utilize Eclipse’s base features and features from maven-eclipse’s plugin. I understand that it will be huge task for MyEclipse to ensure the consistent between MyEclipse’s project setup and maven set up (ie. MyEclipse should use maven pom to build the artifacts then deploy to the container, instead of using the original deploy setup.) However, if MyEclipse can get it work consistently, it will be less confuse to the developers who are using MyEclipse and maven together.
relate forum topic:
https://www.genuitec.com/forums/topic/maven-ear-plugin-support/
https://www.genuitec.com/forums/topic/7-0-1-ignoring-quot-provided-quot-scope-when-deploying-to/
Riyad KallaMemberI don’t think MyEclipse use pom to package the project and deploy it to the container. As matter in fact, MyEclipse still can not support maven ear project.
Correct
I understand that it will be huge task for MyEclipse to ensure the consistent between MyEclipse’s project setup and maven set up (ie. MyEclipse should use maven pom to build the artifacts then deploy to the container, instead of using the original deploy setup.) However, if MyEclipse can get it work consistently, it will be less confuse to the developers who are using MyEclipse and maven together.
You are absolutely right that it would be nice *and* that it would be a huge undertaking requiring changes throughout our deployer, builder and project model. We haven’t had the user demand yet to justify this investment of work. Sorry about the inconsistency, I know it can be unnecessarily confusing.
-
AuthorPosts