maybeec / oomph-task-unzip

Oomph Task for unzipping archives
Eclipse Public License 1.0
1 stars 3 forks source link

Installation of task fails with recent oomph installers > 1.15 #17

Closed peterkir closed 3 years ago

peterkir commented 3 years ago

org.eclipse.core.runtime.CoreException: Cannot complete the install because one or more required items could not be found. at org.eclipse.oomph.util.OomphPlugin.coreException(OomphPlugin.java:280) at org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl.resolve(ProfileTransactionImpl.java:426) at org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl.commit(ProfileTransactionImpl.java:338) at org.eclipse.oomph.setup.ui.EnablementComposite$5.run(EnablementComposite.java:316) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Contains: Software being installed: artificial_root 1.0.0.v1603175059045 Contains: Missing requirement: unzip Setup Task 1.0.0.201612071748 (com.github.maybeec.oomph.task.unzip 1.0.0.201612071748) requires 'osgi.bundle; org.junit 0.0.0' but it could not be found Contains: Cannot satisfy dependency: Contains: From: artificial_root 1.0.0.v1603175059045 Contains: To: org.eclipse.equinox.p2.iu; com.github.maybeec.oomph.task.unzip.feature.feature.group 0.0.0 Contains: Cannot satisfy dependency: Contains: From: unzip Setup Task 1.0.0.201612071748 (com.github.maybeec.oomph.task.unzip.feature.feature.group 1.0.0.201612071748) Contains: To: org.eclipse.equinox.p2.iu; com.github.maybeec.oomph.task.unzip [1.0.0.201612071748,1.0.0.201612071748]

vhemery commented 3 years ago

It looks like the oomph installation used to include org.junit but no longer does.

I have worked around the issue by using a different interim Oomph-task-unzip.ecore, which forces the JUnit installation with JDT. I added the annotation

  <eAnnotations source="http://www.eclipse.org/oomph/setup/Enablement">
    <details key="variableName" value="setup.junitWithJDT"/>
    <details key="repository" value="http://download.eclipse.org/releases/2020-06"/>
    <details key="installableUnits" value="org.eclipse.jdt.feature.group"/>
  </eAnnotations>

and made it available at https://thor.si.c-s.fr/eclipsecs-setups/models/Oomph-task-unzip.ecore to use it instead of https://raw.githubusercontent.com/maybeec/oomph-task-unzip/master/task-unzip-updatesite/model/Oomph-task-unzip.ecore in setup files. You may copy it to your own location, but I do not recommend to point it, as it is only a temporary workaround and will be removed at some point. In addition, the repository is obviously not the best one, but I haven't found the possibility in Oomph to indicate the latest release train repository, only the oomph update repository (${oomph.update.url} which does not contain JUnit)

So it should be possible to add such annotation in the original Oomph-task-unzip.ecore file. But I think a best fix would be to add org.eclipse.jdt.feature.group (or maybe a lighter feature with only JUnit if you can find one) to the dependencies of com.github.maybeec.oomph.task.unzip.feature.feature.group and make sure the containing update site is referenced correctly. Or an even better fix : check where org.junit is used and make this dependency optional in task-unzip... We should not need it, except for developer's tests, so no need for the end-user to depend on it and install it... This is probably what happened in Oomph itself.

atar-axis commented 3 years ago

hey @vhemery, looks like this is still an issue but your workaround link is no longer valid. any other idea? I really struggle here, for a lot of hours now.

I alread forked the unzip repo and added the code you mentioned, without success unfortunately.

vhemery commented 3 years ago

hey @vhemery, looks like this is still an issue but your workaround link is no longer valid.

Yes it is. Surely there has been a temporary network issue (most probably on the https://thor.si.c-s.fr side). If you forked the repo and try to point your own fork, maybe there is a setup which is not redirected correctly and/or still point at the original ecore.

Your setup files should contain something like xsi:schemaLocation="http://maybeec.github.io/oomph-task-unzip/1.0 http://your.own.host.com/setups/models/Oomph-task-unzip.ecore ...

Of course, if you already forked the repo, you can also go with the best option and try a Pull Request where the org.junit dependency is no longer needed.

atar-axis commented 3 years ago

Thanks for your answer!

Of course, if you already forked the repo, you can also go with the best option and try a Pull Request where the org.junit dependency is no longer needed.

I did so but I am not sure that my modification is enough. Let's see what @maybeec thinks.

maybeec commented 3 years ago

I just had a look. Should be possible for me to have a look at it at the weekend

atar-axis commented 3 years ago

I would really appreciate that! If I can be of any help, let me know :)

maybeec commented 3 years ago

I will need most probably another week. The build is quite old and I need to do some refactorings to make it work. Currently I am facing some issues with the test run. I will keep you posted.

atar-axis commented 3 years ago

Alright, thank you very much for letting me know! And also for doing this, for sure ☺️

maybeec commented 3 years ago

@atar-axis, I published a new version. As this project has been quite old, I had to do some renovations. I essentially made it run on maven again and reorganized some the build, but I have not finalized it yet. Please have a try whether it solves your issues already.

atar-axis commented 3 years ago

Thank you very much !!! I will give it a try and report back next week

atar-axis commented 3 years ago

Worked like a charm according to my colleague, thank you very much!!!