0

I'm working on a Clojure-project that I'd like to import to eclipse. Therefore I'm using lein2eclipse. This Plugin adds a .classpath-file to my project-folder.

After importing it to eclipse, the dependencies are on the same level as e.g. source folders.

enter image description here

Once the list becomes long, this can be very annoying. I had the idea to add a "classpath-container", to "bundle" those dependencies (comparable to what Gradle does):

enter image description here

In the .classpath-file there are lots of entries like:

<classpathentry
  kind="lib"
  path="/home/edy/.m2/repository/org/slf4j/slf4j-simple/1.7.10/slf4j-simple-1.7.10.jar"
/>

Is there a simple way to move all theses entries to another file, "import" this file and give it a name?

I saw the container-entries, but so far I have no idea how that works:

<classpathentry path="org.eclipse.jdt.launching.JRE_CONTAINER" kind="con"/>
Edward
  • 4,453
  • 8
  • 44
  • 82
  • is there a reason to avoid counterclockwise? this provides a first-class eclipse integration including a container for leiningen derived dependencies. – pete23 May 26 '15 at 11:42
  • Couterclockwise made my Eclipse crash (completely) a couple of times. Besides that, I'm interested in learning more about `.classpath`-files. – Edward May 26 '15 at 12:22

1 Answers1

0

It sounds like you're using the Project Explorer view instead of the Package Explorer view.

Try changing the the latter, and you'll stop seeing the libs at the top level.

Alternatively, if you want to keep using the Project Explorer view, you can filter the libs out by clicking the Down pointing triangle to the right of the Project Explorer tab, and select the option "Libraries From External" and click OK. This will filter out the jar files.

But in all honesty, I only ever use the Package Explorer view because of this feature.

Mark Fisher
  • 9,838
  • 3
  • 32
  • 38