3

For project related work I am using Xtend programming.In my eclipse workspace, around 10 projects are there and all these projects are dependent on each other and some other plugins also I needed so I added those plugins to the target.Now I need to convert all projects into Maven project, I tried to convert[configure-->convert to maven project] but in META-INF exported section it showing an error if I removed packages from exported section other projects showing import error.If you have any idea please help me on these.

Thanks

goodman
  • 424
  • 8
  • 24

1 Answers1

1

Don't try to convert it, just create a new Xtend project packaged for maven.

(You can import it into eclipse, import...existing maven project) then include your sources in src/main/java, and your dependencies in the pom.xml

From the documentation, here is the CLI to create the project: :

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

Here is an (old) example of a project i have generated, with an assermbly packaging for distribution https://github.com/pdemanget/examples/tree/master/xtend/message-send

Documentation https://www.eclipse.org/xtend/download.html

Basicaly it uses the Xtend compiler in a maven plugin, by adding this to the pom.xml

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

and the Xtend compiler plugin:

<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>
pdem
  • 3,880
  • 1
  • 24
  • 38