Simple question here but could not found it anywhere else.
Eclipse has this feature in Preferences > General > Workspace > Build where you can set the projects build order. Is there any way to do it on VS Code?
Using Maven.
Thanks in advance.
Simple question here but could not found it anywhere else.
Eclipse has this feature in Preferences > General > Workspace > Build where you can set the projects build order. Is there any way to do it on VS Code?
Using Maven.
Thanks in advance.
2
Answers
Altought @JialeDu is right and theres no emmbed way to do it, you can also try to make a task build in VS Code, here's how for future reference:
Now you can build your Java project by opening the Command Palette and typing "run build task", or by using the keyboard shortcut (Ctrl/Cmd + Shift + B).
If you have multiple Java projects in the same workspace, you can modify the args in the task configuration to specify which project to build. Here is an example:
If your Java projects are also Maven projects, you can use the Maven command to build them instead of javac. Here is an example task configuration for building Maven projects:
In this example, the command is set to mvn and the args specify the clean and install goals. The options field is used to specify the current working directory (cwd) for each project, so that the correct Maven project is built. You can run either task by opening the Command Palette and typing "run build task", then selecting the desired task from the list.
Taken from https://chat.openai.com/chat
It seems that vscode currently does not have such an interface feature to set the build order of Java projects.
eclipse
For more Java project management, you can check this link. If you have a need, you can file a report on GitHub to get a response from the official folks, maybe they will consider adding this.
In addition, the same effect can be achieved by modifying pom.xml in maven. Pay attention to follow the rules of dependency resolution and version specifications, otherwise the build will fail.