Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 431050

Summary: Build gerritfs plugin as part of the Maven Orion server build
Product: [ECD] Orion Reporter: Bogdan Gheorghe <gheorghe>
Component: RelengAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ryehle, simon_kaegi
Version: 6.0   
Target Milestone: 6.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Bogdan Gheorghe CLA 2014-03-24 13:45:52 EDT
The gerritfs plugin is a standalone gerrit plugin that needs some files from the Orion client in order to work.

The gerritfs plugin currently lives here:
org.eclipse.orion.server/bundles/org.eclipse.orion.server.gerritfs

To build it from the command line run:
mvn package

After it is built, it needs the following files copies into the built gerritfs jar (files listed in src => destination):

 org.eclipse.orion.client / bundles / org.eclipse.orion.client.core / web / orion / Deferred.js => static / orion / Deferred.js

org.eclipse.orion.client / bundles / org.eclipse.orion.client.core / web / orion / plugin.js => static / orion / plugin.js

org.eclipse.orion.client / bundles / org.eclipse.orion.client.core / web / orion / URITemplate.js => static / orion / URITemplate.js

org.eclipse.orion.client / bundles / org.eclipse.orion.client.core / web / orion / URL-shim.js => static / orion / URL-shim.js

org.eclipse.orion.client / bundles / org.eclipse.orion.client.core / web / orion / xhr.js => static / orion / xhr.js

org.eclipse.orion.client / bundles / org.eclipse.orion.client.core / web / requirejs / * => static / requirejs / *


org.eclipse.orion.client / bundles / org.eclipse.orion.client.ui / web / plugins / filePlugin / GerritFileImpl.js => static / plugins / filePlugin / GerritFileImpl.js

org.eclipse.orion.client / bundles / org.eclipse.orion.client.ui / web / plugins / GerritFilePlugin.html => static / plugins / GerritFilePlugin.html


org.eclipse.orion.client / bundles / org.eclipse.orion.client.ui / web / plugins / GerritFilePlugin.js => static / plugins / GerritFilePlugin.js
Comment 1 Anthony Hunter CLA 2014-05-02 11:27:53 EDT
I am not seeing any easy way to do this yet. There is no common way for the server build to get to the client build bits, since the paths are different depending on whether you are running a local build or a hudson build.

I can see any easy workaround though. The gerritfs plugin can be moved to the client repo. It is standalone plugin anyway. We can then build the jar as is now with the gerritfs pom.xml and then fix the jar with the additions in either the parent or the repository pom.xml

Can we refactor the plugin as org.eclipse.orion.gerritfs and move to the client repo?
Comment 2 Anthony Hunter CLA 2014-05-05 12:16:38 EDT
(In reply to Anthony Hunter from comment #1)
> Can we refactor the plugin as org.eclipse.orion.gerritfs and move to the
> client repo?

Since the answer is no, we have to build this in the server repo build.

The only way to do this is to take the built client p2 repo, copy the client core and ui jars, extract the files we need out of these jars and then add these files to the gerrit jar.

The Hudson build has the property ORION_CLIENT_REPOSITORY where we can locate the the client core and ui jars.
Comment 3 Anthony Hunter CLA 2014-05-06 22:31:36 EDT
The gerritfs.jar is available on the downloads page starting with build I20140506-2205.
Comment 4 Bogdan Gheorghe CLA 2014-05-08 12:43:39 EDT
Final jar needs one small tweak. Dir structure in the jar needs to be:


META-INF
org
static
orion
plugins
requirejs
Comment 5 Bogdan Gheorghe CLA 2014-05-08 12:45:02 EDT
orion, plugins and requirejs folders all need to go under a top level "static" folder.