3

My newly imported Maven project in Eclipse workpace has J and M icons on top of the project folder (Project and Package explorer) while the other imported Maven projects has only a J icon.

Can someone explain the difference ?

Sandeep Chatterjee
  • 3,220
  • 9
  • 31
  • 47
John Java
  • 153
  • 1
  • 3
  • 8

1 Answers1

2

The project having J decorator are called Java projects and projects having M decorator are called Maven projects. An eclipse project can be of more than one type.

Project type can be seen in the .project file present inside any given project.

Typical content of .project file look like as shown below

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>Test</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.pde.ManifestBuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.pde.SchemaBuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.pde.PluginNature</nature>
        <nature>org.eclipse.jdt.core.javanature</nature>
    </natures>
</projectDescription>

Look at natures tag. All Java projects will have org.eclipse.jdt.core.javanature nature and a single project can have multiple nature.

You can convert Java projects to Maven projects by right clicking on any Java project and selecting Configure > Covert to Maven project

Check the changes in .project file after converting.

Chandrayya G K
  • 8,719
  • 5
  • 40
  • 68