This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 252193 - MavenNbModuleImpl fails on calling watch.getMavenProject().getDependencyArtifacts();
Summary: MavenNbModuleImpl fails on calling watch.getMavenProject().getDependencyArtif...
Status: NEW
Alias: None
Product: apisupport
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0.2
Hardware: PC Other
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-01 17:30 UTC by arittner
Modified: 2015-07-22 10:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description arittner 2015-05-01 17:30:20 UTC
In my tests the call of 

watch.getMavenProject().getDependencyArtifacts()

returns always null and hasDependencies returns always false.

At another method the class MavenNbModuleImpl use this call to get dependencies:

watch.getMavenProject().getModel().getDependencies()


The method hasDependencies should be fixed. 

Another question: the test in hasDependencies to identify an existing artifact
dependency is:

if (art.getGroupId().startsWith("org.netbeans") && art.getArtifactId().equals(artifactId)) { // NOI18N 
  return true; 
} 

Why the &&? An OR (||) makes more sense, IMHO. Or works hasDependencies only with netbeans core APIs?