Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8595567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:28:00+00:00 2026-06-12T00:28:00+00:00

I am trying to automatically deploy our Java EE application from our build server

  • 0

I am trying to automatically deploy our Java EE application from our build server (Jenkins) to a remote Glassfish server via the command line.
At the moment I am using asadmin for this and it works fine, but this option requires me to have Glassfish installed on the build server as well – which I would like to avoid as I do not need it there. The build server is really only running the builds and the deployment so I would like to keep the server as “clean” as possible.

I can’t find any download that installs only the asadmin tools, and also my attempt to manually copy over only the required files failed as there are some dependencies to certain *.jars that I don’t know of so it always fails unless I copy the whole glassfish installation folder to the build server.

So my question is:
Does anybody know how to install only the asadmin tools without installing the whole Glassfish server?
Alternatively I would also be happy to use any other command line tools as long as they allow me to deploy to a remote Glassfish instance using secure communication.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:28:01+00:00Added an answer on June 12, 2026 at 12:28 am

    After doing a bit more research I gave up on trying to install asadmin without the full Glassfish installation and instead used Glassfish’s REST admin interface.

    I now made it work using CURL in a simple batch file:

    curl.exe ^
        --user glassfish_username:glassfish_password ^
        --insecure ^
        -H "Accept: application/json" ^
        -H "X-Requested-By: dummy" ^
        -X POST ^
        -F id=@yourfile.war ^
        -F contextroot=yourcontextroot ^
        -F force=true ^
        https://yourservername:4848/management/domain/applications/application/
    

    The REST API is fairly straight forward once you know what you need to do but just in case somebody else needs this, here a couple of important points:

    • –insecure is required (by CURL) to allow self-signed and untrusted SSL certificates
    • The header attributes for “Accept” and “X-Requested-By” must be set, otherwise Glassfish doesn’t process the request and simply returns a blank document as an ansower. No idea why but setting these parameters made it work.
    • The content of the war
      file is passed as the “id” parameter on the POST
    • The URL needs to be exactly as shown in the snipped above, i.e. do not replace “domain”
      with your domain name or “application” with your application name. This is the actual REST interface endpoint. There is no need to specify the domain/application name anywhere.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run a batch file automatically during a build from a
I'm trying to automatically exclude a library from my release build, but have it
I'm currently trying to write an internal application to be able to deploy our
I am currently trying to get a TFS Build Definition to automatically deploy my
I am trying to deploy my spring application in a server machine which having
I'm trying to set up a batch file to automatically deploy a php app
I am trying to automatically log in users to an Xwiki install via basic
i am trying to run a PHP automatically on a server every 15 minutes.
I'm trying to configure pom.xml so that it automatically deploys EAR archive to GlassFish
I am trying to automatically build html emails and am trying to figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.