http://wiki.eclipse.org/EGit/Contributor_Guide
$ sudo apt-get install maven
$ mvn -v
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_05, vendor: Oracle Corporation
Java home: /usr/local/java/jdk1.8.0_05/jre
Default locale: ko_KR, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-30-generic", arch: "amd64", family: "unix"
$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
$ git clone https://git.eclipse.org/r/jgit/jgit.git
$ git clone https://git.eclipse.org/r/egit/egit.git
$ cd jgit/
$ mvn clean install
...
[INFO] Building jar: /srv/workspace/cli/jgit/org.eclipse.jgit/target/org.eclipse.jgit-3.5.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-javadoc-plugin:2.9.1:jar (attach-javadocs) @ org.eclipse.jgit ---
[INFO]
11 errors
100 warnings
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] JGit - Parent ..................................... SUCCESS [6:55.109s]
[INFO] JGit - Core ....................................... FAILURE [4:54.781s]
[INFO] JGit - Ant Tasks .................................. SKIPPED
[INFO] JGit Archive Formats .............................. SKIPPED
[INFO] JGit - AWT User Interface ......................... SKIPPED
[INFO] JGit - Apache httpclient based HTTP support ....... SKIPPED
[INFO] JGit - HTTP Server ................................ SKIPPED
[INFO] JGit - Core Java7 Support ......................... SKIPPED
[INFO] JGit - Console User Interface ..................... SKIPPED
[INFO] JGit - Command Line Interface ..................... SKIPPED
[INFO] JGit - JUnit Utility Classes ...................... SKIPPED
[INFO] JGit - JUnit Http Utility Classes ................. SKIPPED
[INFO] JGit - Core Tests ................................. SKIPPED
[INFO] JGit - Ant Tasks Tests ............................ SKIPPED
[INFO] JGit - HTTP Tests ................................. SKIPPED
[INFO] JGit - Command Line Interface Tests ............... SKIPPED
[INFO] JGit - Core Java 7 Tests .......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11:51.788s
[INFO] Finished at: Mon Jul 14 23:20:13 KST 2014
[INFO] Final Memory: 25M/129M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:jar (attach-javadocs) on project org.eclipse.jgit: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - javadoc: warning - Error fetching URL: http://java.sun.com/j2se/1.5.0/docs/api
[ERROR] /srv/workspace/cli/jgit/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleStatus.java:63: warning: no description for @param
...
Java 버전으로 인한 에러가 발생한다.
낮은 버전으로 해보자.
$ java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
$ mvn clean install
$ mvn -f org.eclipse.jgit.packaging/pom.xml clean install
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] JGit - Parent ..................................... SUCCESS [22.194s]
[INFO] JGit - Core ....................................... SUCCESS [1:41.927s]
[INFO] JGit - Ant Tasks .................................. SUCCESS [18.021s]
[INFO] JGit Archive Formats .............................. SUCCESS [15.590s]
[INFO] JGit - AWT User Interface ......................... SUCCESS [11.407s]
[INFO] JGit - Apache httpclient based HTTP support ....... SUCCESS [8.504s]
[INFO] JGit - HTTP Server ................................ SUCCESS [14.970s]
[INFO] JGit - Core Java7 Support ......................... SUCCESS [9.205s]
[INFO] JGit - Console User Interface ..................... SUCCESS [6.096s]
[INFO] JGit - Command Line Interface ..................... SUCCESS [1:49.926s]
[INFO] JGit - JUnit Utility Classes ...................... SUCCESS [15.026s]
[INFO] JGit - JUnit Http Utility Classes ................. SUCCESS [22.875s]
[INFO] JGit - Core Tests ................................. SUCCESS [4:11.109s]
[INFO] JGit - Ant Tasks Tests ............................ SUCCESS [6.707s]
[INFO] JGit - HTTP Tests ................................. SUCCESS [26.150s]
[INFO] JGit - Command Line Interface Tests ............... SUCCESS [21.564s]
[INFO] JGit - Core Java 7 Tests .......................... SUCCESS [5.154s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11:09.791s
[INFO] Finished at: Mon Jul 14 23:46:44 KST 2014
[INFO] Final Memory: 42M/189M
[INFO] ------------------------------------------------------------------------
$ ll org.eclipse.jgit.packaging/org.eclipse.jgit.repository/target/
합계 5372
drwxrwxr-x 5 hp14 hp14 4096 7월 14 23:53 ./
drwxrwxr-x 4 hp14 hp14 4096 7월 14 23:53 ../
-rw-rw-r-- 1 hp14 hp14 1562 7월 14 23:53 category.xml
-rw-rw-r-- 1 hp14 hp14 162 7월 14 23:53 local-artifacts.properties
-rw-rw-r-- 1 hp14 hp14 5460994 7월 14 23:53 org.eclipse.jgit.repository-3.5.0-SNAPSHOT.zip
drwxrwxr-x 4 hp14 hp14 4096 7월 14 23:53 p2agent/
-rw-rw-r-- 1 hp14 hp14 100 7월 14 23:53 p2artifacts.xml
-rw-rw-r-- 1 hp14 hp14 1692 7월 14 23:53 p2content.xml
drwxrwxr-x 4 hp14 hp14 4096 7월 14 23:53 repository/
drwxrwxr-x 2 hp14 hp14 4096 7월 14 23:53 targetPlatformRepository/
$ cd ../egit
$ mvn clean install
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.428 sec
Running org.eclipse.egit.ui.internal.push.PushTagsWizardTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.435 sec
Running org.eclipse.egit.ui.internal.push.PushBranchWizardTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 45.011 sec
Running org.eclipse.egit.ui.internal.push.PushToUpstreamTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.72 sec
Running org.eclipse.egit.ui.internal.actions.SwitchToMenuTest
Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 5.017 sec <<< FAILURE!
Running org.eclipse.egit.ui.internal.actions.LinkedResourcesTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.964 sec
Running org.eclipse.egit.ui.internal.branch.BranchProjectTrackerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.739 sec
Running org.eclipse.egit.ui.internal.decorators.DecoratableResourceAdapterTest
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 20.349 sec
Running org.eclipse.egit.ui.internal.dialogs.SpellcheckableMessageAreaTest
Tests run: 20, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.899 sec
Running org.eclipse.egit.ui.internal.synchronize.model.GitModelBlobTest
Error while logging event loop exception:
An error has occurred. See the log file
/srv/workspace/cli/egit/org.eclipse.egit.ui.test/target/work/data/.metadata/.log
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] EGit Parent ....................................... SUCCESS [2.012s]
[INFO] EGit Target Platform Definition ................... SUCCESS [1.122s]
[INFO] Eclipse EGit ...................................... SUCCESS [6.384s]
[INFO] Git Team Provider (Core) .......................... SUCCESS [26.086s]
[INFO] Git Team Provider (UI) ............................ SUCCESS [34.774s]
[INFO] EGit Mylyn UI ..................................... SUCCESS [2.484s]
[INFO] Git Team Provider (Documentation) ................. SUCCESS [4.373s]
[INFO] Eclipse EGit Feature .............................. SUCCESS [0.952s]
[INFO] EGit Mylyn Feature ................................ SUCCESS [1.345s]
[INFO] EGit Core Test Plug-in ............................ SUCCESS [2:00.868s]
[INFO] EGit UI Test Plug-in .............................. FAILURE [43:54.282s]
[INFO] EGit Mylyn UI Test Plug-in ........................ SKIPPED
[INFO] Eclipse EGit Source Feature ....................... SKIPPED
[INFO] EGit P2 Repository ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 49:56.617s
[INFO] Finished at: Tue Jul 15 01:36:50 KST 2014
[INFO] Final Memory: 88M/211M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.20.0:test (default-test) on project org.eclipse.egit.ui.test: An unexpected error occured (return code 13). See log for details. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :org.eclipse.egit.ui.test
테스트 하다가 에러가 난다.
실행한 PC의 메모리가 2GB밖에 안되어 메모리가 부족해서 발생한 것이라 추정이 되어 메모리를 4GB로 늘려보았지만
여전히 에러가 발생했다. 이런~
그래서 테스트를 생략해보니...
$ mvn clean install -Dmaven.test.skip=true
[INFO]
[INFO] --- tycho-p2-plugin:0.20.0:update-local-index (default-update-local-index) @ org.eclipse.egit.repository ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] EGit Parent ....................................... SUCCESS [1.079s]
[INFO] EGit Target Platform Definition ................... SUCCESS [1.199s]
[INFO] Eclipse EGit ...................................... SUCCESS [5.954s]
[INFO] Git Team Provider (Core) .......................... SUCCESS [21.115s]
[INFO] Git Team Provider (UI) ............................ SUCCESS [30.294s]
[INFO] EGit Mylyn UI ..................................... SUCCESS [2.014s]
[INFO] Git Team Provider (Documentation) ................. SUCCESS [4.782s]
[INFO] Eclipse EGit Feature .............................. SUCCESS [1.244s]
[INFO] EGit Mylyn Feature ................................ SUCCESS [1.352s]
[INFO] EGit Core Test Plug-in ............................ SUCCESS [4.718s]
[INFO] EGit UI Test Plug-in .............................. SUCCESS [6.311s]
[INFO] EGit Mylyn UI Test Plug-in ........................ SUCCESS [1.635s]
[INFO] Eclipse EGit Source Feature ....................... SUCCESS [0.231s]
[INFO] EGit P2 Repository ................................ SUCCESS [10.598s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:25.663s
[INFO] Finished at: Wed Jul 16 23:04:45 KST 2014
[INFO] Final Memory: 78M/212M
[INFO] ------------------------------------------------------------------------
뭐 당연한 것이지만... 그냥 통과~ ^^
$ mvn clean install -Dmaven.test.skip=true -Dupdate.egit.doc
[INFO]
[INFO] --- tycho-p2-plugin:0.20.0:update-local-index (default-update-local-index) @ org.eclipse.egit.repository ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] EGit Parent ....................................... SUCCESS [0.771s]
[INFO] EGit Target Platform Definition ................... SUCCESS [0.727s]
[INFO] Eclipse EGit ...................................... SUCCESS [4.398s]
[INFO] Git Team Provider (Core) .......................... SUCCESS [13.801s]
[INFO] Git Team Provider (UI) ............................ SUCCESS [32.095s]
[INFO] EGit Mylyn UI ..................................... SUCCESS [1.988s]
[INFO] Git Team Provider (Documentation) ................. SUCCESS [1:19.048s]
[INFO] Eclipse EGit Feature .............................. SUCCESS [1.687s]
[INFO] EGit Mylyn Feature ................................ SUCCESS [1.324s]
[INFO] EGit Core Test Plug-in ............................ SUCCESS [2.861s]
[INFO] EGit UI Test Plug-in .............................. SUCCESS [4.802s]
[INFO] EGit Mylyn UI Test Plug-in ........................ SUCCESS [1.030s]
[INFO] Eclipse EGit Source Feature ....................... SUCCESS [0.275s]
[INFO] EGit P2 Repository ................................ SUCCESS [10.535s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:15.700s
[INFO] Finished at: Wed Jul 16 23:15:03 KST 2014
[INFO] Final Memory: 80M/239M
[INFO] ------------------------------------------------------------------------
결과를 확인해보면...
$ ls -al org.eclipse.egit.repository/target/
합계 16244
drwxrwxr-x 5 hp14 hp14 4096 7월 16 23:15 .
drwxrwxr-x 4 hp14 hp14 4096 7월 16 23:14 ..
-rw-rw-r-- 1 hp14 hp14 2079 7월 16 23:14 category.xml
-rw-rw-r-- 1 hp14 hp14 135 7월 16 23:14 local-artifacts.properties
-rw-rw-r-- 1 hp14 hp14 16596101 7월 16 23:15 org.eclipse.egit.repository-3.5.0-SNAPSHOT.zip
drwxrwxr-x 4 hp14 hp14 4096 7월 16 23:14 p2agent
-rw-rw-r-- 1 hp14 hp14 100 7월 16 23:14 p2artifacts.xml
-rw-rw-r-- 1 hp14 hp14 2654 7월 16 23:14 p2content.xml
drwxrwxr-x 4 hp14 hp14 4096 7월 16 23:15 repository
drwxrwxr-x 2 hp14 hp14 4096 7월 16 23:14 targetPlatformRepository