2

我想创建一个 jboss forge 插件,但我在运行 forge 时遇到了很多问题......

当我在 Eclipse 中或从命令提示符开始锻造时,它需要很长时间,然后我总是得到这个巨大的异常。(见底部)

然后当我创建我的插件项目并想设置插件 API 时。Forge 冻结了大约 1 分钟,然后给了我这个异常

Wrote <pathtoworkspace>/pluginforge/pom.xml
***ERROR*** Exception encountered: null (type "set VERBOSE true" to enable stack traces)

之后我的 pom.xml 被关于 jboss-javaee-6.0 的依赖破坏了

重新安装 jboss 开发工具也没有帮助。cmd提示符和eclipse集成产生相同的问题..我不知道该怎么做......已经在这上面浪费了几个小时......希望有人能提供帮助。

启动异常:

Error during PostStartup event
java.lang.NullPointerException
    at java.lang.String.contains(String.java:2076)
    at org.apache.maven.model.building.DefaultModelBuilder.containsCoordinates(DefaultModelBuilder.java:1047)
    at org.apache.maven.model.building.DefaultModelBuilder.importDependencyManagement(DefaultModelBuilder.java:948)
    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:403)
    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:374)
    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:365)
    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:141)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:102)
    at org.jboss.forge.maven.facets.MavenCoreFacetImpl.getPartialProjectBuildingResult(MavenCoreFacetImpl.java:86)
    at org.jboss.forge.maven.facets.MavenCoreFacetImpl.resolveProperties(MavenCoreFacetImpl.java:304)
    at org.jboss.forge.maven.facets.MavenDependencyFacet.resolveProperties(MavenDependencyFacet.java:393)
    at org.jboss.forge.maven.facets.MavenDependencyFacet.hasEffectiveDependency(MavenDependencyFacet.java:171)
    at org.jboss.forge.spec.javaee.BaseJavaEEFacet.isInstalled(BaseJavaEEFacet.java:64)
    at org.jboss.forge.spec.javaee.cdi.CDIFacetImpl.isInstalled(CDIFacetImpl.java:51)
    at org.jboss.forge.project.BaseProject.registerFacet(BaseProject.java:153)
    at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:208)
    at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:186)
    at org.jboss.forge.project.services.ProjectFactory.registerFacets(ProjectFactory.java:178)
    at org.jboss.forge.project.services.ProjectFactory.findProjectRecursively(ProjectFactory.java:117)
    at org.jboss.forge.shell.project.ProjectInitializer.doInit(ProjectInitializer.java:92)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
    at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
    at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
    at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
    at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
    at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
    at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
    at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
    at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:628)
    at org.jboss.weld.event.EventImpl.fire(EventImpl.java:75)
    at org.jboss.forge.shell.project.ProjectInitializer.postStartupTrigger(ProjectInitializer.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
    at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
4

1 回答 1

0

一个非常晚的答案,但我希望这可以帮助其他遇到此问题的人。这看起来像您在 Maven 依赖解析方面遇到了问题。要么失败,要么是 sloe,或者依赖项正在下载但超时。

当您在 Forge 中更改项目上下文时,即您cd进入项目目录,或者当您运行修改项目依赖层次结构的命令时,Forge 将尝试部分或完整的 Maven 构建。此构建的一个方面是依赖项解析过程,该过程试图确保任何依赖项,尤其是激活 Forge 方面所需的依赖项在您的本地 Maven 存储库中可用。

对于 Forge 1.4.0+(尤其是即将发布的 1.4.1)版本,如果在任何时候依赖解析失败,shell 应该在该区域输出任何警告。

作为提示,最好使用 Maven 存储库管理器(如 Nexus 或 Artifactory),这将大大降低工件下载缓慢或超时的可能性。

于 2013-09-04T15:15:06.507 回答