Skip to content
/ asadmin Public
forked from eskatos/asadmin

Java API and Maven plugin to invoke Glassfish v3 & V2 asadmin commands

License

Notifications You must be signed in to change notification settings

oobj/asadmin

 
 

Repository files navigation

asadmin-java

asadmin-java is a java api to invoke glassfish V3 and V2 asadmin commands

The project is hosted in maven central. here you'll find a quick copy/paste for the dependency.

asadmin-maven-plugin

asadmin-maven-plugin is a maven plugin based on asadmin commands

The project is hosted in maven central, to use it add the following snippet to your pom.xml:

<build>
  <plugins>
    <plugin>
      <groupId>org.codeartisans.asadmin</groupId>
      <artifactId>asadmin-maven-plugin</artifactId>
      <version>0.12</version>
    </plugin>
  </plugins>
</build>

The following goals are available:

mvn asadmin:start-database
mvn asadmin:stop-database

mvn asadmin:start-domain
mvn asadmin:stop-domain
mvn asadmin:restart-domain

mvn asadmin:start-cluster
mvn asadmin:stop-cluster

mvn asadmin:deploy
mvn asadmin:redeploy
mvn asadmin:undeploy

mvn asadmin:uptime
mvn asadmin:get-health

mvn asadmin:get
mvn asadmin:set

mvn asadmin:set-ports # To change the http listeners ports

mvn asadmin:create-jdbc-connection-pool
mvn asadmin:ping-connection-pool
mvn asadmin:delete-jdbc-connection-pool

mvn asadmin:add-resources
mvn asadmin:create-jdbc-resource
mvn asadmin:delete-jdbc-resource

mvn asadmin:create-auth-realm
mvn asadmin:list-file-users
mvn asadmin:create-file-user
mvn asadmin:update-file-user
mvn asadmin:delete-file-user

mvn asadmin:create-message-security-provider
mvn asadmin:delete-message-security-provider

By default the asadmin-maven-plugin use the following settings:

user: admin
password-file: ~/.asadmintruststore
admin-host: localhost
admin-port: 4848
domain: domain1
contextRoot: ${finalName} (only for WAR projects)

By default, the deploy and undeploy mojos use the archive (jar/war/ear) produced by your maven project and deploy it using your project's artifactId as module name.

Here is a pom example expressing the default configuration :

<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    [ ... ]

    <build>
        <plugins>
            <plugin>
                <groupId>org.codeartisans.asadmin</groupId>
                <artifactId>asadmin-maven-plugin</artifactId>
                <version>0.12</version>
                <configuration>
                    <glassfishHome>/path/to/your/glassfish/installation/folder</glassfishHome>
                    <domain>domain1</domain>
                    <host>localhost</host>
                    <port>4848</port>
                    <user>admin</user>
                    <passwordfile>~/.asadmintruststore</passwordfile>
                    <appArchive>${project.build.directory}/${project.build.finalName}.${project.artifact.artifactHandler.extension}</appArchive>
                    <contextRoot>war-exemple</contextRoot>
                </configuration>
            </plugin>
        </plugins>
    </build>

    [ ... ]

</project>

ChangeLog

asadmin-0.12 - 2013-02-07

Thanks to Alexander Ovchinnikov for his contribution to this release.

  • Redeploy action/goal now support upload

asadmin-0.11 - 2012-12-17

Thanks to Adi for his contribution to this release.

  • Added redeploy action and virtual servers support to the asadmin:deploy goal

asadmin-0.10 - 2012-11-04

Thanks to J.Francis and Charles Brown for their contribution to this release.

  • Added JSP precompile option to all deployment goals
  • Added asadmin:restart-domain goal
  • Added ability to deploy to remote instance/cluster
  • Added add-resources command and goal
  • Added start-cluster and stop-cluster commands and goals
  • Added --availabilityenabled param to the deploy command and goal
  • Added get-health command and goal
  • Added uptime command and goal
  • Better error handling

asadmin-0.9 - 2012-05-02


This code was previously hosted here.

About

Java API and Maven plugin to invoke Glassfish v3 & V2 asadmin commands

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%