Back to AdminConsole V3

GlassFish V3 Admin Console Build Instructions

This document contains instructions on how to build and test V3 admin console. Please refer to Admin Console Directory Structure document for more information on the admingui module layout.
As of now, the admingui module is not part of the V3 build yet, the instructions below reflects this fact. When we change this, so that V3 build will also include building the admin console, and the console is part of the distribution, this document will be updated.

  • checking out the workspace
    Checking out the entire V3 workspace will also checkout the amdingui module
    svn checkout https://svn.java.net/svn/glassfish-svn/trunk/v3

You can also just checkout the admingui module

svn checkout https://svn.java.net/svn/glassfish-svn/trunk/v3/admingui
  • Building admingui module
    To build the entire Admin Console including all the sub modules,
    cd v3
    mvn -U install
    cd admingui
    mvn -U install

    This will build all the jars for each sub module, install them in your local repository, and package the admingui.war application for you.
    The resulting war file can be found as v3/admingui/war/target/admingui.war

Copy the following jars:
\v3\admingui\web\target\console-web-plugin-10.0-SNAPSHOT.jar
to
glassfish-10.0-SNAPSHOT\glassfish\modules\web\
v3\admingui\plugin-service\target\console-plugin-service-10.0-SNAPSHOT.jar
to
glassfish-10.0-SNAPSHOT\glassfish\modules\
After you start up the V3 server, you can use the asadmin client to deploy this war file.
asadmin deploy v3/admingui/war/target/admingui.war

You are just deploying this as a regular web app, so use this URL to get to the first page.
http://localhost:8080/admingui

Tips for shorting the Edit/Build/Test/ cycle

  • If you have only changed codes in the core module, you can just install the the core jar and repackage the war file by doing the following:

cd v3/core; mvn install; cd ../war; mvn package
This way, you don't need to rebuild the entire admin console. You will still need to redeploy the war.

  • Doing a developer build

As admingui is a JSF application, very often we only make modification to the .jsf file. In order to avoid assemblying the jar, repackage the war file and redeployment, you should do directory deployment of the war and then after editing the .jsf file, just copy the the .jsf file over to the exploded war file and refresh the browser.
Here is how you can do this:

1. Builds the entire admingui modules.
cd v3/admingui; mvn install.

2. Creates the exploded war file, the .jsf will not be packaged in a jar.
cd v3/admingui/war; mvn -P dev

3. Do the directory deployment of the exploded war.
asadmin deploy v3/admingui/war/target/admingui

4. Edit your .jsf file

5. Copy over the .jsf files to the exploded war
cd v3/admingui/war; mvn -o -P dev

6. Refresh your browser and see your change

Repeat 4-6 as many times as you want.

The ideal situation is to be able to omit step #5 as well. Still working on this and will update this doc. when it is possible.

If you have edited both java file and jsf file, you will have to rebuild the core jar file and redeploy the exploded war again. You will need to change step 5 to

cd v3/admingui/core; mvn install; cd v3/admingui/war; mvn -o -P dev ; asadmin redeploy v3/admingui/war/target/admingui;

Moving files from V2

There is an svn source repository which is copied over from the V2 workspace. We should move the files over to the V3 workspace using svn move command so that the cvs history can be preserved.
The group decided to move the file one by one as we need them, instead of moving all the files at the same time. However, the files under svn v2 is 'created' before the UR1 release, so all the bug fixes that go into SJSAS91_UR1_BRANCH and SJSAS91_FCS_BRANCH will have to be ported manually after you move the file over to v3.
Here is the steps of move the svn v2 files over.

1. Checkout the svn v2 files. You only need to do this once.

cd WS ; svn checkout https://svn.java.net/svn/glassfish-svn/trunk/v2

2. Move one file at a time or move an entire directory.

svn move v2/admin-gui/src/java/com/sun/enterprise/tools/admingui/util/AMXUtil.java
v3/admingui/core/src/main/java/org/glassfish/admingui/util/AMXUtil.java

3. Commit the file in V3

svn commit v3/admingui/core/src/main/java

4. Be sure to look at the history of the same file in SJSAS91_FCS_BRANCH to ensure that any bug fix be ported over. Or to make it simpler, do a diff between the files, and then do a copy if there is any difference, We should port all the bugs anyway.

Bug and Workaround: