How to Build GlassFish 4 from Source - No Fluff Just Stuff

How to Build GlassFish 4 from Source

Posted by: Reza Rahman on May 7, 2014

Markus Eisele's View of GlassFish Source

Markus Eisele's GlassFish City Revisited

So you want to build the Reference Implementation of Java EE 7 from the source code after tweaking a little bit? Guess what, it is not hard at all. Andrew Pielage from C2B2 provided us with a nice blog post about the steps required to build GlassFish Open Source Edition from the source. Below you find just a few hints of how easy it is to build GlassFish, but don't forget to check Andrew's post for more details on how to modify source code, build with better options, load the custom build on NetBeans, and more!

1 2 3 4 5 6 7
#!/bin.sh
MAVEN_OPTS=-Xmx1024M -XX:MaxPermSize=512m
svn checkout https://svn.java.net/svn/glassfish~svn/trunk/main
cd main
mvn install -Dmaven.wagon.http.ssl.insecure=true \
-Dmaven.wagon.http.ssl.allowall=true \
-DskipTests
view raw build-glassfish.sh hosted with ❤ by GitHub

Do you have a nice article about GlassFish or Java EE?
Share it with us by mentioning @glassfish on Twitter!

Reza Rahman

About Reza Rahman

Reza is a recovering independent consultant and now Java EE evangelist at Oracle. He is the author of the popular book EJB 3 in Action. Reza is a frequent speaker at developer gatherings worldwide including JavaOne and NFJS. He is an avid contributor to community sites like JavaLobby and TSS. Reza has been a member of the Java EE, EJB and JMS expert groups. He implemented the EJB container for the Resin open source Java EE application server.

All views voiced are squarely mine alone, not Oracle's.

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »