Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » VIATRA » How to import Viatra via Maven
How to import Viatra via Maven [message #1826308] Thu, 23 April 2020 09:14 Go to next message
Hans van der Laan is currently offline Hans van der LaanFriend
Messages: 34
Registered: February 2020
Member
Hey,

I'm trying to import Viatra via Maven (https://mvnrepository.com/artifact/org.eclipse.viatra/viatra-transformation-runtime/2.3.2). Unfortunately, this seems to not be possible. All the jars are practically empty. They only contain the META-INF files, no .class files. This has been the cases for all releases.

Is there a reason why all jars are empty? How should I import Viatra via Maven?

Kind regards,
Hans
Re: How to import Viatra via Maven [message #1826309 is a reply to message #1826308] Thu, 23 April 2020 10:03 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 392
Registered: July 2015
Senior Member
Hi Hans,

this behaviour is by design, the viatra-transformation-runtime is only a wrapper for a few Eclipse plugins that will be loaded transitively when you declare a dependency on the given element. The Petri net simulator example [1] shows you how to create a project that includes VQL files to be translated to query generated code by the build and also includes dependencies to the transformation runtime. The example was created a few versions ago, but it should show what can you expect from our Maven integration.

The reasons for this approach are two-fold: (1) VIATRA is developed as a large number of plugins, but normally you would not require to manage them separately, so these references bundle them together in reusable form, and (2) the plugins of VIATRA are translated with Tycho and use dependencies from p2 repositories instead of Maven Central; the Maven wrapper plugins replace these dependencies with plain Maven ones, making it simpler to reuse outside Eclipse environments. This is not entirely the behaviour one expected from a Maven-based project, but VIATRA was developed as an Eclipse plugin first so there were some issues we had to work around when going for plain Java applications.

Best regards,
Zoltán


[1] https://git.eclipse.org/c/viatra/org.eclipse.viatra.examples.git/tree/transformation/petrinet-simulator-maven/org.eclipse.viatra.examples.petrinet.simulator/pom.xml
Re: How to import Viatra via Maven [message #1826318 is a reply to message #1826309] Thu, 23 April 2020 12:15 Go to previous messageGo to next message
Hans van der Laan is currently offline Hans van der LaanFriend
Messages: 34
Registered: February 2020
Member
Hey Zoltán,

Thank you very much for your quick reply.

I'm trying to get the petri-net simulator example to build so I can use it as a jumping off point for my own project. However, I can't get the xtend file to compile. During the building process, maven can not find the generated code of the queries. The IDE can find the generated code and I get no errors in the xtend editor.

Steps I've tried:
Maven clean of all projects
Maven Update Dependencies > Force Update of Snapshots / Releases
Maven verify install -e of org.eclipse.viatra.examples.petrinet

I'm not very experienced with Maven, so probably I overlooked something obvious. Would you be able to share how one should build this project?

The error:
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] org.eclipse.viatra.examples.petrinet                               [pom]
[INFO] org.eclipse.viatra.examples.petrinet.model                         [jar]
[INFO] org.eclipse.viatra.examples.petrinet.simulator                     [jar]
[INFO] 
[INFO] --< org.eclipse.viatra.examples.petrinet:org.eclipse.viatra.examples.petrinet >--
[INFO] Building org.eclipse.viatra.examples.petrinet 0.20.0-SNAPSHOT      [1/3]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ org.eclipse.viatra.examples.petrinet ---
[INFO] Installing C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\pom.xml to C:\Users\hans.vanderlaan\.m2\repository\org\eclipse\viatra\examples\petrinet\org.eclipse.viatra.examples.petrinet\0.20.0-SNAPSHOT\org.eclipse.viatra.examples.petrinet-0.20.0-SNAPSHOT.pom
[INFO] 
[INFO] --< org.eclipse.viatra.examples.petrinet:org.eclipse.viatra.examples.petrinet.model >--
[INFO] Building org.eclipse.viatra.examples.petrinet.model 0.20.0-SNAPSHOT [2/3]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ org.eclipse.viatra.examples.petrinet.model ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ org.eclipse.viatra.examples.petrinet.model ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 22 source files to C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.model\target\classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ org.eclipse.viatra.examples.petrinet.model ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ org.eclipse.viatra.examples.petrinet.model ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ org.eclipse.viatra.examples.petrinet.model ---
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ org.eclipse.viatra.examples.petrinet.model ---
[INFO] Building jar: C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.model\target\org.eclipse.viatra.examples.petrinet.model-0.20.0-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ org.eclipse.viatra.examples.petrinet.model ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ org.eclipse.viatra.examples.petrinet.model ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ org.eclipse.viatra.examples.petrinet.model ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ org.eclipse.viatra.examples.petrinet.model ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ org.eclipse.viatra.examples.petrinet.model ---
[INFO] Skipping execution of surefire because it has already been run for this configuration
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ org.eclipse.viatra.examples.petrinet.model ---
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ org.eclipse.viatra.examples.petrinet.model ---
[INFO] Installing C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.model\target\org.eclipse.viatra.examples.petrinet.model-0.20.0-SNAPSHOT.jar to C:\Users\hans.vanderlaan\.m2\repository\org\eclipse\viatra\examples\petrinet\org.eclipse.viatra.examples.petrinet.model\0.20.0-SNAPSHOT\org.eclipse.viatra.examples.petrinet.model-0.20.0-SNAPSHOT.jar
[INFO] Installing C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.model\pom.xml to C:\Users\hans.vanderlaan\.m2\repository\org\eclipse\viatra\examples\petrinet\org.eclipse.viatra.examples.petrinet.model\0.20.0-SNAPSHOT\org.eclipse.viatra.examples.petrinet.model-0.20.0-SNAPSHOT.pom
[INFO] 
[INFO] --< org.eclipse.viatra.examples.petrinet:org.eclipse.viatra.examples.petrinet.simulator >--
[INFO] Building org.eclipse.viatra.examples.petrinet.simulator 0.20.0-SNAPSHOT [3/3]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- build-helper-maven-plugin:1.8:add-source (default) @ org.eclipse.viatra.examples.petrinet.simulator ---
[INFO] Source directory: C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java added.
[INFO] Source directory: C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\generated-sources\patterns added.
[INFO] Source directory: C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\generated-sources\xtend added.
[INFO] 
[INFO] --- viatra-maven-plugin:2.0.0.M4:generate (default) @ org.eclipse.viatra.examples.petrinet.simulator ---
[INFO] Can't find VIATRA Generator properties under C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator/.settings/org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguage.prefs, maven defaults are used.
[INFO] Encoding: UTF-8
[INFO] Compiler source level: 1.8
[INFO] Compiler target level: 1.8
[INFO] Using common types.
[INFO] Collecting source models.
[INFO] Installing type provider.
[INFO] Generating stubs into C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\target\xtext-temp\stubs
[INFO] Compiling stubs located in C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\target\xtext-temp\stubs
[INFO] Installing type provider for stubs.
[INFO] Validate and generate.
[INFO] Starting validation for input: 'PetriNetSimulatorQueries.vql'
[INFO] Starting generator for input: 'PetriNetSimulatorQueries.vql'
[INFO] 
[INFO] --- xtend-maven-plugin:2.13.0:compile (default) @ org.eclipse.viatra.examples.petrinet.simulator ---
[WARNING] Compilation of stubs had errors.
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
32: PetriNetSimulatorQueries cannot be resolved to a type.
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
32: PetriNetSimulatorQueries cannot be resolved to a type.
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
45: The method or field sourcePlace is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
46: The method or field pl is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
49: The method or field targetPlace is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
50: The method or field pl is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
53: The method or field fireableTransition is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
55: The method or field t is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
58: The method or field t is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
64: The method or field fireableTransition is undefined for the type AdvancedViatraQueryEngine
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
64: The method or field prettyPrint is undefined for the type Object
[WARNING] 
WARNING: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
15: The import 'org.eclipse.viatra.transformation.evm.specific.RuleEngines' is never used.
[WARNING] 
WARNING: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
21: The import 'org.eclipse.viatra.transformation.evm.specific.event.ViatraQueryEventRealm' is never used.
[WARNING] 
WARNING: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
14: The import 'org.eclipse.viatra.transformation.evm.api.RuleEngine' is never used.
[WARNING] 
WARNING: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
32: The extension PetriNetSimulator.queries is not used
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for org.eclipse.viatra.examples.petrinet 0.20.0-SNAPSHOT:
[INFO] 
[INFO] org.eclipse.viatra.examples.petrinet ............... SUCCESS [  0.215 s]
[INFO] org.eclipse.viatra.examples.petrinet.model ......... SUCCESS [  1.692 s]
[INFO] org.eclipse.viatra.examples.petrinet.simulator ..... FAILURE [ 11.829 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13.827 s
[INFO] Finished at: 2020-04-23T14:05:50+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.xtend:xtend-maven-plugin:2.13.0:compile (default) on project org.eclipse.viatra.examples.petrinet.simulator: Error compiling xtend sources in 'C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java;C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\generated-sources\patterns'. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.xtend:xtend-maven-plugin:2.13.0:compile (default) on project org.eclipse.viatra.examples.petrinet.simulator: Error compiling xtend sources in 'C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java;C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\generated-sources\patterns'.
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error compiling xtend sources in 'C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java;C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\generated-sources\patterns'.
	at org.eclipse.xtend.maven.AbstractXtendCompilerMojo.compile(AbstractXtendCompilerMojo.java:176)
	at org.eclipse.xtend.maven.XtendCompile.internalExecute(XtendCompile.java:62)
	at org.eclipse.xtend.maven.AbstractXtendMojo.execute(AbstractXtendMojo.java:39)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
	... 20 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :org.eclipse.viatra.examples.petrinet.simulator
Re: How to import Viatra via Maven [message #1826319 is a reply to message #1826318] Thu, 23 April 2020 12:36 Go to previous messageGo to next message
Hans van der Laan is currently offline Hans van der LaanFriend
Messages: 34
Registered: February 2020
Member
Not sure if it's helpful, but when I try to build the project with IntelliJ (instead of eclipse), I get the same errors.

(edit: since they are the same, I don't think it has to do with my eclipse configuration.)

[INFO] 
[INFO] --- xtend-maven-plugin:2.13.0:compile (default) @ org.eclipse.viatra.examples.petrinet.simulator ---
[WARNING] Compilation of stubs had errors.
Compilation of stubs had errors.


[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
32: PetriNetSimulatorQueries cannot be resolved to a type.
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
32: PetriNetSimulatorQueries cannot be resolved to a type.
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
45: The method or field sourcePlace is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
46: The method or field pl is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
49: The method or field targetPlace is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
50: The method or field pl is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
53: The method or field fireableTransition is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
55: The method or field t is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
58: The method or field t is undefined
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
64: The method or field fireableTransition is undefined for the type AdvancedViatraQueryEngine
[ERROR] 
ERROR: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
64: The method or field prettyPrint is undefined for the type Object
[WARNING] 
WARNING: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
15: The import 'org.eclipse.viatra.transformation.evm.specific.RuleEngines' is never used.
[WARNING] 
WARNING: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
21: The import 'org.eclipse.viatra.transformation.evm.specific.event.ViatraQueryEventRealm' is never used.
[WARNING] 
WARNING: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
14: The import 'org.eclipse.viatra.transformation.evm.api.RuleEngine' is never used.
[WARNING] 
WARNING: 	PetriNetSimulator.xtend - C:\Users\hans.vanderlaan\eclipse-workspace\example\transformation\petrinet-simulator-maven\org.eclipse.viatra.examples.petrinet.simulator\src\main\java\org\eclipse\viatra\examples\petrinet\simulator\PetriNetSimulator.xtend
32: The extension PetriNetSimulator.queries is not used

[Updated on: Thu, 23 April 2020 13:25]

Report message to a moderator

Re: How to import Viatra via Maven [message #1826338 is a reply to message #1826319] Thu, 23 April 2020 17:03 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 392
Registered: July 2015
Senior Member
Hi Hans,

I tried to reproduce your issue by running the generation on my computer, but I was not able to reproduce the issue but had another one that was caused by underlying version range declarations inside necessary Xtext plugins (and that were already fixed in Xtext versions newer than the example used). I increased the related versions and after that point, the example compiled cleanly with the command `mvn clean install`. The related changes are added to commit [1] and also executed in on our build server in [2].

Can you please check that updating the version solves your issue? I am not exactly sure whether the thing you have seen is related, but it might be worth a try.

Best regards,
Zoltán

[1] https://git.eclipse.org/c/viatra/org.eclipse.viatra.examples.git/commit/?id=32e3d1e5eabe74faff071e6476ed14cc0f33da8a
[2] https://ci.eclipse.org/viatra/job/viatra-petrinet-example-mavenbuild/43/console
Re: How to import Viatra via Maven [message #1826365 is a reply to message #1826338] Fri, 24 April 2020 06:40 Go to previous message
Hans van der Laan is currently offline Hans van der LaanFriend
Messages: 34
Registered: February 2020
Member
Hey Zoltán,

Updating the dependencies solved the issue! Everything compiles as it should now. Thank you very much!

On a small side note, perhaps it's a good idea to reference this example in the documentation about the maven intergration [1]?
It shows quite well how you could organize your poms/projects, gives users something working they can download and experiment with and it is quite a bit more concise then the referenced CPS example tests project [2].

Kind regards,
Hans van der Laan

[1] https://www.eclipse.org/viatra/documentation/query-tools.html
[2] https://git.eclipse.org/c/viatra/org.eclipse.viatra.git/tree/query/tests/org.eclipse.viatra.query.runtime.cps.tests

[Updated on: Fri, 24 April 2020 06:41]

Report message to a moderator

Previous Topic:Create CheckConstraint
Next Topic:Matches not send to change listener
Goto Forum:
  


Current Time: Thu Mar 28 15:03:48 GMT 2024

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

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

Back to the top