我跟隨this tutorial。 當我建立與依賴我碰到下面的堆棧跟蹤:Netbeans項目不能運行Maven
Test set: com.mycompany.mavenplatformwordapp.ApplicationTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.75 sec <<< FAILURE!
[email protected](org.netbeans.junit.NbModuleSuite$S) Time elapsed: 0.721 sec <<< ERROR!
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.netbeans.junit.NbModuleSuite$S.runInRuntimeContainer(NbModuleSuite.java:915)
at org.netbeans.junit.NbModuleSuite$S.access$100(NbModuleSuite.java:670)
at org.netbeans.junit.NbModuleSuite$S$1.protect(NbModuleSuite.java:691)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at org.netbeans.junit.NbModuleSuite$S.run(NbModuleSuite.java:687)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:113)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.NoClassDefFoundError: org/openide/util/BaseUtilities
at org.openide.util.Utilities.isUnix(Utilities.java:313)
at org.openide.util.Utilities.<clinit>(Utilities.java:222)
at org.netbeans.JarClassLoader$JarSource.toURI(JarClassLoader.java:467)
at org.netbeans.JarClassLoader$JarSource.<init>(JarClassLoader.java:438)
at org.netbeans.JarClassLoader$Source.create(JarClassLoader.java:387)
at org.netbeans.JarClassLoader.<init>(JarClassLoader.java:157)
at org.netbeans.JarClassLoader.<init>(JarClassLoader.java:141)
at org.netbeans.MainImpl$BootClassLoader.<init>(MainImpl.java:256)
at org.netbeans.MainImpl.execute(MainImpl.java:175)
at org.netbeans.MainImpl.main(MainImpl.java:85)
at org.netbeans.Main.main(Main.java:78)
... 22 more
Caused by: java.lang.ClassNotFoundException: org.openide.util.BaseUtilities
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 33 more
,出現以下錯誤:
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test (default-test) on project MavenPlatformWordApp-app: There are test failures.
現在,作爲Tunaki建議我得到:未能執行目標org.codehaus.mojo:NBM-Maven的插件:3.13:羣集應用程序(缺省支持羣集應用程序)MavenPlatformWordApp-app:無法從存儲庫中檢索nbm文件:無法找到工件org.codeartisans.thirdparties.swing:org-openide-util:nbm:8.6.2 in netbeans(http://bits.netbeans .org/nexus/content/groups/netbeans /) 嘗試從項目網站手動下載文件。 –
我編輯我的職務(你應該在我的崗位,而不是你的問題發表評論) – Tunaki