Open eclipse-ocl-bot opened 1 month ago
By Ed Willink on Nov 18, 2017 05:42
Bug 527438 raised to get https://repo.eclipse.org project repos.
Then just follow the instructions at https://wiki.eclipse.org/Services/Nexus#Releases_Group
By Ed Willink on Apr 23, 2018 04:42
Bug 404602 has been marked as a duplicate of this bug.
By Ed Willink on Apr 20, 2020 05:41
(In reply to Ed Willink from comment #1)
Then just follow the instructions at https://wiki.eclipse.org/Services/Nexus#Releases_Group
I've tried. Very painful, see Bug 527438. Bug 562307 raised.
Until cleaned up, there is experimental content in https://repo.eclipse.org/content/repositories/ocl-snapshots/
By Ed Willink on Apr 20, 2020 06:21
Unless someone rides to the rescue on Bug 562307, this Bug is likely to remain in limbo for a few more years. I will be requesting a clean-up of https://repo.eclipse.org/content/repositories/ocl-snapshots/ since the facility is unsupported and a one-off snapshot is probably more damaging than helpful.
By Horacio Hoyos on Apr 07, 2021 13:03
Hi Ed,
I've come up with a partial solution, as it does not allow you to use p2 repositories directly in maven. However, it addressed the issue of publishing a p2 repo into a maven repository either local or remote. So after you publish OCL, you can use this tool to automate the push to maven.
Its an initial prototype with room for improvement:
https://github.com/KinoriTech/p2mvn
PR and bugs are welcome
By Ed Willink on Apr 08, 2021 03:24
(In reply to Horacio Hoyos from comment #5)
I've come up with a partial solution
Thanks for communicating. You are probably right that publishing in P2 in Maven minimises downstream user trouble; just one standard reference analogous to other standard references. No esoteric load-a-P2-adapter/connector to configure/install.
I am very reluctant to add to my list of releng commitments that burn time each year for zero benefit to me but I would like to solve this problem...
Usage: Currently https://ci.eclipse.org/ocl/job/promoter/ takes the update site from the build and uses downloads.sh and updates.sh to publish the ZIPped downloads and P2 updates locations. I would like to just add e.g. a mavens.sh to publish to a third location; possibly mavencentral possibly repo.eclipse.
Distribution: Windows defender does not allow me to run your p2mvn.exe so I'm unclear how I can download something to run on the Eclipse repo server. May be it would have to be provided by CBI. Maybe that is why the existing tools rely on shell+ant scripts.
Installation: I failed at installing into repo.eclipse because I failed to understand the semantics of snapshots and not-snashots. Your README reminds me of the pain. I recall that Eclipse/Maven have a versioning problem with Eclipse incrementing before the first change and Maven after the last change. A significant issue for milestones but not an issue if releases only. Perhaps not a problem with four part versions that always churn because Tycho cannot compute not-changed reliably. I don't understand Maven. I have many fully released P2 repos. I just want to present each exactly the same in Maven; no idea how. Versions / snapshots seem to get in the way.
Transitive Usage: Just supposing OCL was in a useful Maven repo, is that any use without parts of the platform, EMF, UML2, Xtext, ... ? I note that others have put OCL in Maven in the past so may be whatever is needed could be published by OCL...
By pere joseph rodríguez on Sep 26, 2021 13:49
You can download all Manifest.MF dependencies as Maven dependencies using tycho.\ Have a look an example at:\ https://github.com/perelengo/net.samsarasoftware.install-dependencies/blob/master/pom.xml
I allways have to create a module called "install-dependencies" to make any project download dependencies and work with maven because tycho doesn't work well at all.
then can use them as:\
I can use OCL, QVT, and many others like this, as you can see at:\ https://github.com/perelengo/net.samsarasoftware.m2m.qvto/blob/master/pom.xml
Hope this helps.
By pere joseph rodríguez on Sep 26, 2021 14:09
By the way, just had a look at https://repo.eclipse.org/\ Didntt know It was there.\ IMHO It's the kind of stuff a Maven user needs I think. Just hope all dependencies are there.
By Ed Willink on Sep 27, 2021 01:54
(In reply to pere joseph rodríguez from comment #7)
I can use OCL, QVT, and many others like this, as you can see at: https://github.com/perelengo/net.samsarasoftware.m2m.qvto/blob/master/pom.xml
Thanks but as always with pom.xml, there is assumed knowledge that the would be re-user (me included) does not have.
It would be really helpful to provide an entry on perhaps https://wiki.eclipse.org/Tycho/FAQ explaining how easy it is for a 'pure' Maven user to exploit Tycho to access Eclipse distributions. I can see that since Tycho is available in Maven central, Tycho functionality is available after a reference just like any other maven plugin, and that
<dependency> <groupId>p2.eclipse-plugin</groupId> <artifactId>org.eclipse.ocl</artifactId> <version>3.5.0.v20150521-1211</version> </dependency>
This looks really painful once 20 or more versions are involved and updated every three months.
I have not noticed a POM include facility. If there is, it would be fairly simple to autogenerate a org.eclipse.ocl.master-feature-pom.xml for each Eclipse feature so that all corresponding versions were automatically provided after specifying just one version. In the absence of an include I guess even a cut and paste source would be better than nothing.
(In reply to pere joseph rodríguez from comment #8)
just had a look at https://repo.eclipse.org/
I get the impression that this is going out of fashion because it doesn't seem to solve the real problem.
By pere joseph rodríguez on Sep 27, 2021 04:01
I will try to explain Tycho the way I use it for multi-projects.\ In my case I use production P2 repositories.
First you generate a parent pom.xml that will define the config that child modules will inherit:
Here comes a non-eclipse-plugin project pom that will inherit the previous maven config, and will release a artifact:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\
By Ed Willink on Sep 27, 2021 04:46
Thanks. I tried studying your examples, but unfortunately Bugzilla seems to have lost the ability to show long lines in comments so that the linewrap is horrible.
Could you please attach the preceding examples as a ZIP where the file names and folder structure would also be clearer.
By pere joseph rodríguez on Sep 27, 2021 05:45
Created attachment 287212 tycho project example
Upload tycho examples for eclipse-projects and non eclipse projects. The eclipse-plugin project has its basic layout folders
root:
Notice that in the MANIFEST.MF, the bundle-version contains the .qualifier, nedded to release with maven, but I think is not needed to compile, so prefer not to put it as it allows to test as PDE when launching a new Eclipse instance to test PDE plugins: Bundle-Version: 0.0.1.qualifier
The non eclipse plugin project has a default maven project layout: root:
The profiles of the parent pom include the install-dependencies profile.
:compression: tycho-example.zip
By pere joseph rodríguez on Sep 27, 2021 05:52
If need examples on how to run Acceleo with maven, can help too.
By Ed Willink on Sep 27, 2021 07:11
(In reply to pere joseph rodríguez from comment #13)
If need examples on how to run Acceleo with maven, can help too.
That would be pretty magic. I gave up trying to do anything other than interactive with Acceleo a couple of years before I gave up on Acceleo altogether.
By pere joseph rodríguez on Sep 28, 2021 04:22
Hi Ed, \ Sorry can't provide a base project right now, but can guide some steps on how to produce them. My current code refers to Eclipse MARS Acceleo release (still haven't upgraded...)
could you please download these projects?
https://github.com/perelengo/net.samsarasoftware -- For the tycho config\ https://github.com/perelengo/net.samsarasoftware.install-dependencies -- to download needed eclipse-plugins as maven dependencies\ https://github.com/perelengo/org.eclipse.acceleo.module.samsarasoftware.sql.custom -- a sample project compiled with Acceleo
and run mvn clean install in the same order?\ Then, import them in eclipse as new maven projects.
Create a new Acceleo project, and move all the Acceleo project stuff to the org.eclipse.acceleo.module.samsarasoftware.sql.custom
Then on the Acceleo runner class, modify the registerPackages method with the one you can find at (and all its dependent methods):
This method is the key. It registers all emf stuff and uml profiles in standalone mode, and also maps maven (target/classpath) as plugin and resource URIS. This allows to run the same project from maven and from eclise at the same time. (this was really hard to implement, as my knowledge of emf at that time was very low).
If you want a special improvement of Acceleo for MARS, have a look at this feature: https://git.eclipse.org/r/c/acceleo/org.eclipse.acceleo/+/152865
By pere joseph rodríguez on Sep 28, 2021 10:42
I have to note that using the p2 repository as a maven repository layout does not include dependencies, so nobody could guess which dependencies would be needed to compile a jar that used OCL in this way. (EMF, ...)
The https://repo.eclipse.org/ is the perfect solution for people not developing eclipse-plugins.
The tycho solution works to compile eclipse plugins from maven.
SNAPSHOTS are the same as development versions, and for example, the repo.eclipse.org for snapshots would be the same as the P2 nighly update site
By Ed Willink on Sep 29, 2021 02:18
Forgot to save this.
(In reply to pere joseph rodríguez from comment #12)
tycho project example
Thanks. I sort of understand it, but I suspect that there is quite a bit of cosmetic bloat for licenses....
I'm puzzled by the target-platform-configuration that appears to use a ${eclipse-site}. I would expect a
<target>\
<artifact>\
<groupId>org.eclipse.ocl</groupId>\
<artifactId>org.eclipse.ocl.releng.tycho</artifactId>\
<version>6.17.0-SNAPSHOT</version>\
<classifier>${targetPlatform}</classifier>\
</artifact>\
</target>
to delegate, but no doubt the external file that I am familiar with is unnecessarily powerful.
The non-eclipse-plugin looks nice and simple, but has a tediously fragile/precise dependency. It would be much nicer if the parent could express a single dependency on a particular OCL release and either exploit a mojo to auto-analyze to the diverse plugin versions or to load an auto-generated pom.xml include with appropriately formatted dependencies. If someone defines the format of a pom.xml include that can be used, I can make sure it is autogenerated, probably to the root of the distribution.
By Ed Willink on Sep 29, 2021 02:23
(In reply to pere joseph rodríguez from comment #16)
The https://repo.eclipse.org/ is the perfect solution ... snapshots
IIRC failure to understand snapshots was where I came unstuck with providing OCL via repo.eclipse.org.
Bottom line. My problem is that I have never used Maven for normal development and see no need for it. I have only used Maven behind M2E / Tycho to build distributions. I am therefore ignorant of some key terminologies and principles and certainly ignorant of what users might actually want. To me the Eclipse IDE builders augmented by MWE2 scripts are very adequate.
You seem to have produced something close but observed that transitive dependencies are a nightmare.
I have offered to autogenerate something that could be very helpful, but since I'm only guessing at what is needed, I need strong guidance.
By pere joseph rodríguez on Oct 04, 2021 12:04
I don't know deeply how you release OCL or other artifacts, but can tell you something about Maven:
-To release the same artifact for different minor versions of Java, you have to use another group / artifact combination because can't define different plugins configuration per classifier.
-The same applies for dependencies, cant define different dependencies on a per classifier basis.
-Different maven repositories (as one per eclipse site repo) for same group + artifact is not valid solution, due to local repo cache.
A real-life example i could imagine would be using QVTO + OCL in standalone environment.
By Ed Willink on Oct 04, 2021 13:12
The OCL distributions are one size fits all. Users can choose which subsets they like. They work on all versions above some minimum. Java 5 for Classic OCL, Java 8 for Pivot OCL, Java 11 for UI. There is reflective compatibility code to adapt to changes in Xtext, EMF, UML2. (Maintaining multiple releases is just too hard. A single release can just be tested on all platforms.)
By pere joseph rodríguez on Oct 18, 2021 10:37
Hi,\ sorry I haven't found time to respond again...
Maybe a good solution would be to create a maven pom (artifact) per feature with packaging as pom, declaring as dependencies of the artifact all dependencies needed for that feature. Whenever you create a dependency to this artifact, all its dependencies would be applied to the importing artifact.
This pom maybe could be generated processing the feature.xml file.
By Ed Willink on Oct 19, 2021 09:18
I am happy to attempt to auto-generate any reasonable content in a file/files that is/are bundled in the Eclipse OCL distribution.
Just tell me what file name(s) you would like where, and give an example of the required content (for two declarations - no need to manually repeat all 100).
By Ed Willink on Dec 16, 2022 10:41
Follw up on:
"EMF also publishes to Maven central:
| --- | --- | | Bugzilla Link | 525996 | | Status | NEW | | Importance | P3 normal | | Reported | Oct 13, 2017 06:46 EDT | | Modified | Dec 16, 2022 10:41 EDT | | Depends on | 562307 | | See also | 404602, 527438, 581203 | | Reporter | Ed Willink |
Description
Someone has put up some rather old releases of OCL at Maven Central. At best these are an embarrassment to the project. They are a confusion to users.
With the move to a Maven/Tycho build we can at least emulate many other Eclipse projects by contributing to https://repo.eclipse.org.
This might avoid Acceleo needing to embed an OCL distribution within the Acceleo distribution.