We use Maven 3.5.2 and have configured NetBeans 11.0 to use the external maven 
via Tools | Options | Java | Maven and selecting the path to the Maven 3.2.2 
folder.
Most operations work just fine, but when trying to Profile a project I get:
"The syntax of the command is incorrect."

The path of the actual command was:
cd C:\Users\pjl\Source\VSP\platform-weather-data-ingester; 
"JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_202" 
M2_HOME=C:\\ProgramData\\chocolatey\\lib\\maven\\apache-maven-3.5.2 cmd /c 
"\"\"C:\\ProgramData\\chocolatey\\lib\\maven\\apache-maven-3.5.2\\bin\\mvn.cmd\"
 -Dexec.args=\"-agentpath:\\\"C:/Program 
Files/NetBeans-11.0/netbeans/profiler/lib/deployed/jdk16/windows-amd64/profilerinterface.dll\\\"=\\\"C:\\Program
 Files\\NetBeans-11.0\\netbeans\\profiler\\lib\\\",5140,10 
-XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=C:\\Users\\pjl\\AppData\\Local\\NetBeans\\Cache\\11.0\\mavencachedirs\\391249365\\org-netbeans-modules-profiler
  -classpath %classpath com.vaisala.platform.tools.weather.data.ingester.Main 
--vsp.sdk.observation.service.base-url=http://localhost:8080/api/  
--ingester.retry-count=1 --server.port=8092 --spring.profiles.active=iceobs 
--iceobs.startOfSearch=2018-06-01T00:00:00Z 
--logging.level.com.vaisala.platform=DEBUG --iceobs.organizationIds[0]=317\" 
-Dexec.executable=\"C:\\Program Files\\Java\\jdk1.8.0_202\\bin\\java.exe\" 
-Dmaven.ext.class.path=\"C:\\Program 
Files\\NetBeans-11.0\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" 
-Dfile.encoding=UTF-8 process-classes 
org.codehaus.mojo:exec-maven-plugin:1.5.0:exec\""

Switching back to the version of Maven bundled with NetBeans doesn't work 
because our pom files are incompatible with the older Maven version:

cd C:\Users\pjl\Source\VSP\platform-weather-data-ingester; 
"JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_202" 
M2_HOME=C:\\Users\\pjl\\Downloads\\incubating-netbeans-11.0-bin\\netbeans\\java\\maven
 cmd /c 
"\"\"C:\\Users\\pjl\\Downloads\\incubating-netbeans-11.0-bin\\netbeans\\java\\maven\\bin\\mvn.cmd\"
 -Dexec.args=\"-agentpath:\\\"C:/Program 
Files/NetBeans-11.0/netbeans/profiler/lib/deployed/jdk16/windows-amd64/profilerinterface.dll\\\"=\\\"C:\\Program
 Files\\NetBeans-11.0\\netbeans\\profiler\\lib\\\",5140,10 
-XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=C:\\Users\\pjl\\AppData\\Local\\NetBeans\\Cache\\11.0\\mavencachedirs\\391249365\\org-netbeans-modules-profiler
  -classpath %classpath com.vaisala.platform.tools.weather.data.ingester.Main 
--vsp.sdk.observation.service.base-url=http://localhost:8080/api 
--ingester.retry-count=1 --server.port=8092 --spring.profiles.active=iceobs 
--iceobs.startOfSearch=2018-06-01T00:00:00Z 
--logging.level.com.vaisala.platform=DEBUG --iceobs.organizationIds[0]=317\" 
-Dexec.executable=\"C:\\Program Files\\Java\\jdk1.8.0_202\\bin\\java.exe\" 
-Dmaven.ext.class.path=\"C:\\Program 
Files\\NetBeans-11.0\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" 
process-classes org.codehaus.mojo:exec-maven-plugin:1.5.0:exec\""
Scanning for projects...
[ERROR] Some problems were encountered while processing the POMs:
Non-resolvable parent POM for 
com.vaisala.platform.tools:platform-weather-data-ingester:MASTER-SNAPSHOT: 
Could not transfer artifact 
com.vaisala.platform:platform-foundation:pom:2.1.0-b99 from/to vai-nexus 
(${nexus.repository.base}/${nexus.repository.releases}): Cannot access 
${nexus.repository.base}/${nexus.repository.releases} with type default using 
the available connector factories: BasicRepositoryConnectorFactory and 
'parent.relativePath' points at wrong local POM @ line 5, column 13
@

I found this bug report from 2017 that seems to be related: 
https://netbeans.org/bugzilla/show_bug.cgi?id=271059
Is it likely that future releases of Netbeans will use a current release of 
maven?

Reply via email to