将xtend项目转换为maven项目

时间:2017-12-22 10:48:44

标签: maven xtend

对于与项目相关的工作,我正在使用Xtend编程。在我的eclipse工作区中,大约有10个项目,并且所有这些项目都相互依赖,还有一些其他插件也是我需要的所以我将这些插件添加到目标中。现在我我需要将所有项目转换为Maven项目,我试图转换[configure - >转换为maven项目],但在META-INF导出部分,如果我从导出部分中删除了包含其他显示导入错误的项目,则显示错误。如果你有任何想法请帮助我。

谢谢

1 个答案:

答案 0 :(得分:0)

请勿尝试转换它,只需创建一个为maven打包的新Xtend项目。

(您可以将其导入eclipse,导入...现有的maven项目)然后在src / main / java中包含您的源代码,并在pom.xml中包含您的依赖项

从文档中,这里是用于创建项目的CLI ::

mvn archetype:generate -DarchetypeGroupId=org.eclipse.xtend -DarchetypeArtifactId=xtend-archetype

这是我生成的项目的一个(旧的)示例,带有用于分发的assermbly打包 https://github.com/pdemanget/examples/tree/master/xtend/message-send

文档 https://www.eclipse.org/xtend/download.html

Basicaly它在maven插件中使用Xtend编译器,将其添加到pom.xml

<dependency>
  <groupId>org.eclipse.xtend</groupId>
  <artifactId>org.eclipse.xtend.lib</artifactId>
  <version>2.13.0</version>
</dependency>

和Xtend编译器插件:

<plugin>
  <groupId>org.eclipse.xtend</groupId>
  <artifactId>xtend-maven-plugin</artifactId>
  <version>2.13.0</version>
  <executions>
    <execution>
      <goals>
        <goal>compile</goal>
        <goal>testCompile</goal>
      </goals>
      <configuration>
        <outputDirectory>${project.build.directory}/xtend-gen/main</outputDirectory>
        <testOutputDirectory>${project.build.directory}/xtend-gen/test</testOutputDirectory>
      </configuration>
    </execution>
  </executions>
相关问题