我已经使用这个原型创建了一个 maven android 项目。我想将mirah源文件集成到我的项目中。所以我将这里提到的插件添加到我的 pom.xml 中。我为插件设置了配置部分,将源目录指向 src/main/mirah。
但是当我运行mvn compile
它时,它只会编译 src/main/java 中的源代码。我已经尝试运行它mvn -X compile
来尝试调试问题,但我找不到与 mirah 或 mirah-maven-plugin 相关的任何内容。
它使用原型创建了两个项目 - project 和 project-it (tests) ,根目录中有一个 pom.xml ,project 和 project-it 目录中有一个 pom.xml 。我已经在根目录以及项目的 pom.xml 中尝试了上述配置。
我遇到了这个与使用build-helper 插件相关的问题,但我不知道它是否对我有帮助。因为我的mirah插件根本没有被调用。
这是做我想做的事情的正确方法吗?任何有关设置的帮助或有关如何解决此问题的指针将不胜感激。
我的 pom.xml 的相关位
<plugin>
<groupId>org.mirah.maven</groupId>
<artifactId>maven-mirah-plugin</artifactId>
<version>1.0</version>
<configuration>
<sourceDirectory>src/main/mirah</sourceDirectory>
<outputDirectory>target/classes</outputDirectory>
<bytecode>true</bytecode>
<verbose>false</verbose>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals><goal>compile</goal></goals>
</execution>
</executions>
</plugin>
根据下面的答案进行编辑。
我已经使用build-helper 插件添加了源目录,并且我可以mvn org.mirah.maven:maven-mirah-plugin:1.0:compile
从下面的答案中获取要编译的 mirah 源。但mvn compile
仍然只编译 src/main/java 而不是 src/main/mirah 中的源代码。
对于任何对mvn -X compile
这里的输出感兴趣的人来说是paste。