Maven Integration for Eclipse

For projects of type 'pom': Not always add Java nature when enabling Maven for the project

Details

  • Type: Wish Wish
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Dependency Resolver
  • Labels:
    None
  • Number of attachments :
    0

Description

Linked to Issue: http://jira.codehaus.org/browse/MNGECLIPSE-53

It's my feeling that adding the java-nature to in essence 'simple' projects of packaing-type 'pom' is not desirable since it will make eclipse go and look for java source-folders and wrongly interpret module-directories and the nested src/main/java as package-names leading to lists of errors about bad package names.

I'm unsure if the goal of this plugin is ever to support these kind of pom-projects in eclipse or not, for now the safe bet looks like trying to enable such a project of type 'pom' should be disabled?

Activity

Hide
Eugene Kuleshov added a comment -

The only reason to enable maven nature is to make dynamic dependency resolution to work. So, it really does not make any sense to have it without java nature. Besides, you don't have to enable maven support and add maven nature if you don't need dynamic dependency resolution.

Also note, that pom packaging can be used in a root pom.xml and submodules may go into the same Eclipse project (unless flat module layout is used). So, those modules will give java source folders even if root module does not have any source folders. We already have update source folders action that takes care of this.

Show
Eugene Kuleshov added a comment - The only reason to enable maven nature is to make dynamic dependency resolution to work. So, it really does not make any sense to have it without java nature. Besides, you don't have to enable maven support and add maven nature if you don't need dynamic dependency resolution. Also note, that pom packaging can be used in a root pom.xml and submodules may go into the same Eclipse project (unless flat module layout is used). So, those modules will give java source folders even if root module does not have any source folders. We already have update source folders action that takes care of this.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: