1

我正在尝试使用 maven 执行 acceleo 项目。这是 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

我认为它与我要生成文件的输出文件有关。有人对此有任何想法吗?先感谢您。

4

0 回答 0