|
Re: How to import Viatra via Maven [message #1826309 is a reply to message #1826308] |
Thu, 23 April 2020 10:03 |
Zoltan Ujhelyi 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 #1826319 is a reply to message #1826318] |
Thu, 23 April 2020 12:36 |
Hans van der Laan 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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04130 seconds