goomph icon indicating copy to clipboard operation
goomph copied to clipboard

Share imported projects with git during ide task

Open scottresnik opened this issue 7 years ago • 10 comments

Is it possible to have projects that are imported into the goomph generated work space be linked with the source repository(i.e. the equivalent of right-click on project, select "Share...") from where they came. In my case, git. I am including the egit features in my eclipse install as well, so there is nothing prohibiting this.

Thanks.

scottresnik avatar Nov 22 '16 16:11 scottresnik

I just added instructions for how to go about this here. If you're able to figure out how to do it, I'll be happy to help integrate it back into goomph.

nedtwigg avatar Nov 22 '16 23:11 nedtwigg

I've started going down the path of adding an additional SetupAction. I have added my changes, and then executed the publishToMavenLocal task. Yet, when I attempt to test the plugin in a real project, I get the following:

java.io.FileNotFoundException: JAR entry com/diffplug/gradle/oomph/META-INF/MANIFEST.MF not found in C:\Users\scott\.m2\repository\com\diffplug\gradle\goomph\3.5.0-SNAPSHOT\goomph-3.5.0-SNAPSHOT.jar
        at com.diffplug.common.io.Resources$UrlByteSource.openStream(Resources.java:72)
        at com.diffplug.common.io.ByteSource$AsCharSource.openStream(ByteSource.java:448)
        at com.diffplug.common.io.CharSource.read(CharSource.java:213)
        at com.diffplug.common.io.Resources.toString(Resources.java:113)
        at com.diffplug.gradle.oomph.BrandingProductPlugin.create(BrandingProductPlugin.java:127)
        at com.diffplug.gradle.oomph.OomphIdeExtension.writeBrandingPlugin(OomphIdeExtension.java:321)
        at com.diffplug.gradle.oomph.OomphIdeExtension.ideSetupP2(OomphIdeExtension.java:287)
        at com.diffplug.common.base.Errors.lambda$wrap$5(Errors.java:218)
        ... 74 more

My changes are here: https://github.com/scottresnik/goomph/tree/share-imported-project

scottresnik avatar Nov 23 '16 19:11 scottresnik

Try gradlew --stop to kill the daemon, then try the plugin in a real project again. There's a gradle bug somewhere about embedded resources and maven local.

nedtwigg avatar Nov 23 '16 19:11 nedtwigg

That was it. Not sure why I didn't think of trying that.

scottresnik avatar Nov 23 '16 21:11 scottresnik

Might have to abandon this. Regardless of what I do, I can't seem to get the sharing to work. However, simply closing the projects and re-opening them once the eclipse UI is up seems to accomplish the same thing.

Perhaps someone with a deeper knowledge of the eclipse team repository framework can get further. I'll keep the code out there just in case.

scottresnik avatar Nov 24 '16 00:11 scottresnik

Sounds good. Lets make sure to document workaround for future users - if you want your projects to be shared in Git, then:

  • add the egit feature to the p2 build
  • open the ide
  • close all projects
  • reopen all projects
  • they will now have found their git repo automatically

Is that correct?

nedtwigg avatar Nov 24 '16 01:11 nedtwigg

That's basically it. In my use case, the projects are all sub-directories of the directory with the .git folder.

I can put this in a document if you like. You have a few .md docs out there. Is there one in particular you would prefer it to go in?

scottresnik avatar Nov 24 '16 02:11 scottresnik

I'm inclined to just leave it here as an open issue. Easy to search. If you think of someplace it would fit, feel free to put it there instead :)

nedtwigg avatar Nov 24 '16 03:11 nedtwigg

I started looking at this again. Is it possible that the environment used to execute the setup actions is not including my team provider? In my case egit.

scottresnik avatar Nov 30 '16 16:11 scottresnik

The environment will include whatever p2 bundles you specified. So if you added the egit feature, then it is available when your code runs.

nedtwigg avatar Nov 30 '16 19:11 nedtwigg

Adding a feature like this would be pretty easy in the newly launched EquoIDE. Happy to take PR's over there.

https://github.com/equodev/equo-ide/tree/main/plugin-gradle

nedtwigg avatar Feb 28 '23 23:02 nedtwigg