Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] POM derived

Hi,

When I import an existing project into Eclipse Kepler SR1 and then convert it to a Maven Project, the m2e plugin updates the .classpath files based on 'project information from the pom.xml'.
The source and resources folders get updated with Includes and Excludes, for example:

For an EJB project:
ejbProject/ejbModule used to have Included: (All) and Excluded: (None), but becomes Included: **/*.java
ejbProject/src/main/java used to have Included: (All) and Excluded: (None) and remains the same after the update project.
ejbProject/src/main/resources used to have Included: (All) and Excluded: (None) and becomes Included: **/*.java (whereas resources should actually be including other files than java sources)
ejbProject/src/test/java used to have Included: (All) and Excluded: (None) and becomes Included: **/*.java

For a JAR project:
jarProject/src/main/java used to have Included: (All) and Excluded: (None) and remains the same after the update project.
jarProject/src/main/resources used to have Included: (All) and Excluded: (None) and becomes Included: **/*.java (whereas resources should actually be including other files than java sources)
jarProject/src/test/java used to have Included: (All) and Excluded: (None) and becomes Included: **/*.java
jarProject/src/test/resources used to have Included: (All) and Excluded: (None) and becomes Included: **/*.java (whereas resources should actually be including other files than java sources)

For a WAR project:
warProject/src/main/java used to have Included: (All) and Excluded: (None) and remains the same after the update project.
warProject/src/main/resources used to have Included: (All) and Excluded: (None) and becomes Included: **/*.java (whereas resources should actually be including other files than java sources)
warProject/src/test/java used to have Included: (All) and Excluded: (None) and becomes Included: **/*.java
warProject/src/test/resources used to have Included: (All) and Excluded: (None) and becomes Included: **/*.java (whereas resources should actually be including other files than java sources)

We are using a company wide parent pom which contains most of the configuration for our projects, like maven-ear-plugin, maven-jar-plugin, maven-war-plugin, maven-ejb-plugin. All project poms inherit from this company wide parent pom, so they mainly only have to be concerned with including the correct dependencies in their poms.
What is triggering the change of these classpath settings when you update your maven project in Eclipse? Could it be that we need to change some configuration in the company wide parent pom to get things right (such that it doesn't add the **/*.java includes)?

Preferably, I don't want the classpath settings to be changed when I convert a project to Maven. How can I prevent this on initial conversion or import?
I also noticed that there is an option under Maven > Update Project where you can turn off 'Update project configuration from pom.xml'. Once disabled, it will leave the .classpath files unchanged. But I have to turn off this option each time I do an 'Update project' manually. Is there a way to have this option turned off by default?

Regards,

Manfred



---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. 
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.

Please consider the environmental impact before printing this document and its attachment(s).
Print black and white and double-sided where possible.

----------------------------------------------------------------------------------


Back to the top