users@maven-glassfish-plugin.java.net

EAR deployment: CLI136 Port 0 should be a numeric value

From: Florian Brunner <fbrunnerlist_at_gmx.ch>
Date: Tue, 03 Aug 2010 19:04:49 +0200

Hi,

I get errors when trying to deploy a sample with Maven. I build this sample application with NetBeans v6.9 and added the GlassFish sections:

<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>
    <parent>
        <artifactId>JMSSamplesEAMaven</artifactId>
        <groupId>com.mycompany</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <groupId>com.mycompany</groupId>
    <artifactId>JMSSamplesEAMaven-ear</artifactId>
    <packaging>ear</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>JMSSamplesEAMaven-ear JavaEE6 Assembly</name>
    <url>http://maven.apache.org</url>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <version>6</version>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.glassfish.maven.plugin</groupId>
                <artifactId>maven-glassfish-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <glassfishDirectory>${glassfish.home}</glassfishDirectory>
                    <user>admin</user>
                    <adminPassword>adminadmin</adminPassword>
                    <domain>
                        <name>${project.artifactId}</name>
                    </domain>
                    <components>
                        <component>
                            <name>${project.artifactId}</name>
                            <artifact>${project.build.directory}/${project.build.finalName}.ear</artifact>
                        </component>
                    </components>
                </configuration>
            </plugin>

        </plugins>
        <finalName>JMSSamplesEAMaven-ear</finalName>
    </build>
    <dependencies>
        <dependency>
            <groupId>com.mycompany</groupId>
            <artifactId>JMSSamplesEAMaven-ejb</artifactId>
            <version>1.0-SNAPSHOT</version>
            <type>ejb</type>
        </dependency>
        <!--<dependency>
            <groupId>com.mycompany</groupId>
            <artifactId>JMSSamplesEAMaven-app-client</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>-->
    </dependencies>
    <properties>
        <netbeans.hint.deploy.server>gfv3ee6</netbeans.hint.deploy.server>
        <glassfish.home>C:\glassfish-3.0.1\glassfish</glassfish.home>
    </properties>
</project>

The parent is just a simple multi-module project NetBeans created.

Here is the error I get:
----------

[DEBUG] Configuring mojo 'org.glassfish.maven.plugin:maven-glassfish-plugin:2.1:deploy' -->
[DEBUG] (s) name = JMSSamplesEAMaven-ear
[DEBUG] (s) artifact = C:\Users\someuser\Documents\NetBeansProjects\JMSSamplesEAMaven\JMSSamplesEAMaven-ear\target\JMSSamplesEAMaven-ear.ear
[DEBUG] (s) components = [org.glassfish.maven.plugin.Component_at_1546dbc]
[DEBUG] (s) name = JMSSamplesEAMaven-ear
[DEBUG] (s) domain = org.glassfish.maven.plugin.Domain_at_1a5db4b
[DEBUG] (s) glassfishDirectory = C:\glassfish-3.0.1\glassfish
[DEBUG] (s) debug = false
[DEBUG] (s) echo = true
[DEBUG] (s) terse = true
[DEBUG] (s) skip = false
[DEBUG] (s) autoCreate = true
[DEBUG] (s) user = admin
[DEBUG] (s) adminPassword = adminadmin
[DEBUG] (s) project = MavenProject: com.mycompany:JMSSamplesEAMaven-ear:1.0-SNAPSHOT @ C:\Users\someuser\Documents\NetBeansProjects\JMSSamplesEAMaven\JMSSamplesEAMaven-ear\pom.xml
[DEBUG] -- end configuration --
[INFO] [glassfish:deploy {execution: default}]
[INFO] Domain JMSSamplesEAMaven-ear isn't started. Starting it for you.
[DEBUG] [C:\glassfish-3.0.1\glassfish\bin\asadmin.bat, start-domain, --echo=true, --terse=true, --interactive=false, --user, admin, --passwordfile, C:\Users\someuser\AppData\Local\Temp\mgfp4350505127283898913.tmp, --debug=false, --domaindir, C:\glassfish-3.0.1\glassfish\domains, JMSSamplesEAMaven-ear]
[INFO] asadmin --host localhost --port 4848 --user admin --passwordfile C:\Users\someuser\AppData\Local\Temp\mgfp4350505127283898913.tmp --interactive=false --echo=true --terse=true start-domain --debug=false --domaindir C:\glassfish-3.0.1\glassfish\domains --help=false --upgrade=false --verbose=false JMSSamplesEAMaven-ear
[INFO] Started domain: JMSSamplesEAMaven-ear
[INFO] Domain location: C:\glassfish-3.0.1\glassfish\domains\JMSSamplesEAMaven-ear
[INFO] Log file: C:\glassfish-3.0.1\glassfish\domains\JMSSamplesEAMaven-ear\logs\server.log
[INFO] Admin port for the domain: 4848
[DEBUG] [C:\glassfish-3.0.1\glassfish\bin\asadmin.bat, deploy, --echo=true, --terse=true, --interactive=false, --user, admin, --passwordfile, C:\Users\someuser\AppData\Local\Temp\mgfp4350505127283898913.tmp, --host, localhost, --port, 0, --upload=false, --name, JMSSamplesEAMaven-ear, C:\Users\someuser\Documents\NetBeansProjects\JMSSamplesEAMaven\JMSSamplesEAMaven-ear\target\JMSSamplesEAMaven-ear.ear]
[INFO] Command deploy failed.
[ERROR] CLI136 Port 0 should be a numeric value.
[ERROR] Deployment of C:\Users\someuser\Documents\NetBeansProjects\JMSSamplesEAMaven\JMSSamplesEAMaven-ear\target\JMSSamplesEAMaven-ear.ear 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] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Deployment of C:\Users\someuser\Documents\NetBeansProjects\JMSSamplesEAMaven\JMSSamplesEAMaven-ear\target\JMSSamplesEAMaven-ear.ear failed.
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.BuildFailureException: Deployment of C:\Users\someuser\Documents\NetBeansProjects\JMSSamplesEAMaven\JMSSamplesEAMaven-ear\target\JMSSamplesEAMaven-ear.ear failed.
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoFailureException: Deployment of C:\Users\someuser\Documents\NetBeansProjects\JMSSamplesEAMaven\JMSSamplesEAMaven-ear\target\JMSSamplesEAMaven-ear.ear failed.
        at org.glassfish.maven.plugin.command.AsadminCommand.execute(AsadminCommand.java:121)
        at org.glassfish.maven.plugin.DeployGlassfishMojo.doExecute(DeployGlassfishMojo.java:66)
        at au.net.ocean.maven.plugin.OceanMojo.execute(OceanMojo.java:67)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        ... 17 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Tue Aug 03 17:55:18 BST 2010
[INFO] Final Memory: 10M/25M
[INFO] ------------------------------------------------------------------------
C:\Users\someuser\Documents\NetBeansProjects\JMSSamplesEAMaven\JMSSamplesEAMaven-ear>


-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail