Bug 191116 - Provide Hints for Maven 3.x Compatibility when opened a maven 2 project...
Provide Hints for Maven 3.x Compatibility when opened a maven 2 project...
Status: NEW
Product: projects
Classification: Unclassified
Component: Maven
7.0
All All
: P2 (vote)
: TBD
Assigned To: Milos Kleint
issues@projects
: PLAN
: 191707 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-19 05:45 UTC by hantsy
Modified: 2012-06-19 16:13 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hantsy 2010-10-19 05:45:08 UTC
The maven support in NetBeans 7 have bean moved to Maven 3...if user opened a maven 2 project, it should help user to upgrade the deprecated configraution in pom....

https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html#Maven3.xCompatibilityNotes-SnapshotUpdates
Comment 1 Jesse Glick 2010-10-19 15:08:46 UTC
Would be useful. There are a number of different things to do, though; most are handled best by e.g. versions-maven-plugin.
Comment 2 lmorissette 2010-11-07 01:13:01 UTC
I also agree that we need such feature. plus doing a quick search of Maven migration show a couple of tips about this...so I think maybe the first step (as you may have figured out :) ) migh be to see if there is a migration guide out there somewhere that we could use

well i'll be interested in this question and will try to do some research
Comment 3 Jesse Glick 2010-11-09 16:17:43 UTC
This would be a great place to contribute patches - https://hg.netbeans.org/core-main/file/default/maven.hints/src/org/netbeans/modules/maven/hints/pom/ is largely self-contained. It should also be possible to create hints in an external plugin, which could be integrated into the official IDE builds when stabilized.

Rather than adding hints to the pom.xml editor, another approach is to create an org.netbeans.modules.maven.api.output.OutputProcessorFactory which would take note of an actual warning reported during the build, and create a hyperlink offering to fix it. This would be more appropriate for a misconfiguration which cannot clearly be identified with a particular line in the POM.

First I would be interested in hearing what sorts of compatibility issues users are actually running into, and how much work it is understand the issue and find the fix.
Comment 4 Jesse Glick 2010-11-09 16:19:51 UTC
*** Bug 191707 has been marked as a duplicate of this bug. ***
Comment 5 Jesse Glick 2011-08-29 19:40:10 UTC
I have made a couple of improvements in 7.1 relating to model building problems, which would be helpful for compatibility issues relating to that, which seem common - e.g. <plugin> without <version>.

1. Warnings in the Maven output about model building problems now hyperlink to the POM.

2. The POM editor now shows warnings (and errors) from Maven validation, refreshed after you save changes.
Comment 6 Quality Engineering 2011-08-30 14:21:09 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/cfc56495997f
User: Jesse Glick <jglick@netbeans.org>
Log: Hyperlink model building problems, so you can at least see where in the source POM the problem lies.
Does not currently attempt to map repository model IDs to known source projects, though it could.
(Maven itself will report the source POM only if there are suitable <parent> links.)
Mentioned in bug #191116 comment #3.
Comment 7 Milos Kleint 2012-02-17 14:14:59 UTC
reading the MavenProject instance with ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 should be able to collect all model related warnings, along with line and column numbers I think..
Comment 8 Jesse Glick 2012-02-20 20:29:58 UTC
We already show warnings in the POM editor as of 7.1 (a5580fffe252 for comment #5 item #2). But there are no hints to help solve those issues.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo