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

Bug 410717

Summary: Use r.js as mvn dependency
Product: [ECD] Orion Reporter: Szymon Brandys <Szymon.Brandys>
Component: RelengAssignee: Matthias Sohn <matthias.sohn>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: denis.roy, john.arthorne, ken_walker, matthias.sohn, thanh.ha
Version: 3.0Flags: Szymon.Brandys: review?
Target Milestone: 3.0 RC3   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 399023    
Bug Blocks:    

Description Szymon Brandys CLA 2013-06-13 09:28:14 EDT
As per comment in 410174, r.js used during the build is in the client repo. We need to publish it as Maven artifact and consume it as a dependency.
Comment 1 John Arthorne CLA 2013-06-13 09:59:43 EDT
Thanh, we're looking for input on how to get a new maven artifact published at repo.eclipse.org. This is for a JavaScript utility used by the Orion build.
Comment 2 Thanh Ha CLA 2013-06-13 10:22:59 EDT
Detailed steps on how to deploy to repo.eclipse.org can be found here [1]. Essentially you will need a repo if you don't have one already (Orion already has one). Then you will use Hudson to deploy the objects. Since you want to publish a single file rather than all the objects in a build there is specific instructions for this here [2].

[1] http://wiki.eclipse.org/Services/Nexus
[2] http://wiki.eclipse.org/Services/Nexus#Deploying_a_jar_to_repo.eclipse.org
Comment 3 John Arthorne CLA 2013-06-13 11:02:59 EDT
Just to be clear, this is an artifact that is a prerequisite of our build, not something that is produced by our build. We would maybe update this with a new version a few times a year. Do we still need to setup a Hudson job to publish this? Paul said something about a web interface for manually publishing special "one time" artifacts.
Comment 4 Thanh Ha CLA 2013-06-13 11:14:15 EDT
(In reply to comment #3)

At the moment the Hudson servers are the only servers configured to allow pushing any files to repo.eclipse.org so you must use Hudson to deploy even if it's a one time artifact.

There is no web interface today which provides this service but might be something we could look into providing in the future.
Comment 5 Matthias Sohn CLA 2013-06-14 10:29:51 EDT
We could create a Maven module which uses Ant to download such modules and package them. Anything packaged by a build run we could deploy to repo.eclipse.org from our Hudson job.

Should I try this and add such a module to the Maven build of orion.client ?
Or do we need to do this under the hood of Orbit since it's 3rd party code ?
Comment 6 Matthias Sohn CLA 2013-06-14 10:32:23 EDT
(In reply to comment #5)
> Should I try this and add such a module to the Maven build of orion.client ?
> Or do we need to do this under the hood of Orbit since it's 3rd party code ?

some questions regarding this proposal:
- where can I find the original r.js ?
- in which format do you want to package it ?
Comment 7 John Arthorne CLA 2013-06-14 11:10:59 EDT
(In reply to comment #6)
> some questions regarding this proposal:
> - where can I find the original r.js ?

It was recently added directly into the orion client source tree as a short term solution. see orion.client/releng/requirejs

> - in which format do you want to package it ?

It is just a single JavaScript library, r.js. That is the form we want it to be in at build time. I don't know if Maven supports a module being a random file or does it need to be packaged as a zip or jar?

The package does *not* need to be in Orbit right now. First, it is just a builder dependency and not something we are distributing. Second, Orbit doesn't yet have a story for JavaScript libraries - what form they should take, what versioning scheme, how to build them, etc. Orion does actually distribute some third party JS libraries that have been approved through IPZilla, but until there are more JS-focused projects at Eclipse we can continue hosting them directly in our project.

I didn't fully understand your proposal, why a maven module is needed instead of a simple ant script invoked from hudson like Thanh's doc shows. But if the end result is an r.js module in repo.eclipse.org that we can consume in our build, that sounds great.
Comment 8 Matthias Sohn CLA 2013-06-14 18:35:10 EDT
You are right there is a simpler way, we can simply download javascript libraries
in the ant script we already use for minification. I pushed a commit implementing this to github:

https://github.com/msohn/orion.client/commit/efc39abf440bc8c5c89579cd812d27f6b22e34d3
Comment 9 Szymon Brandys CLA 2013-06-17 09:08:27 EDT
(In reply to comment #8)
> You are right there is a simpler way, we can simply download javascript
> libraries
> in the ant script we already use for minification. I pushed a commit
> implementing this to github:
> 
> https://github.com/msohn/orion.client/commit/
> efc39abf440bc8c5c89579cd812d27f6b22e34d3

Merged to master. Running a build now. Thanks Matthias!