java.lang.NullPointerException用maven执行accelo

时间:2012-09-19 15:54:53

标签: maven acceleo

我正在尝试使用maven执行加速项目。 这是pom配置:

的pom.xml

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>1.2.1</version>
    <configuration>
        <mainClass>src.AcceleoProject.files.Generate</mainClass>
        <arguments>
            <argument>/${project.basedir}/src/main/java/src/AcceleoProject/files/model.uml</argument>
            <argument>/${project.basedir}/src/main/java/src/AcceleoProject/files/out</argument>
        </arguments>

    </configuration>
</plugin>

错误

当我执行pom时,我收到以下错误:

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
    at org.eclipse.core.internal.runtime.InternalPlatform.getBundle(InternalPlatform.java:861)
    at org.eclipse.core.runtime.Platform.getBundle(Platform.java:1185)
    at org.eclipse.acceleo.common.internal.utils.workspace.BundleURLConverter.resolveBundle(BundleURLConverter.java:186)
    at org.eclipse.acceleo.common.internal.utils.workspace.BundleURLConverter.resolveAsPlatformPlugin(BundleURLConverter.java:137)
    at org.eclipse.acceleo.engine.internal.environment.AcceleoEvaluationEnvironment.loadDynamicModules(AcceleoEvaluationEnvironment.java:763)
    at org.eclipse.acceleo.engine.internal.environment.AcceleoEvaluationEnvironment.mapDynamicOverrides(AcceleoEvaluationEnvironment.java:899)
    at org.eclipse.acceleo.engine.internal.environment.AcceleoEvaluationEnvironment.<init>(AcceleoEvaluationEnvironment.java:139)
    at org.eclipse.acceleo.engine.internal.environment.AcceleoEnvironmentFactory.createEvaluationEnvironment(AcceleoEnvironmentFactory.java:124)
    at org.eclipse.ocl.internal.evaluation.QueryImpl.getEvaluationEnvironment(QueryImpl.java:286)
    at org.eclipse.ocl.ecore.QueryImpl.getEvaluationEnvironment(QueryImpl.java:74)
    at org.eclipse.acceleo.engine.generation.AcceleoEngine.doEvaluate(AcceleoEngine.java:268)
    at org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate(AcceleoEngine.java:145)
    at org.eclipse.acceleo.engine.service.AcceleoService.doGenerateTemplate(AcceleoService.java:869)
    at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate(AcceleoService.java:575)
    at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.generate(AbstractAcceleoGenerator.java:188)
    at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.doGenerate(AbstractAcceleoGenerator.java:158)
    at src.AcceleoProject.files.Generate.doGenerate(Generate.java:197)
    at src.AcceleoProject.files.Generate.main(Generate.java:159)
    ... 6 more

我认为它与我希望生成文件的输出文件有关。 有人对此有所了解吗? 提前谢谢。

0 个答案:

没有答案