Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interpreting eclipse .classpath file. What does 'kind="con"' and 'exported="true"' mean?

This is the eclipse .classpath file of the eclipse plugin program that I downloaded.

I think that kind="src" and kind="output" is pretty straight forward, as they means the where the source java files and compiled class files are located.

The kind="lib" seems to indicate the jar files the plugin is referencing, but I have something that I'm not sure about.

  • What does the kind="con" mean?
  • What is it for the exported="true"? I think in order to use this plugin, all the jar files that the plugin refers to should be exported, but only some of them are exported.

enter image description here

like image 538
prosseek Avatar asked Dec 19 '12 20:12

prosseek


People also ask

What is .classpath file in eclipse?

The . classpath maintains the project's source and target references for Java compilation and compressed file or project dependencies. This configuration is maintained through the Java Build Path page in the project's properties.

Should I check .classpath files?

There is not problem of checking in . classpath and . project files into repository. It will help developers which use Eclipse to get going faster.

What is .classpath and .project files?

Basically, . project files store project-settings, such as builder and project nature settings, while . classpath files define the classpath to use during running.


2 Answers

1) In kind="con", the con stands for container, which is interpreted by eclipse as a classpath container. As described in that link:

A classpath container provides a way to indirectly reference a set of classpath entries through a classpath entry of kind CPE_CONTAINER

In other words, it enables grouping of other classpath entries in any way and re-use it wherever (including the ability of having different entries for different projects).

2) exported: Say you have Project B that depends on Project C. The dependency is defined as exported=true. Then, another Project A that depends on Project B, will have also Project C present on A'a classpath.

like image 178
yair Avatar answered Oct 14 '22 01:10

yair


  • kind="con" are indicating classpath containers
  • exported=true exports the dependency, meaning that any project that has a depedency on your project can see/access the exported dependencies as well.
like image 21
Will Avatar answered Oct 14 '22 01:10

Will