Add multiple folders to src path
See original GitHub issueWe are trying to make this work with a Bazel mono-repo and are wondering if there is a programmatic way to add multiple src folders to the .classpath file?
Right now it seems to add the first src/main/java folder if finds to the .classpath file and then stops. If you right-click on another folder and add it to the java source path that works fine.
For example:
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="{default added folder 1}"/>
<classpathentry kind="src" path="{manually added folder 2}"/>
<classpath>
It would be nice to have a config like this:
"java.project.srcs": [
"/src/main/java",
"/src/test/java"
]
For example, this shell script exports the desired src folders.
SRC_PATHS=$(find . -type d -path '*/src/main/java' -o -path '*/src/test/java')
Hopefully, there is another, simpler way to do this.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
creating multiple src directories in eclipse - java - Stack Overflow
Right-click your project, select Build Path and Configure Build Path. ... Do this by selecting a folder (to add folders to), like src/main ......
Read more >[SOLVED] How to add multiple folders to your PATH ? [Archive]
Lo Guys , I want to add some folders to my PATH variable in my ~/.bashrc file. It was quite easy by adding...
Read more >Maven Project with Multiple Source Directories | Baeldung
Configure multiple source directories in a Maven project. ... let's add a new source directory called another-src in the src/main folder.
Read more >Multi-root Workspaces in Visual Studio Code
The File > Add Folder to Workspace command brings up an Open Folder dialog to select the new folder. Add Root Folder. Once...
Read more >Content roots | IntelliJ IDEA Documentation - JetBrains
Click Add Content Root and specify the folder that you want to add as a new content root. To remove a content root,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The upstream issue has been fixed.
In the next version, you should be able to use the setting
java.project.sourcePaths
to specify your source paths for the project without any build toolsThis issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.