Jessica Cowen
Jessica Cowen

Reputation: 41

eclipse jave project with two source directories - how to set the visibility of the source folders

I have a Java project in eclipse - within the project I want to configure two source directories:

  1. src-api
  2. src-core

This is simple.

The problem is that I want src-core to be able to access src-api, but I don't want src-api to access src-core, I want eclipse to not let me compile and be able to find classes configured in src-core only from the src-api.

Is it possible to do so?

I would very much appreciate your help.

Upvotes: 0

Views: 125

Answers (2)

Kowser
Kowser

Reputation: 8261

No, it is not possible.

Just create two different project api & core. Then make core project dependent to api project.

Upvotes: 3

Carlo
Carlo

Reputation: 1714

I would use two different projects, one for src-api and one for . The src-core should have src-api as a dependency, but not vice versa.

Upvotes: 0

Related Questions