This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 519780 - [full component] Merge 3 servertools repos into 1
Summary: [full component] Merge 3 servertools repos into 1
Status: RESOLVED FIXED
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: wst.server (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.10.0 M3   Edit
Assignee: Elson Yuen CLA
QA Contact: Elson Yuen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 525342 520044
  Show dependency tree
 
Reported: 2017-07-17 14:15 EDT by Rob Stryker CLA
Modified: 2017-12-18 20:11 EST (History)
4 users (show)

See Also:


Attachments
Script run output (9.94 KB, text/plain)
2017-10-05 14:22 EDT, Elson Yuen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Stryker CLA 2017-07-17 14:15:17 EDT
Servertools, servertools.tests, and servertools.docs, should be merged into one repository. This simplified architecture will help streamline WTP and make for a more efficient (and less monolithic) build process.


Script to accomplish this:

https://gist.github.com/robstryker/e79310e3ca09de45bf62c9264ac506e7
Comment 1 Nick Boldt CLA 2017-09-05 16:19:23 EDT
Closest thing we have to PMC approval for this merge:

https://dev.eclipse.org/mhonarc/lists/wtp-dev/msg10398.html

Followup clarification from Rob:

https://dev.eclipse.org/mhonarc/lists/wtp-dev/msg10399.html

With PMC approval, is the next step here to schedule a time for the Webmaster to perform the merge?
Comment 2 Nick Boldt CLA 2017-09-28 09:47:32 EDT
It's 3 weeks later (and now more than 2 months since the linked merge script [0] was created). 

[0] https://gist.github.com/robstryker/e79310e3ca09de45bf62c9264ac506e7

Who should bring this to the webmaster? 

Is that a task for a PMC? releng lead? the newest wtp.releng committer (*cough* me */cough*) ?

Do we want to run this AND the merge of sse [1] at the same time?

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=520044
Comment 3 Elson Yuen CLA 2017-10-05 14:22:03 EDT
Created attachment 270846 [details]
Script run output

I tried to run the script but there seems to be some steps that failed.
Comment 4 Rob Stryker CLA 2017-10-05 16:05:55 EDT
Hi Elson:

So seems we have a few issues here.  First, your 'sort' command seems to be lacking a -V option. 

       -V, --version-sort
              natural sort of (version) numbers within text

Second, when building wtp-parent pom, the following error appears:

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0

Class file version 51.0 implies a Java 7. The fact that 51.0 is an unsupported version leads me to believe you're using... java 6? 

Third:  sed: 1: "org.eclipse.jst.server. ...": invalid command code o

What version of sed are you using? What OS are you using? Are you using OSX? This script is designed for fedora. I'm not sure why the syntax of sed would differ, but, if your sort doesn't even have -V then who knows what else could go wrong. 



Fourth: git: 'workprofile' is not a git command. See 'git --help'.

I have removed this line. It was custom for me to make sure I was committing with the right id. 


Fifth: usage: git pull [<options>] [<repository> [<refspec>...]]

What version of git do you have? 



Sixth: ./webtools.merge.servertools.sh: line 57: wget: command not found

Your installation does not have wget? Do you have any other command to substitute? 



We may need to find someone else to help run this. I never imagined such a simple script would have so many errors in a different environment, but, I guess this log is living proof =P
Comment 5 Nick Boldt CLA 2017-10-05 16:09:03 EDT
When I tested this I used Fedora 24, with Oracle JDK 8u121, and Maven 3.3.9, and it worked great. 

$➔ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00)
Maven home: /opt/maven3
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-8.b14.fc24.x86_64/jre
Default locale: en_CA, platform encoding: UTF-8
OS name: "linux", version: "4.11.12-100.fc24.x86_64", arch: "amd64", family: "unix"

$➔ uname -a
Linux t540p-f24-vm01 4.11.12-100.fc24.x86_64 #1 SMP Fri Jul 21 17:35:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


Are you perhaps on OSX, or using old versions of JDK & Maven?
Comment 6 Elson Yuen CLA 2017-10-10 15:18:07 EDT
Thanks for providing your environment info.  I was indeed using OSX to run the script when I got those errors.  I also tried running the script on Linux and now I can run the script successfully.  I am currently following up with webmaster on the issue during the push of the combined repo.
Comment 7 Elson Yuen CLA 2017-10-11 16:57:58 EDT
I finally managed to push the merged repo to master. Can you take a look at the repo to see if that's the final output that you are need?
Comment 8 Elson Yuen CLA 2017-10-12 11:00:16 EDT
Repo merged in master.

For future reference, when merging repos, the follow needs to be done to bypass Gerrit reviews and also prevent error for pushing commits done by other users:
1. disable IP check (web master)
2. forge author (already on by default)
3. grant forge committer (web master)
4. grant forge server (web master)
5. push changes to refs/heads/*, e.g. HEAD:refs/heads/master
Comment 9 Eclipse Genie CLA 2017-10-12 11:43:23 EDT
New Gerrit change created: https://git.eclipse.org/r/109926
Comment 10 Eclipse Genie CLA 2017-10-12 12:21:27 EDT
New Gerrit change created: https://git.eclipse.org/r/109932
Comment 11 Eclipse Genie CLA 2017-10-12 13:41:30 EDT
New Gerrit change created: https://git.eclipse.org/r/109939
Comment 14 Eclipse Genie CLA 2017-10-12 19:26:03 EDT
New Gerrit change created: https://git.eclipse.org/r/109955
Comment 15 Eclipse Genie CLA 2017-10-13 10:46:11 EDT
New Gerrit change created: https://git.eclipse.org/r/110054
Comment 16 Eclipse Genie CLA 2017-10-13 10:46:13 EDT
New Gerrit change created: https://git.eclipse.org/r/110053
Comment 17 Eclipse Genie CLA 2017-10-13 10:47:16 EDT
New Gerrit change created: https://git.eclipse.org/r/110055
Comment 19 Eclipse Genie CLA 2017-10-13 11:48:32 EDT
New Gerrit change created: https://git.eclipse.org/r/110065
Comment 20 Carl Anderson CLA 2017-10-13 14:58:57 EDT
(In reply to Eclipse Genie from comment #19)
> New Gerrit change created: https://git.eclipse.org/r/110065

Nick, can you also remove the two entries from scripts/repositories.txt ?
Comment 21 Eclipse Genie CLA 2017-10-13 18:13:36 EDT
New Gerrit change created: https://git.eclipse.org/r/110084
Comment 23 Nick Boldt CLA 2017-10-13 19:59:53 EDT
Merged changes. Building here:

https://hudson.eclipse.org/webtools/view/webtools_R3_10/job/WTP-R3_10_Integration/ >=74 (in progress, hopefully green on the next pass)
and
https://hudson.eclipse.org/webtools/view/webtools_R3_10/job/webtools-servertools_R3_10/ (green)
Comment 24 Rob Stryker CLA 2017-11-27 22:52:16 EST
Elson:  shouldn't this be closed now?
Comment 25 Nick Boldt CLA 2017-12-18 20:11:41 EST
(In reply to Rob Stryker from comment #24)
> Elson:  shouldn't this be closed now?

Yes.