############################################################
Compiling GlassFish (MAVEN project)
############################################################
"Configure Maven"
Configuring Maven Settings.xml
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>XXX</url>
</mirror>
</mirror>
"Configuring the compilation Environment"
To set the memory size:
Set maven_opts=-xmx1024m
Compiler
CD \main\nucleus
MVN install-dskiptests
CD \main\appserver
MVN install-dskiptests
-dskiptests means skipping the test session.
Product: \main\appserver\distributions\web\web.zip
Attention:
1. When compiling GlassFish, the JDK version is required.
Need JDK greater or equal than 1.7.0-09 (JDK8 not supported yet)
############################################################
Running the GF locally
############################################################
Run
1, decompression Web.zip
2. Running Web\target\glassfish4\glassfish\bin\asadmin.bat
3, glassfish Start command: Start-domain, stop Stop-domain, restart Restart-domain
4, Server back office address: http://localhost:4848/
5. Application Address: http://localhost:8080/application name/request name
Http://localhost:8080/servlet/test
"DEBUG"
1, you can use the graphical interface after the server configuration.
2, use the command configuration. (some versions require a reboot to take effect)
Asadmin>set Server-config.java-config.debug-enabled=true
Asadmin>set server-config.java-config.debug-options= "-xdebug xrunjdwp:transport=dt_socket,server=y,suspend=n, address=9009 "
Java Remote Debugging
-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,server=y,address=3999,suspend=n
-xdebug enable debugging.
-xnoagent disables the default Sun.tools.debug debugger.
-djava.compiler=none suppresses the loading of the JIT compiler.
-XRUNJDWP loads the JDWP JPDA reference execution instance.
Transport is used to communicate between the debugger and the process used by the VM.
Dt_socket socket transmission.
Dt_shmem shared memory transfers are limited to Windows.
server=y/n whether the VM needs to be executed as a debug server.
address=3999 the port number of the debug server that the client uses to connect to the server.
suspend=y/n whether to start the VM after the debugging client establishes a connection.
3, set directly in the configuration file, in the browser or console can not be sent to the GlassFish request when the use.
Configuration file: Main\appserver\distributions\web\target\glassfish4\glassfish\domains\domain1\config\domain.xml
<java-config debug-options= "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009" debug-enabled = "true" >
</java-config>
This article is from the "Night" blog, be sure to keep this source http://icyore.blog.51cto.com/8486958/1690049
"Getting Started with GlassFish" using GlassFish