Community
Participate
Working Groups
Build Identifier: 20110615-0604 If I search for an artifact in the dependency add dialog, and then click on the 'managed' line above all the individual version lines, the POM ends up with a blank artifactId and groupId instead of the actual values. Note that this always happens for one of my local projects, and never for log4j. At very least, I claim that the 'ok' button should be *disabled* until there are some values other than blank in groupId and artifactId. Even if you can't repro the failure to fill them in, you could repro and adjust that. Reproducible: Sometimes Steps to Reproduce: 1. click on add in the dependency view 2. type in an artifactId in the search box 3. tab 4. observe that the groupId and artifactId boxes have not been filled in. 5. click OK 6. observe that it goes ahead and adds a malformed XML element to the POM.
Reproducible always when artifact is managed. Expected behaviour: - Ok button should be disabled if dependency version is not managed - If I click on the top entry when managed, then it should insert the groupId and artifactId, and enable the ok button
Created attachment 228890 [details] Proposed patch The issue reported here does not only affects addition of entries to the Dependency and Dependency Management lists since in both cases the Add button launches the MavenRepositorySearchDialog. The patch do the next: - Adds a method to validate the Group Id and Artifact Id fields - Add two new error messages to report that the corresponding field has no value: + "Artifact Id cannot be empty" + "Group Id cannot be empty" - Disables OK button until user enters a value in the fields or the fields are filled automatically when user selects an artifact from the list.
Hi, Any chance to have a review of this defect?
Reviewed and applied the patch. Thank you.
Moved to https://github.com/eclipse-m2e/m2e-core/issues/