I am trying to run following command on following project:
我试图在以下项目上运行以下命令:
mvn clean package nbm:cluster nbm:run-ide
Project URL: https://github.com/mulesoft-labs/mule-netbeans (Netbeans Support for Mule)
项目网址:https://github.com/mulesoft-labs/mule-netbeans(Netbeans支持骡子)
I tried it on Apanche Maven 3.0.4 and 3.0.5 but unable to run it.
我在Apanche Maven 3.0.4和3.0.5上尝试过但无法运行它。
I tried it with Java 6, Java 7 and Java 8.
我尝试使用Java 6,Java 7和Java 8。
With Java 7 and Java 8 i am getting following issues:
使用Java 7和Java 8,我遇到以下问题:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Mule Netbeans XML
[INFO] Mule Support Plugin
[INFO] Mule Tools for NetBeans
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Mule Netbeans XML 0.5
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mule-netbeans-xml ---
[INFO] Deleting D:\mule-netbeans-master\mule-netbeans-xml\target
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mule-netbeans-xml ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\mule-netbeans-master\mule-netbeans-xml\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ mule-netbeans-xml ---
[INFO] Compiling 2 source files to D:\mule-netbeans-master\mule-netbeans-xml\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] D:\mule-netbeans-master\mule-netbeans-xml\src\main\java\org\mule\tooling\netbeans\xml\UserCatalogProcessor.java:[38,37] error: cannot find symbol
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping Mule Tools for NetBeans
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Mule Netbeans XML ................................. FAILURE [1.471s]
[INFO] Mule Support Plugin ............................... SKIPPED
[INFO] Mule Tools for NetBeans ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.154s
[INFO] Finished at: Thu May 04 08:53:45 IST 2017
[INFO] Final Memory: 15M/220M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project mule-netbeans-xml: Compilation failure
[ERROR] D:\mule-netbeans-master\mule-netbeans-xml\src\main\java\org\mule\tooling\netbeans\xml\UserCatalogProcessor.java:[38,37] error: cannot find symbol
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
With Java 6, i am getting following:
使用Java 6,我得到以下内容:
Failure executing javac, but could not parse the error:
javac: invalid target release: 1.7
Usage: javac <options> <source files>
use -help for a list of possible options
POm.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mule.tooling.netbeans</groupId>
<artifactId>mule-netbeans</artifactId>
<name>Mule Tools for NetBeans</name>
<description>NetBeans Support for Mule</description>
<version>1.1</version>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<netbeans-version>RELEASE82</netbeans-version>
</properties>
<licenses>
<license>
<name>Apache License 2.0</name>
<url>http://opensource.org/licenses/Apache-2.0</url>
</license>
</licenses>
<build>
<pluginManagement>
<plugins>
<plugin>
<!-- NetBeans 6.9+ requires JDK 6, starting NetBeans 7.4 source 1.7 is required -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.15</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<modules>
<!--<module>mule-netbeans-runtime</module>-->
<!--<module>mule-netbeans-api</module>-->
<!--<module>mule-netbeans-config</module>-->
<module>mule-netbeans-xml</module>
<module>mule-netbeans-plugin</module>
</modules>
<repositories>
<repository>
<id>netbeans</id>
<name>Repository hosting NetBeans modules</name>
<url>http://bits.netbeans.org/nexus/content/groups/netbeans</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</project>
Could anyone assist where i am doing wrong?
任何人都可以协助我做错了吗?
3 个解决方案
#1
1
try to change to maven2 and you have to add this additional info in the pom:
尝试更改为maven2,您必须在pom中添加此附加信息:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerVersion>1.5</compilerVersion>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
#2
1
Done following Changes to execute it perfectly.
完成以下更改以完美执行它。
Java 8, Apache Maven 3.0.5
Java 8,Apache Maven 3.0.5
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
Output:
Scanning for projects...
------------------------------------------------------------------------
Reactor Build Order:
Mule Netbeans XML
Mule Support Plugin
Mule Tools for NetBeans
------------------------------------------------------------------------
Building Mule Netbeans XML 0.5
------------------------------------------------------------------------
--- maven-clean-plugin:2.4.1:clean (default-clean) @ mule-netbeans-xml ---
Deleting D:\mule-netbeans-master\mule-netbeans-xml\target
--- maven-resources-plugin:2.5:resources (default-resources) @ mule-netbeans-xml ---
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory D:\mule-netbeans-master\mule-netbeans-xml\src\main\resources
--- maven-compiler-plugin:2.5.1:compile (default-compile) @ mule-netbeans-xml ---
Compiling 2 source files to D:\mule-netbeans-master\mule-netbeans-xml\target\classes
--- maven-resources-plugin:2.5:testResources (default-testResources) @ mule-netbeans-xml ---
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory D:\mule-netbeans-master\mule-netbeans-xml\src\test\resources
--- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ mule-netbeans-xml ---
No sources to compile
--- maven-surefire-plugin:2.15:test (default-test) @ mule-netbeans-xml ---
Tests are skipped.
--- maven-jar-plugin:2.4:jar (default-jar) @ mule-netbeans-xml ---
Building jar: D:\mule-netbeans-master\mule-netbeans-xml\target\mule-netbeans-xml-0.5.jar
--- maven-install-plugin:2.3.1:install (default-install) @ mule-netbeans-xml ---
Installing D:\mule-netbeans-master\mule-netbeans-xml\target\mule-netbeans-xml-0.5.jar to C:\Users\harpreetsi\.m2\repository\org\mule\tooling\netbeans\mule-netbeans-xml\0.5\mule-netbeans-xml-0.5.jar
Installing D:\mule-netbeans-master\mule-netbeans-xml\pom.xml to C:\Users\harpreetsi\.m2\repository\org\mule\tooling\netbeans\mule-netbeans-xml\0.5\mule-netbeans-xml-0.5.pom
------------------------------------------------------------------------
Building Mule Support Plugin 0.8-SNAPSHOT
------------------------------------------------------------------------
--- maven-clean-plugin:2.4.1:clean (default-clean) @ mule-netbeans-plugin ---
Deleting D:\mule-netbeans-master\mule-netbeans-plugin\target
--- maven-resources-plugin:2.6:resources (default-resources) @ mule-netbeans-plugin ---
Using 'UTF-8' encoding to copy filtered resources.
Copying 39 resources
--- maven-compiler-plugin:2.5.1:compile (default-compile) @ mule-netbeans-plugin ---
Compiling 63 source files to D:\mule-netbeans-master\mule-netbeans-plugin\target\classes
--- nbm-maven-plugin:4.0.1:manifest (default-manifest) @ mule-netbeans-plugin ---
NBM Plugin generates manifest
Adding on module's Class-Path:
org.mule.tooling.netbeans:mule-netbeans-xml:jar:0.5
org.jdesktop:beansbinding:jar:1.2.1
--- maven-resources-plugin:2.6:testResources (default-testResources) @ mule-netbeans-plugin ---
Using 'UTF-8' encoding to copy filtered resources.
Copying 12 resources
--- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ mule-netbeans-plugin ---
Compiling 2 source files to D:\mule-netbeans-master\mule-netbeans-plugin\target\test-classes
--- maven-surefire-plugin:2.15:test (default-test) @ mule-netbeans-plugin ---
Tests are skipped.
--- maven-jar-plugin:2.4:jar (default-jar) @ mule-netbeans-plugin ---
Adding existing MANIFEST to archive. Found under: D:\mule-netbeans-master\mule-netbeans-plugin\target\classes\META-INF\MANIFEST.MF
Building jar: D:\mule-netbeans-master\mule-netbeans-plugin\target\mule-netbeans-plugin-0.8-SNAPSHOT.jar
--- nbm-maven-plugin:4.0.1:branding (default-branding) @ mule-netbeans-plugin ---
No branding to process.
--- nbm-maven-plugin:4.0.1:nbm (default-nbm) @ mule-netbeans-plugin ---
Copying module JAR to D:\mule-netbeans-master\mule-netbeans-plugin\target\nbm\netbeans\mule\modules with manifest updates
Generating Auto Update information for org.mule.tooling.netbeans
No updater.jar specified, cannot validate Info.xml against DTD
Building jar: D:\mule-netbeans-master\mule-netbeans-plugin\target\nbm\mule-netbeans-plugin-0.8-SNAPSHOT.nbm
--- maven-install-plugin:2.5:install (default-install) @ mule-netbeans-plugin ---
Installing D:\mule-netbeans-master\mule-netbeans-plugin\target\mule-netbeans-plugin-0.8-SNAPSHOT.jar to C:\Users\harpreetsi\.m2\repository\org\mule\tooling\netbeans\mule-netbeans-plugin\0.8-SNAPSHOT\mule-netbeans-plugin-0.8-SNAPSHOT.jar
Installing D:\mule-netbeans-master\mule-netbeans-plugin\pom.xml to C:\Users\harpreetsi\.m2\repository\org\mule\tooling\netbeans\mule-netbeans-plugin\0.8-SNAPSHOT\mule-netbeans-plugin-0.8-SNAPSHOT.pom
Installing D:\mule-netbeans-master\mule-netbeans-plugin\target\mule-netbeans-plugin-0.8-SNAPSHOT.nbm to C:\Users\harpreetsi\.m2\repository\org\mule\tooling\netbeans\mule-netbeans-plugin\0.8-SNAPSHOT\mule-netbeans-plugin-0.8-SNAPSHOT.nbm
------------------------------------------------------------------------
Building Mule Tools for NetBeans 1.1
------------------------------------------------------------------------
--- maven-clean-plugin:2.4.1:clean (default-clean) @ mule-netbeans ---
--- maven-install-plugin:2.3.1:install (default-install) @ mule-netbeans ---
Installing D:\mule-netbeans-master\pom.xml to C:\Users\harpreetsi\.m2\repository\org\mule\tooling\netbeans\mule-netbeans\1.1\mule-netbeans-1.1.pom
------------------------------------------------------------------------
Reactor Summary:
Mule Netbeans XML ................................. SUCCESS [5.716s]
Mule Support Plugin ............................... SUCCESS [23.561s]
Mule Tools for NetBeans ........................... SUCCESS [0.069s]
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 33.336s
Finished at: Thu May 04 09:30:43 IST 2017
Final Memory: 30M/394M
------------------------------------------------------------------------
#3
0
You need to set JAVA_HOME to your jdk7 home directory, for example on Microsoft Windows:
您需要将JAVA_HOME设置为jdk7主目录,例如在Microsoft Windows上:
"C:\Program Files\Java\jdk1.7.0_40" or on OS X:
“C:\ Program Files \ Java \ jdk1.7.0_40”或OS X:
/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home
#1
1
try to change to maven2 and you have to add this additional info in the pom:
尝试更改为maven2,您必须在pom中添加此附加信息:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerVersion>1.5</compilerVersion>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
#2
1
Done following Changes to execute it perfectly.
完成以下更改以完美执行它。
Java 8, Apache Maven 3.0.5
Java 8,Apache Maven 3.0.5
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
Output:
Scanning for projects...
------------------------------------------------------------------------
Reactor Build Order:
Mule Netbeans XML
Mule Support Plugin
Mule Tools for NetBeans
------------------------------------------------------------------------
Building Mule Netbeans XML 0.5
------------------------------------------------------------------------
--- maven-clean-plugin:2.4.1:clean (default-clean) @ mule-netbeans-xml ---
Deleting D:\mule-netbeans-master\mule-netbeans-xml\target
--- maven-resources-plugin:2.5:resources (default-resources) @ mule-netbeans-xml ---
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory D:\mule-netbeans-master\mule-netbeans-xml\src\main\resources
--- maven-compiler-plugin:2.5.1:compile (default-compile) @ mule-netbeans-xml ---
Compiling 2 source files to D:\mule-netbeans-master\mule-netbeans-xml\target\classes
--- maven-resources-plugin:2.5:testResources (default-testResources) @ mule-netbeans-xml ---
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory D:\mule-netbeans-master\mule-netbeans-xml\src\test\resources
--- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ mule-netbeans-xml ---
No sources to compile
--- maven-surefire-plugin:2.15:test (default-test) @ mule-netbeans-xml ---
Tests are skipped.
--- maven-jar-plugin:2.4:jar (default-jar) @ mule-netbeans-xml ---
Building jar: D:\mule-netbeans-master\mule-netbeans-xml\target\mule-netbeans-xml-0.5.jar
--- maven-install-plugin:2.3.1:install (default-install) @ mule-netbeans-xml ---
Installing D:\mule-netbeans-master\mule-netbeans-xml\target\mule-netbeans-xml-0.5.jar to C:\Users\harpreetsi\.m2\repository\org\mule\tooling\netbeans\mule-netbeans-xml\0.5\mule-netbeans-xml-0.5.jar
Installing D:\mule-netbeans-master\mule-netbeans-xml\pom.xml to C:\Users\harpreetsi\.m2\repository\org\mule\tooling\netbeans\mule-netbeans-xml\0.5\mule-netbeans-xml-0.5.pom
------------------------------------------------------------------------
Building Mule Support Plugin 0.8-SNAPSHOT
------------------------------------------------------------------------
--- maven-clean-plugin:2.4.1:clean (default-clean) @ mule-netbeans-plugin ---
Deleting D:\mule-netbeans-master\mule-netbeans-plugin\target
--- maven-resources-plugin:2.6:resources (default-resources) @ mule-netbeans-plugin ---
Using 'UTF-8' encoding to copy filtered resources.
Copying 39 resources
--- maven-compiler-plugin:2.5.1:compile (default-compile) @ mule-netbeans-plugin ---
Compiling 63 source files to D:\mule-netbeans-master\mule-netbeans-plugin\target\classes
--- nbm-maven-plugin:4.0.1:manifest (default-manifest) @ mule-netbeans-plugin ---
NBM Plugin generates manifest
Adding on module's Class-Path:
org.mule.tooling.netbeans:mule-netbeans-xml:jar:0.5
org.jdesktop:beansbinding:jar:1.2.1
--- maven-resources-plugin:2.6:testResources (default-testResources) @ mule-netbeans-plugin ---
Using 'UTF-8' encoding to copy filtered resources.
Copying 12 resources
--- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ mule-netbeans-plugin ---
Compiling 2 source files to D:\mule-netbeans-master\mule-netbeans-plugin\target\test-classes
--- maven-surefire-plugin:2.15:test (default-test) @ mule-netbeans-plugin ---
Tests are skipped.
--- maven-jar-plugin:2.4:jar (default-jar) @ mule-netbeans-plugin ---
Adding existing MANIFEST to archive. Found under: D:\mule-netbeans-master\mule-netbeans-plugin\target\classes\META-INF\MANIFEST.MF
Building jar: D:\mule-netbeans-master\mule-netbeans-plugin\target\mule-netbeans-plugin-0.8-SNAPSHOT.jar
--- nbm-maven-plugin:4.0.1:branding (default-branding) @ mule-netbeans-plugin ---
No branding to process.
--- nbm-maven-plugin:4.0.1:nbm (default-nbm) @ mule-netbeans-plugin ---
Copying module JAR to D:\mule-netbeans-master\mule-netbeans-plugin\target\nbm\netbeans\mule\modules with manifest updates
Generating Auto Update information for org.mule.tooling.netbeans
No updater.jar specified, cannot validate Info.xml against DTD
Building jar: D:\mule-netbeans-master\mule-netbeans-plugin\target\nbm\mule-netbeans-plugin-0.8-SNAPSHOT.nbm
--- maven-install-plugin:2.5:install (default-install) @ mule-netbeans-plugin ---
Installing D:\mule-netbeans-master\mule-netbeans-plugin\target\mule-netbeans-plugin-0.8-SNAPSHOT.jar to C:\Users\harpreetsi\.m2\repository\org\mule\tooling\netbeans\mule-netbeans-plugin\0.8-SNAPSHOT\mule-netbeans-plugin-0.8-SNAPSHOT.jar
Installing D:\mule-netbeans-master\mule-netbeans-plugin\pom.xml to C:\Users\harpreetsi\.m2\repository\org\mule\tooling\netbeans\mule-netbeans-plugin\0.8-SNAPSHOT\mule-netbeans-plugin-0.8-SNAPSHOT.pom
Installing D:\mule-netbeans-master\mule-netbeans-plugin\target\mule-netbeans-plugin-0.8-SNAPSHOT.nbm to C:\Users\harpreetsi\.m2\repository\org\mule\tooling\netbeans\mule-netbeans-plugin\0.8-SNAPSHOT\mule-netbeans-plugin-0.8-SNAPSHOT.nbm
------------------------------------------------------------------------
Building Mule Tools for NetBeans 1.1
------------------------------------------------------------------------
--- maven-clean-plugin:2.4.1:clean (default-clean) @ mule-netbeans ---
--- maven-install-plugin:2.3.1:install (default-install) @ mule-netbeans ---
Installing D:\mule-netbeans-master\pom.xml to C:\Users\harpreetsi\.m2\repository\org\mule\tooling\netbeans\mule-netbeans\1.1\mule-netbeans-1.1.pom
------------------------------------------------------------------------
Reactor Summary:
Mule Netbeans XML ................................. SUCCESS [5.716s]
Mule Support Plugin ............................... SUCCESS [23.561s]
Mule Tools for NetBeans ........................... SUCCESS [0.069s]
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 33.336s
Finished at: Thu May 04 09:30:43 IST 2017
Final Memory: 30M/394M
------------------------------------------------------------------------
#3
0
You need to set JAVA_HOME to your jdk7 home directory, for example on Microsoft Windows:
您需要将JAVA_HOME设置为jdk7主目录,例如在Microsoft Windows上:
"C:\Program Files\Java\jdk1.7.0_40" or on OS X:
“C:\ Program Files \ Java \ jdk1.7.0_40”或OS X:
/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home