|
|
Re: Project name template and name conflict in maven import task [message #1857232 is a reply to message #1857226] |
Thu, 26 January 2023 10:12 |
Robert Neßelrath Messages: 12 Registered: December 2022 |
Junior Member |
|
|
Oh, that's much better than searching for code snippets in the internet to understand the functionality of some setups ;)
In fact it may be a bug, at least it is inconsistent to the maven import functionality of eclipse.
The maven import setup task first checks for projects with the same name that have already been added to the workspace.
If this is the case, the project is ignored and the setup task finishes without doing anything.
The name template is considered later in the code when actually importing the project into the workspace.
[Updated on: Thu, 26 January 2023 10:23] Report message to a moderator
|
|
|
|
|
|
Re: Project name template and name conflict in maven import task [message #1857237 is a reply to message #1857236] |
Thu, 26 January 2023 12:30 |
Robert Neßelrath Messages: 12 Registered: December 2022 |
Junior Member |
|
|
Just had an idea. If the m2e ProjectConfigurationManager is used and m2e supports the correct detection of duplicates, what happens if the detection in the oomph task is disabled.
So if commented out the if statement in line 475 of the MavenImportTaskImpl
if (!ROOT.getProject(projectName).exists())
and tested the change.
Now the project is created with the correct project name in the workspace.
The second test was what happens if the project is really already in the work space. In this case we reach line 817 in the m2e org.eclipse.m2e.core.internal.project.ProjectConfigurationManager which logs an error message and the project import is skipped.
Maybe this is already the solution....
[Updated on: Thu, 26 January 2023 12:34] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04196 seconds