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 267943

Summary: Build with dependencies makes Maven custom goals default to install phase with no other flags
Product: ide Reporter: Esran
Component: CodeAssignee: issues@ide <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: Dev   
Hardware: PC   
OS: Windows 10 x64   
Issue Type: DEFECT Exception Reporter:

Description Esran 2016-09-08 17:30:26 UTC
When creating a custom Maven custom goal, the Build With Dependencies checkbox will make the goal ignore any configuration and simply default to running the install phase. To reproduce, create a custom goal with any name, set it to run the Execute goals box to "clean package" and add "skipTests=true" to Set properties.

With Build With Dependencies off on a multimodule project, the executed command will look like this: 

cd C:\Users\Esran\Documents\NetbeansProjects\ivan\dev-utils; JAVA_HOME=C:\\java M2_HOME=E:\\apache-maven-3.3.9 cmd /c "\"\"E:\\apache-maven-3.3.9\\bin\\mvn.cmd\" -DskipTests=true -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans Dev 201609080002\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 clean package\""

which is correct. When Build With Dependencies is on, it looks like this:

cd C:\Users\Esran\Documents\NetbeansProjects\ivan; JAVA_HOME=C:\\java M2_HOME=E:\\apache-maven-3.3.9 cmd /c "\"\"E:\\apache-maven-3.3.9\\bin\\mvn.cmd\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans Dev 201609080002\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 --also-make --projects dev-utils install\""

which is not passing the -DskipTests flag and isn't running the right phases. I suspect the install phase is hard coded somewhere when Build With Dependencies is checked.

This was tested with both NB 8.1 and the nightly build for September 8th.