14

What does the exported attribute do in this .classpath line?

<classpathentry exported="true" kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>

I've got a project that builds & runs fine with and without it. So, what difference does it make?

Apparently in my particular case (a project I inherited) it isn't critical to have it. When is it critical to have this attribute added?

Withheld
  • 4,603
  • 10
  • 45
  • 76

2 Answers2

6

When it is exported, it is available to other eclipse projects. In maven, if you have multiple projects that depend on each other, eclipse can resolve projects within the workspace. So changing that is likely to have an effect when you have multiple projects.

Jeff Storey
  • 56,312
  • 72
  • 233
  • 406
  • 1
    Thanks. Both answers provide an insight into its purpose (for example, I didn't know that it is particular to M2Eclipse) but yours explains better what "delegate its artifact resolution" mean. – Withheld Jan 08 '13 at 17:26
1

This line is particular to M2Eclipse, and it basically tells Eclipse to delegate its artifact resolution to M2Eclipse.

aldrinleal
  • 3,559
  • 26
  • 33