Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Current Maven/ Gradle Repository for OCL
Current Maven/ Gradle Repository for OCL [message #1861847] Wed, 08 November 2023 04:57 Go to next message
Steve Hickman is currently offline Steve HickmanFriend
Messages: 56
Registered: August 2017
Member
Maven Central (https://central.sonatype.com/artifact/org.eclipse/ocl/overview), mvnrepository (https://mvnrepository.com/artifact/org.eclipse.ocl/org.eclipse.ocl), and the Apache Maven repo (https://repo.maven.apache.org/maven2/org/eclipse/ocl/) all stop at OCL 3.4, which was published in 2015.

Since we are now at 3.17, how should I reference them?

For Tycho builds, I can use the `target.target` file with this:

		
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
   <repository location="https://download.eclipse.org/modeling/mdt/ocl/updates/releases/6.17.1"/>
   <unit id="org.eclipse.ocl.all.feature.group" version="5.17.1.v20220309-0840"/>
   <unit id="org.eclipse.ocl.all.source.feature.group" version="5.17.1.v20220309-0840"/>
   <unit id="org.eclipse.ocl.examples.feature.group" version="6.17.1.v20220309-0840"/>
   <unit id="org.eclipse.ocl.examples.source.feature.group" version="6.17.1.v20220309-0840"/>
   <unit id="org.eclipse.ocl.examples.unified.feature.group" version="4.17.1.v20220309-0840"/>
   <unit id="org.eclipse.ocl.examples.unified.source.feature.group" version="4.17.1.v20220309-0840"/>
   <unit id="org.eclipse.ocl.master.feature.group" version="6.17.1.v20220309-0840"/>
   <unit id="org.eclipse.ocl.master.source.feature.group" version="6.17.1.v20220309-0840"/>
</location>


I need to use Gradle to create VS Code Extensions that use OCL validation. How do I reference these libraries in Gradle?
Re: Current Maven/ Gradle Repository for OCL [message #1861848 is a reply to message #1861847] Wed, 08 November 2023 05:53 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
The distributions you find at Maven Central date from the early days when enthusiasts populated Maven Central with 'good' things. Sadly these enthusiasts were disconnected from development teams and took on no responsibility for LTS. As an OCL developer, it was probably over five years before I realised that an embarrassment was available.

I have made various attempts to provide a better Maven support; see https://bugs.eclipse.org/bugs/show_bug.cgi?id=525996 but it is technology that I fail to understand. IMHO Eclipse provides OSGI Jars in a P2 repo and if there is a use case for a different flavour then, analogous to the unified SimRel P2 distribution, there should be a unified Maven distriubution using the same probably rather simple conversion tool for every SimRel P2 repo. Anyway the Bugzilla highlights how EF solutions seem to go obsolete so I'm glad I didn't spend more time pursuing them. A couple of correspondents made promising progress but not enough for me to take over.

Today, my understanding is that Tycho is a Maven Central tool that any Maven user can use and Tycho provides Eclipse P2 loading so it really shouldn't be difficult for a Maven user to use the SimRel P2 jars; it just needs an enthusiast to write the tutorial to demonstrate how easy it is. Anyway not really an OCL problem.

Sadly I have even less understanding of Gradle, other than an instinctive feeling that Maven, like Ant, as an XML-language, belongs back in the 1990s and anything that provides a real language ought to be much better. Once I see other Eclipse projects using Gradle with success I might look at it. At present I see many people struggling because Gradle doesn't seem to work right.

[Updated on: Wed, 08 November 2023 05:58]

Report message to a moderator

Re: Current Maven/ Gradle Repository for OCL [message #1861908 is a reply to message #1861848] Sun, 12 November 2023 16:30 Go to previous messageGo to next message
Steve Hickman is currently offline Steve HickmanFriend
Messages: 56
Registered: August 2017
Member
Should have an example available soon on how to do this with Gradle. Several links in the meantime:
* Bypassing OSGI and p2 complexities
* Using P2 repos with Gradle and Maven
* Background on conflict resolution
* Conflict resolution tool for Gradle

[Updated on: Sun, 12 November 2023 16:33]

Report message to a moderator

Re: Current Maven/ Gradle Repository for OCL [message #1862138 is a reply to message #1861908] Tue, 14 November 2023 18:11 Go to previous messageGo to next message
Steve Hickman is currently offline Steve HickmanFriend
Messages: 56
Registered: August 2017
Member
BTW - in response the Tycho/Maven comment, you are correct. It should be done automatically if you've picked Maven as your build system. OCL uses what I posted above. I don't know what else a tutorial would contain.

[Updated on: Tue, 14 November 2023 18:12]

Report message to a moderator

Re: Current Maven/ Gradle Repository for OCL [message #1862139 is a reply to message #1862138] Tue, 14 November 2023 21:00 Go to previous message
Steve Hickman is currently offline Steve HickmanFriend
Messages: 56
Registered: August 2017
Member
Something like this in the `build.gradle` file should provide OCL (and more) support:
	apply plugin: 'dev.equo.p2deps'
	apply plugin: "org.gradlex.java-ecosystem-capabilities"
	
	p2deps {
	     p2repo 'https://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.32.0/'
 	     p2repo 'https://download.eclipse.org/modeling/mdt/ocl/updates/releases/6.17.1/'
	     p2repo 'https://download.eclipse.org/modeling/emf/validation/updates/releases/'
	     p2repo 'https://download.eclipse.org/modeling/emf/emf/builds/release/latest/'
	     p2repo 'http://download.eclipse.org/modeling/mdt/uml2/updates/5.5/'
	    
	    install 'org.eclipse.ocl.pivot'
	    install 'org.eclipse.ocl.xtext.completeocl'
	    install 'org.eclipse.ocl'
	    install 'org.eclipse.ocl.xtext.oclstdlib'
	    install 'org.eclipse.xtext.util'
	    install 'org.eclipse.emf.codegen'
	    install 'org.eclipse.uml2.codegen.ecore'
//	  into (['compileOnly', 'testImplementation'], {
	    // https://github.com/equodev/equo-ide/blob/main/P2_MULTITOOL.md for more info
//	 	})
//	  into 'implementation', {
	    // you can also use the catalog to specify p2 repos and install units for you
	    // https://github.com/equodev/equo-ide/blob/main/CATALOG.md for more info
//	    cdt()
//	    m2e()
	  }

[Updated on: Tue, 14 November 2023 21:01]

Report message to a moderator

Previous Topic:Annotation error in OCL development environment
Next Topic:Examples of def: taking OclLambda parameter?
Goto Forum:
  


Current Time: Sun May 05 16:27:57 GMT 2024

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

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

Back to the top