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 - Build with dependencies makes Maven custom goals default to install phase with no other flags
Summary: Build with dependencies makes Maven custom goals default to install phase wit...
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: Dev
Hardware: PC Windows 10 x64
: P3 normal (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-08 17:30 UTC by Esran
Modified: 2016-09-08 17:30 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 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.