You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Creating a Spring Starter project in non-default file system location #1025
I cannot reproduce this in Win 10 with STS 4.18.0 :-
Once a project is created in the non-default location on the file system, did you see the contents of the created folder? Any thing in it? Can you import this folder as "Existing Eclipse Project" or "Existing Maven Project"
Are you able to create a simple Java project in the non-default location? What about simple project (General -> Project)?
@BoykoAlex, thanks for trying to reproduce! I think the answers to your questions are already given in the issue description :)
Any thing in it?
Yes, I can even run it.
Can you import this folder as "Existing Eclipse Project" or "Existing Maven Project"
That's my workaround. The name of the reimported project remains "artifact.id". In fact, the only difference between the two created projects (default location vs. non-default location) in filesystem is .project:
In Eclipse: If you had selected a working set for the new project, then Eclipse generates a second project, broken and closed, with the correct name in that working set. Eclipse shows in the project properties, the (file system) location of that broken project is empty. If no working set was selected, no such second broken project is created.
Are you able to create a simple Java project in the non-default location?
Creating a Java or Maven project in non-default locations works as expected.
@fenjen I should have paid more attention to the description :-) I was able to reproduce the issue. However, the expected behaviour for the project in non-default location (i.e. not under the workspace root) is going to be:
Other Projects
My Working Set
- artifact.id (open)
(not MyProject)
This is due to the way m2e works. Project name is always artifact id with the exception of project located under the workspace root when the name of the eclipse project is the name (i.e. label) of the Maven project. Therefore, the fix is let M2E or Buildship create the project and then the resultant project is added to the working set.
Activity
BoykoAlex commentedon Apr 12, 2023
I cannot reproduce this in Win 10 with STS 4.18.0 :-
Once a project is created in the non-default location on the file system, did you see the contents of the created folder? Any thing in it? Can you import this folder as "Existing Eclipse Project" or "Existing Maven Project"
Are you able to create a simple Java project in the non-default location? What about simple project (General -> Project)?
fenjen commentedon Apr 13, 2023
@BoykoAlex, thanks for trying to reproduce! I think the answers to your questions are already given in the issue description :)
Yes, I can even run it.
That's my workaround. The name of the reimported project remains "artifact.id". In fact, the only difference between the two created projects (default location vs. non-default location) in filesystem is
.project:In Eclipse: If you had selected a working set for the new project, then Eclipse generates a second project, broken and closed, with the correct name in that working set. Eclipse shows in the project properties, the (file system) location of that broken project is empty. If no working set was selected, no such second broken project is created.
Creating a Java or Maven project in non-default locations works as expected.
BoykoAlex commentedon Apr 13, 2023
@fenjen I should have paid more attention to the description :-) I was able to reproduce the issue. However, the expected behaviour for the project in non-default location (i.e. not under the workspace root) is going to be:
(not
MyProject)This is due to the way m2e works. Project name is always artifact id with the exception of project located under the workspace root when the name of the eclipse project is the name (i.e. label) of the Maven project. Therefore, the fix is let M2E or Buildship create the project and then the resultant project is added to the working set.
BoykoAlex commentedon Apr 13, 2023
Fixed with 0694331