Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Epsilon standalone in Maven-based Project
Epsilon standalone in Maven-based Project [message #1801921] Tue, 29 January 2019 14:29 Go to next message
Luca Berardinelli is currently offline Luca BerardinelliFriend
Messages: 54
Registered: June 2010
Location: Vienna
Member
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

Re: Epsilon standalone in Maven-based Project [message #1801985 is a reply to message #1801921] Wed, 30 January 2019 10:30 Go to previous messageGo to next message
Luca Berardinelli is currently offline Luca BerardinelliFriend
Messages: 54
Registered: June 2010
Location: Vienna
Member
Hi all,
a partial answer is given here, i.e., using Tycho to build Eclipse plugin using Maven
https://www.eclipse.org/forums/index.php/m/1736339/?srch=epsilon+maven#msg_1736339

However, my goal is building independent Maven project and probably the solution is even simpler (missing dependency) but I do not understand if the missing dependency can be retrieved from Maven and then add a <dependency> in POM or I need to solve it in a different manner.

Luca


Luca Berardinelli

[Updated on: Wed, 30 January 2019 10:31]

Report message to a moderator

Re: Epsilon standalone in Maven-based Project [message #1801989 is a reply to message #1801985] Wed, 30 January 2019 12:47 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Luca,

It looks like you're missing a dependency on epsilon-emf [1].

Cheers,
Dimitris

[1] https://mvnrepository.com/artifact/org.eclipse.epsilon/epsilon-emf
Previous Topic:Problems with allInstances()
Next Topic:UML ecore file?
Goto Forum:
  


Current Time: Fri Apr 26 12:08:30 GMT 2024

Powered by FUDForum. Page generated in 0.03306 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top