Epsilon standalone in Maven-based Project [message #1801921] |
Tue, 29 January 2019 14:29 |
|
Hi all,
I am trying to use Epsilon in a standalone mode.
I tried the standalone examples in the git repo and they work fine, e.g. org.eclipse.epsilon.examples.standalone.egl
Now, I am trying to run the same code from a Java project where the dependencies are managed via Maven (.pom) instead of Eclipse (build.properties).
In this Maven project I put the following dependency
<dependency>
<groupId>org.eclipse.epsilon</groupId>
<artifactId>epsilon-core</artifactId>
<version>1.5.1</version>
</dependency>
I copy pasted sources from org.eclipse.epsilon.examples.standalone to an existing Maven project where I added only this new dependency to epsilon.core
Then I want to build an executable jar file with all dependencies. Therefore, my pom.xml contains the following build instructions
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>standalone.Main</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>assemble-all</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
At this stage, I have no extra dependencies, therefore the /lib folder added to the classpath in <build></build> is empty. Since I am using Maven, I prefer to keep it empty and manage all possible dependencies using Maven.
When I build my Maven project, then I get BUILD FAILURE where I read
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project standalone: Compilation failure: Compilation failure:
[ERROR] /Users/lucaberardinelli/GitHub/BrainTribe/Repositories/TEMP/unversioned/workspaces/temp2/standalone/src/main/java/examples/standalone/EpsilonStandaloneExample.java:[19,35] package org.eclipse.epsilon.emc.emf does not exist
Can I manage similar dependency problem directly in Maven?
Best Regards,
Luca
Luca Berardinelli
[Updated on: Tue, 29 January 2019 16:05] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03306 seconds