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 3350458
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:47:21+00:00 2026-05-18T01:47:21+00:00

I have just started using maven-glassfish-plugin. I got the start-domain goal working. However when

  • 0

I have just started using maven-glassfish-plugin. I got the start-domain goal working. However when I try to execute the deploy goal, the plugin thinks that the domain is not started and tries to restart it – this obviously fails. See log below:

> mvn glassfish:start-domain
[INFO] --- maven-glassfish-plugin:2.1:start-domain (default-cli) @ arquillian-sample ---
[INFO] Deprecated syntax, instead use:
[INFO] asadmin --passwordfile C:\apps\glassfish-3.0.1\glassfish/domains/domain1/config/domain-passwords --interactive=false --user admin --echo --terse=false start-domain [options] ...
[INFO] asadmin --host localhost --port 4848 --user admin --passwordfile C:\apps\glassfish-3.0.1\glassfish/domains/domain1/config/domain-passwords --interactive=false --echo=true --terse=false start-domain --debug=true --domaindir C:\apps\glassfish-3.0.1\glassfish\domains --help=false --upgrade=false --verbose=false domain1
[INFO] Waiting for DAS to start ...
[INFO] Started domain: domain1
[INFO] Domain location: C:\apps\glassfish-3.0.1\glassfish\domains\domain1
[INFO] Log file: C:\apps\glassfish-3.0.1\glassfish\domains\domain1\logs\server.log
[INFO] Admin port for the domain: 4848
[INFO] Debug port for the domain: 9009
[INFO] Command start-domain executed successfully.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

> mvn glassfish:deploy
[INFO] --- maven-glassfish-plugin:2.1:deploy (default-cli) @ arquillian-sample ---
[INFO] Domain domain1 isn't started. Starting it for you.
[INFO] Deprecated syntax, instead use:
[INFO] asadmin --passwordfile C:\apps\glassfish-3.0.1\glassfish/domains/domain1/config/domain-passwords --interactive=false --user admin --echo --terse=false start-domain [options] ...
[INFO] asadmin --host localhost --port 4848 --user admin --passwordfile C:\apps\glassfish-3.0.1\glassfish/domains/domain1/config/domain-passwords --interactive=false --echo=true --terse=false start-domain --debug=true --domaindir C:\apps\glassfish-3.0.1\glassfish\domains --help=false --upgrade=false --verbose=false domain1
[INFO] There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.
[INFO] Command start-domain failed.
[ERROR] Unable to start domain "domain1".
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
  1. Why can’t the plugin detect that the domain has already started?
  2. Why am I getting all the “Deprecated syntax” warnings?

To workaround issue #1, I simply tried to issue the deploy goal when the server is not running. This time the deploy goal successfully started the server, but the deployment failed with the message “CLI136 Port 0 should be a numeric value”. See below:

> mvn glassfish:deploy
[INFO] --- maven-glassfish-plugin:2.1:deploy (default-cli) @ arquillian-sample ---
[INFO] Domain domain1 isn't started. Starting it for you.
[INFO] Deprecated syntax, instead use:
[INFO] asadmin --passwordfile C:\apps\glassfish-3.0.1\glassfish/domains/domain1/config/domain-passwords --interactive=false --user admin --echo --terse=false start-domain [options] ...
[INFO] asadmin --host localhost --port 4848 --user admin --passwordfile C:\apps\glassfish-3.0.1\glassfish/domains/domain1/config/domain-passwords --interactive=false --echo=true --terse=false start-domain --debug=true --domaindir C:\apps\glassfish-3.0.1\glassfish\domains --help=false --upgrade=false --verbose=false domain1
[INFO] Waiting for DAS to start ...
[INFO] Started domain: domain1
[INFO] Domain location: C:\apps\glassfish-3.0.1\glassfish\domains\domain1
[INFO] Log file: C:\apps\glassfish-3.0.1\glassfish\domains\domain1\logs\server.log
[INFO] Admin port for the domain: 4848
[INFO] Debug port for the domain: 9009
[INFO] Command start-domain executed successfully.
[INFO] Command deploy failed.
[ERROR] CLI136 Port 0 should be a numeric value.
[ERROR] Deployment of S:\Projects\archfirstunf\java\trunk\examples\arquillian-sample\target\arquillian-sample.war failed.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

What am I doing wrong?

Here’s my plugin configuration:

<plugin>
    <groupId>org.glassfish.maven.plugin</groupId>
    <artifactId>maven-glassfish-plugin</artifactId>
    <version>2.1</version>
    <configuration>
        <glassfishDirectory>${glassfish.directory}</glassfishDirectory>
        <user>admin</user>
        <passwordFile>${glassfish.directory}/domains/domain1/config/domain-passwords</passwordFile>
        <domain>
            <name>domain1</name>
        </domain>
        <components>
            <component>
                <name>${project.artifactId}</name>
                <artifact>target/${project.build.finalName}.war</artifact>
            </component>
        </components>
        <debug>true</debug>
        <terse>false</terse>
        <echo>true</echo>
    </configuration>
</plugin>
  • 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-05-18T01:47:22+00:00Added an answer on May 18, 2026 at 1:47 am

    I’m using the following configuration (note the httpPort and adminPort in the domain element):

    <plugin>
        <groupId>org.glassfish.maven.plugin</groupId>
        <artifactId>maven-glassfish-plugin</artifactId>
        <version>2.1</version>
        <configuration>
            <glassfishDirectory>${glassfish.directory}</glassfishDirectory>
            <user>admin</user>
            <passwordFile>${glassfish.directory}/domains/domain1/config/domain-passwords</passwordFile>
            <domain>
                <name>domain1</name>
                <httpPort>8080</httpPort>
                <adminPort>4848</adminPort>
            </domain>
            <components>
                <component>
                    <name>${project.artifactId}</name>
                    <artifact>target/${project.build.finalName}.war</artifact>
                </component>
            </components>
            <debug>true</debug>
            <terse>false</terse>
            <echo>true</echo>
        </configuration>
    </plugin>
    

    Without them, things weren’t working as expected (although they are supposed to be optional). But starting, deploying (with or without the server started), etc just works fine for me.

    PS: I don’t remember if this is important but I’m using version 2.2-SNAPSHOT Of the plugin.


    Update: Here is the exact configuration I use:

      <plugin>
        <groupId>org.glassfish.maven.plugin</groupId>
        <artifactId>maven-glassfish-plugin</artifactId>
        <version>2.2-SNAPSHOT</version>
        <configuration>
          <glassfishDirectory>${glassfish.home}</glassfishDirectory>
          <user>${domain.username}</user>
          <passwordFile>${glassfish.home}/domains/${project.artifactId}/master-password</passwordFile>
          <autoCreate>true</autoCreate>
          <debug>true</debug>
          <echo>true</echo>
          <skip>${test.int.skip}</skip>
          <domain>
            <name>${project.artifactId}</name>
            <httpPort>8080</httpPort>
            <adminPort>4848</adminPort> <!-- [ERROR] CLI136 Port 0 should be a numeric value. -->
          </domain>
          <components>
            <component>
              <name>${project.artifactId}</name>
              <!--artifact>${project.build.directory}/${project.build.finalName}.war</artifact-->
              <artifact>${project.build.directory}/${project.build.finalName}</artifact>
            </component>
          </components>
        </configuration>
      </plugin>
    

    And here is the output I get:

    $ mvn glassfish:deploy 
    [INFO] Scanning for projects...
    ...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building maven-glassfish-testcase Maven Webapp 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- maven-glassfish-plugin:2.2-SNAPSHOT:deploy (default-cli) @ maven-glassfish-testcase ---
    ...
    [INFO] asadmin --host localhost --port 4848 --user admin --passwordfile /home/pascal/opt/glassfishv3/glassfish/domains/maven-glassfish-testcase/master-password --interactive=false --echo=true --terse=true deploy --name maven-glassfish-testcase --force=false --precompilejsp=false --verify=false --enabled=true --generatermistubs=false --availabilityenabled=false --keepreposdir=false --keepfailedstubs=false --logReportedErrors=true --upload=false --help=false /home/pascal/Projects/stackoverflow/maven-glassfish-testcase/target/maven-glassfish-testcase
    [INFO] Application deployed successfully with name maven-glassfish-testcase.
    [INFO] 
    [INFO] 
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    ...
    

    Note that I don’t get any weird “deprecated” message. And things just work fine.

    Adding httpPort and adminPort adds a new complication – now authentication is failing when I do the deploy (even though the same authentication is passing for the start-domain goal).

    > mvn glassfish:start-domain
    [INFO] --- maven-glassfish-plugin:2.2-SNAPSHOT:start-domain (default-cli) @ arquillian-sample ---
    [INFO] Deprecated syntax, instead use:
    [INFO] asadmin --passwordfile C:\apps\glassfish-3.0.1\glassfish/domains/domain1/config/domain-passwords --interactive=false --user admin --echo --terse=false start-domain [options] ...
    [INFO] asadmin --host localhost --port 4848 --user admin --passwordfile C:\apps\glassfish-3.0.1\glassfish/domains/domain1/config/domain-passwords --interactive=false --echo=true --terse=false start-domain --debug=true --domaindir C:\apps\glassfish-3.0.1\glassfish\domains --help=false --upgrade=false --verbose=false domain1
    [INFO] Waiting for DAS to start ...........
    [INFO] Started domain: domain1
    [INFO] Domain location: C:\apps\glassfish-3.0.1\glassfish\domains\domain1
    [INFO] Log file: C:\apps\glassfish-3.0.1\glassfish\domains\domain1\logs\server.log
    [INFO] Admin port for the domain: 4848
    [INFO] Debug port for the domain: 9009
    [INFO] Command start-domain executed successfully.
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    
    > mvn glassfish:deploy
    [INFO] --- maven-glassfish-plugin:2.2-SNAPSHOT:deploy (default-cli) @ arquillian-sample ---
    [INFO] Deprecated syntax, instead use:
    [INFO] asadmin --port 4848 --host localhost --passwordfile C:\apps\glassfish-3.0.1\glassfish/domains/domain1/config/domain-passwords --interactive=false --user admin --echo --terse=false deploy [options] ...
    [INFO] Command deploy failed.
    [ERROR] Authentication failed for user: admin
    [ERROR] (Usually, this means invalid user name and/or password)
    [ERROR] Deployment of S:\Projects\archfirstunf\java\trunk\examples\arquillian-sample\target\arquillian-sample.war failed.
    [ERROR] For more detail on what might be causing the problem try running maven with the --debug option
    [ERROR] or setting the maven-glassfish-plugin "echo" property to "true".
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.973s
    [INFO] Finished at: Wed Nov 10 01:51:04 EST 2010
    [INFO] Final Memory: 10M/183M
    [INFO] ------------------------------------------------------------------------
    

    Changing version to 2.2-SNAPSHOT makes no difference. BTW the snapshot is not available in the java.net repository – I had to go here to get it:

        <pluginRepository>
            <id>ocean</id>
            <url>http://maven.ocean.net.au/snapshot</url>
            <releases>
                <enabled>false</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </pluginRepository>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have just started using visual studio 2008.I am working on c#. I want
I have just started using services in Android and I have a made a
I have just started using Ruby and I am reading Programming Ruby 1.9 -
I have just started using UIDatePicker in my iPad app, but is there a
I have just started a project that involves me sending data using POST in
I am new to ruby on rails and I have just started watching rails
I just started using CakePHP, and am learning how to use Bake. Why does
We just started using hg and we're using base tags for common modules in
I've just started using PLINQO which looks really good so far. The only problem
I read that adding functions to an object will chew up more memory then

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.