views:

67

answers:

1

I see that supports GlassFish v3, but the online examples is sparse. I continue to get the same error back from cargo: Cannot find the GlassFish admin CLI JAR: admin-cli.jar

Here is my pom

<plugin>
    <groupId>org.codehaus.cargo</groupId>
    <artifactId>cargo-maven2-plugin</artifactId>
    <version>1.0.3</version>
    <configuration>
        <container>
            <containerId>glassfish3x</containerId>
            <type>installed</type>
        </container>
        <configuration>
            <type>standalone</type>
            <home>C:\glassfishv3</home>
            <properties>
                <cargo.hostname>localhost</cargo.hostname>
                <cargo.servlet.port>8082</cargo.servlet.port>
                <cargo.remote.username></cargo.remote.username>
                <cargo.remote.password></cargo.remote.password>
            </properties>
        </configuration>
        <deployer>
            <type>installed</type>
            <deployables>
                <deployable>
                    <groupId>${groupId}</groupId>
                    <artifactId>${artifactId}</artifactId>
                    <type>war</type>
                </deployable>
            </deployables>
        </deployer>
    </configuration>
</plugin>

corrected Pom:

<plugin>
    <groupId>org.codehaus.cargo</groupId>
    <artifactId>cargo-maven2-plugin</artifactId>
    <version>1.0.3</version>
    <configuration>
        <container>
            <containerId>glassfish3x</containerId>
            <type>installed</type>
            <home>C:\glassfishv3</home>
        </container>
        <configuration>
            <type>standalone</type>
            <properties>
                <cargo.hostname>localhost</cargo.hostname>
                <cargo.servlet.port>8082</cargo.servlet.port>
                <!-- if no username/password don't use these, it will fail
                <cargo.remote.username></cargo.remote.username>
                <cargo.remote.password></cargo.remote.password> -->
            </properties>
        </configuration>
        <deployer>
            <type>installed</type>
            <deployables>
                <deployable>
                    <groupId>${groupId}</groupId>
                    <artifactId>${artifactId}</artifactId>
                    <type>war</type>
                </deployable>
            </deployables>
        </deployer>
    </configuration>
</plugin>
+1  A: 

In your Glassfish installation, do you have the admin-cli.jar file present in modules directory?

For more information about this module, check this link.


Edit

It seems that you have a problem in your configuration. As you can see here, there are several <home> nodes that can be used in the <configuration> of the Cargo plugin.

If you define the <home> inside the <configuration> tag, like you do in your pom.xml, this tag is used for:

For standalone configuration this is the location where Cargo will create the configuration and for existing configuration this is where it is located

However, in your case, you must move the <home> in the <container> tag. As described in the link above, this <home> is used for:

Location where the container is installed.

romaintaz
Yes module exists in glassfishv3/glassfish/modules. I'm wondering if cargo is looking at <home> for the correct app server information
Drew
@Drew, see my edit. The configuration of this plugin is really strange...
romaintaz
That was it, to be honest I read that link before reading your answer and the docs still didn't make since. They need to get much better docs. I wondered why my tomcat profile worked fine, until I realized it doesn't even use the file system it posts to the manager url. Thank you so much!
Drew