Issue Details (XML | Word | Printable)

Key: MPECLIPSE-78
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: fabrizio giustina
Reporter: fabrizio giustina
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Eclipse Plugin

avoid duplicated builders/natures (patch)

Created: 05/Mar/05 10:08 AM   Updated: 09/Oct/05 12:04 PM
Component/s: None
Affects Version/s: 1.9
Fix Version/s: 1.10

Time Tracking:
Original Estimate: 10 minutes
Original Estimate - 10 minutes
Remaining Estimate: 10 minutes
Remaining Estimate - 10 minutes
Time Spent: Not Specified
Remaining Estimate - 10 minutes


 Description  « Hide
The eclipse plugin automatically adds the java nature/builder as the first entry for each project.
Anyway, sometime you will need to add more builders and in a different order. Specifying an addictional java builder in project properties, however, lead to a duplicate entries in .project.

The problem is discussed at:
http://www.eclipse.org/webtools/jst/components/j2ee/scenarios/MavenEclipseIntegration.html

snippet:

"Create a file project.properties under the csrweb folder, the folder where you will find project.xml. Now add the following in this file.

maven.eclipse.projectnatures=org.eclipse.jst.j2ee.web.WebNature,org.eclipse.jdt.core.javanature,org.eclipse.wst.common.modulecore.ModuleCoreNature
maven.eclipse.buildcommands=org.eclipse.wst.common.modulecore.DeployableModuleBuilder,org.eclipse.jdt.core.javabuilder,org.eclipse.jst.j2ee.web.LibDirBuilder,org.eclipse.wst.validation.validationbuilder,org.eclipse.jst.j2ee.LibCopyBuilder,org.eclipse.wst.common.modulecore.LocalDependencyResolver

...

Open the .project and remove the first buildcommand javabuilder and the first nature org.eclipse.jdt.core.javanature.
This is done to ensure that only one entry of javabuilder and org.eclipse.jdt.core.javanature exists.
The correct order of builder and natures are needed to ensure proper functionality
"

This patch solves the problem avoiding addictional javabuilders and javanatures if they are already present in the list specified using project.properties. If maven.eclipse.projectnatures and maven.eclipse.buildcommands don't contain a such entry, everything works as before.

The patch also contains a new specific plugin test.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Brett Porter added a comment - 06/Mar/05 04:57 PM
test attachment

fabrizio giustina added a comment - 11/Mar/05 05:45 AM
Patch is attached to MPECLIPSE-80

fabrizio giustina added a comment - 09/Oct/05 12:04 PM
fixed in svn