Glassfish源码编译 step by step

先说下自己编译的GF和官方版本的区别,自己编译的GF启动时,LOG中会显示说这是一个私有版本(build sp-private)(sp是我的用户名),如:2014-06-27T10:28:02.598+0800|Info: Running GlassFish Version: GlassFish Server Open Source Edition  4.0.1  (build sp-private)

坑:按照下面的流程去做,应该没有问题,中间可能会失败,如果失败了,根据经验未必是你做的不对,而是当下的版本确实存在问题,我遇到过几次这样的情况(Oracle的开发也会有点小失误的),然后等几天,就会有其他的DEV将这个ISSUE FIX了,然后再做一遍下面的流程,基本上就都没有问题了。

设定maven参数

export MAVEN_OPTS="$MAVEN_OPTS: -Xmx1024M -XX:MaxPermSize=512m"


Checkout the workspace

svn checkout https://svn.java.net/svn/glassfish~svn/trunk/main


Build

cd main

mvn install 或者不运行Tests(mvn -DskipTests=true clean install)


Rebuild

cd main

svn update

mvn install或者mvn -DskipTests=true clean install


OffLine 编译(如果所有依赖的jar都已经下载过)(-o 代表 offline)

mvn -DskipTests=true  -o clean install


我是用的编译工具信息如下

sp:~ sp$ mvn -version

Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T21:51:42+08:00)

Maven home: /Users/sp/Documents/common-tools/apache-maven-3.2.2

Java version: 1.7.0_51, vendor: Oracle Corporation

Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre

Default locale: en_US, platform encoding: UTF-8

OS name: "mac os x", version: "10.9.3", arch: "x86_64", family: "mac"


如果顺利,大约1个小时左右,最后你会看到如下的信息,编译成功。


[INFO]                                                                         

[INFO] ------------------------------------------------------------------------

[INFO] Building GlassFish Project 4.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom

Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom (4 KB at 2.4 KB/sec)

[INFO] 

[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ glassfish-main-aggregator ---

[INFO] 

[INFO] --- maven-install-plugin:2.4:install (default-install) @ glassfish-main-aggregator ---

[INFO] Skipping artifact installation

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary:

[INFO] 

[INFO] GlassFish Nucleus Parent Project ................... SUCCESS [  0.666 s]

[INFO] Distribution Fragments for various OSGi platforms .. SUCCESS [  0.024 s]

[INFO] Apache Felix, associated bundles and conf files .... SUCCESS [  1.123 s]

[INFO] Scattered Archive APIs of Glassfish ................ SUCCESS [  1.913 s]

[INFO] GlassFish Nucleus Grizzly modules .................. SUCCESS [  0.014 s]

[INFO] grizzly-config ..................................... SUCCESS [  3.194 s]

[INFO] Nucleus Grizzly jars Combining ..................... SUCCESS [  1.696 s]

[INFO] Public APIs of Glassfish ........................... SUCCESS [  1.670 s]

[INFO] GlassFish Nucleus Common modules ................... SUCCESS [  0.009 s]

[INFO] Common Utilities ................................... SUCCESS [  4.093 s]

[INFO] Simple Public APIs of Glassfish .................... SUCCESS [  0.164 s]

[INFO] GlassFish Nucleus Core modules ..................... SUCCESS [  0.013 s]

[INFO] Appserver Core Bootstraping Classes ................ SUCCESS [  0.869 s]

[INFO] Test Utilities Modules ............................. SUCCESS [  0.010 s]

[INFO] Test utilities ..................................... SUCCESS [  0.128 s]

[INFO] Admin Modules ...................................... SUCCESS [  0.018 s]

[INFO] admin-config-api ................................... SUCCESS [  4.195 s]

[INFO] Private APIs of Glassfish .......................... SUCCESS [  0.931 s]

[INFO] Nucleus Security Parent ............................ SUCCESS [  0.009 s]

[INFO] GlassFish SSL Implementation Module ................ SUCCESS [  0.342 s]

[INFO] GlassFish Nucleus Deployment Related Modules ....... SUCCESS [  0.011 s]

[INFO] Deployment Related Common Classes .................. SUCCESS [  1.166 s]

[INFO] Repackaged nucleus external modules ................ SUCCESS [  0.014 s]

[INFO] ldapbp repackaged as a module ...................... SUCCESS [  0.163 s]

[INFO] Security Core Classes .............................. SUCCESS [  1.831 s]

[INFO] Security Services and SPI .......................... SUCCESS [  1.145 s]

[INFO] admin-util ......................................... SUCCESS [  1.623 s]

[INFO] Admin CLI bridge command to the OSGi Shell ......... SUCCESS [  0.381 s]

[INFO] trilead-ssh2 repackaged as a module ................ SUCCESS [  0.300 s]

[INFO] j-interop repackaged as a module ................... SUCCESS [  0.837 s]

[INFO] Cluster ............................................ SUCCESS [  0.011 s]

[INFO] cluster-common ..................................... SUCCESS [  0.565 s]

[INFO] Cluster SSH Provisioning ........................... SUCCESS [  0.425 s]

[INFO] Nucleus Logging Classes ............................ SUCCESS [  1.190 s]

[INFO] admin-launcher ..................................... SUCCESS [  0.683 s]

[INFO] admin-cli .......................................... SUCCESS [  0.874 s]

[INFO] Admin CLI, interactive OSGi shell command .......... SUCCESS [  0.511 s]

[INFO] OSGi Container ..................................... SUCCESS [  0.365 s]

[INFO] Admin CLI interactive OSGi Shell command l10n ...... SUCCESS [  0.113 s]

[INFO] Admin CLI bridge command to the OSGi Shell l10n .... SUCCESS [  0.067 s]

[INFO] flashlight-framework ............................... SUCCESS [  0.672 s]

[INFO] GlassFish API Exporter Module ...................... SUCCESS [  0.124 s]

[INFO] Kernel Classes ..................................... SUCCESS [  2.858 s]

[INFO] GMS Bootstrap Module ............................... SUCCESS [  0.338 s]

[INFO] cluster-admin ...................................... SUCCESS [  0.833 s]

[INFO] admin-server-management ............................ SUCCESS [  2.062 s]

[INFO] cluster-cli ........................................ SUCCESS [  0.996 s]

[INFO] GMS Module ......................................... SUCCESS [  0.565 s]

[INFO] GMS Bootstrap Module l10n .......................... SUCCESS [  0.070 s]

[INFO] cluster-cli l10n ................................... SUCCESS [  0.414 s]

[INFO] Cluster SSH Provisioning l10n ...................... SUCCESS [  0.114 s]

[INFO] cluster-common l10n ................................ SUCCESS [  0.138 s]

[INFO] cluster-admin l10n ................................. SUCCESS [  0.623 s]

[INFO] setup-local-dcom l10n .............................. SUCCESS [  0.111 s]

[INFO] jmxremote_optional repackaged as a module .......... SUCCESS [  0.509 s]

[INFO] Glassfish MBeanServer support ...................... SUCCESS [  0.459 s]

[INFO] AMX Core ........................................... SUCCESS [  1.762 s]

[INFO] Common Utilities l10n .............................. SUCCESS [  0.236 s]

[INFO] Private APIs of Glassfish l10n ..................... SUCCESS [  0.072 s]

[INFO] Public APIs of Glassfish l10n ...................... SUCCESS [  0.099 s]

[INFO] Glassfish MBeanServer support l10n ................. SUCCESS [  0.081 s]

[INFO] GlassFish Extra JRE Packages ....................... SUCCESS [  0.028 s]

[INFO] Glassfish logging classes l10n ..................... SUCCESS [  0.192 s]

[INFO] Kernel classes l10n ................................ SUCCESS [  0.499 s]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值