Cargo 1.4.14 configuring GlassFish4x container

567 views
Skip to first unread message

Paul Statham

unread,
Jul 24, 2015, 9:41:08 AM7/24/15
to Codehaus Cargo
I am trying to configure the `cargo-maven2-plugin` to start my local install of Glassfish 4.1. I have the following configured in my pom.xml

            <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>
                <version>1.4.14</version>
                <executions>
                    <execution>
                        <id>start-container</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>start</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>stop-container</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <container>
                        <containerId>glassfish4x</containerId>
                        <home>${glassfish.installDirectory}</home>
                    </container>
                    <configuration>
                        <type>existing</type>
                    </configuration>
                    <deployables>
                        <deployable>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>${project.artifactId}</artifactId>
                            <type>war</type>
                            <pingURL>${web.app.url}</pingURL>
                        </deployable>
                    </deployables>
                </configuration>
            </plugin>


But it fails with the following

   

> Failed to execute goal
> org.codehaus.cargo:cargo-maven2-plugin:1.4.14:start (start-container)
> on project UsersJSFMavenApplication: Execution start-container of goal
> org.codehaus.cargo:cargo-maven2-plugin:1.4.14:start failed: Cannot
> create configuration. There's no registered configuration for the
> parameters (container [id = [glassfish4x], type = [installed]],
> configuration type [existing]). Actually there are no valid types
> registered for this configuration. Maybe you've made a mistake
> spelling it? -> [Help 1]

Any ideas?

Karel Suta

unread,
Jul 24, 2015, 10:01:40 AM7/24/15
to Codehaus Cargo, paul.st...@gmail.com
Hi Paul,

One idea, if you don't have created glassfish domain yet try to use configuration type standalone - it will create own domain.
If you have domain provide it in <home> tag in configuration below <type>.

Br, Karel


Dne pátek 24. července 2015 15:41:08 UTC+2 Paul Statham napsal(a):

S. Ali Tokmen

unread,
Jul 26, 2015, 10:25:05 AM7/26/15
to codehau...@googlegroups.com
Hi Paul

As explained on https://codehaus-cargo.github.io/cargo/Existing+Local+Configuration.html an existing configuration means you want Cargo to use an existing Glassfish configuration - Which implies you need to specify the path of the configuration.

If you want Cargo to create the configuration for you, please use a https://codehaus-cargo.github.io/cargo/Standalone+Local+Configuration.html

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/af86b400-46e3-4d7c-98e3-2bbcb3ca6318%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Statham

unread,
Jul 28, 2015, 3:35:08 AM7/28/15
to Codehaus Cargo, nos...@alishomepage.com
Hi Both,

Thanks for the replies, I have now tried the following

                <configuration>
                    <container>
                        <containerId>glassfish4x</containerId>
                        <home>${glassfish.installDirectory}</home>
                    </container>
                    <configuration>
                        <type>standalone</type>
                        <home>${basedir}/target/glassfish4x</home>

                    </configuration>
                    <deployables>
                        <deployable>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>${project.artifactId}</artifactId>
                            <type>war</type>
                            <pingURL>${web.app.url}</pingURL>
                        </deployable>
                    </deployables>
                </configuration>

But I'm receiving a similar message

Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.14:start (start-container) on project UsersJSFMavenApplication: Execution start-container of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.14:start failed: Cannot create configuration. There's no registered configuration for the parameters (container [id = [glassfish4x], type = [installed]], configuration type [standalone]). Actually there are no valid types registered for this configuration. Maybe you've made a mistake spelling it? -> [Help 1]

Karel Suta

unread,
Jul 29, 2015, 3:16:20 PM7/29/15
to Codehaus Cargo, nos...@alishomepage.com, paul.st...@gmail.com
Hi Paul,

I just tried to run Cargo maven plugin with your configuration against Glassfish on my PC on Linux and it runs.
Maybe there can be some issue with maven.
Try to run maven build with parameter -U to update all dependencies.
If it doesn't help try to delete all Cargo dependencies from local repository(org/codehaus/cargo) and run build again. Check if maven downloaded artifact cargo-core-container-glassfish.

Br, Karel


Dne úterý 28. července 2015 9:35:08 UTC+2 Paul Statham napsal(a):

Paul Statham

unread,
Jul 31, 2015, 3:21:01 AM7/31/15
to Codehaus Cargo, nos...@alishomepage.com, paul.st...@gmail.com, krl...@gmail.com
Ah ha! That could be the issue thanks! I'm running a Nexus repository that is cut off from Maven central that is very likely to be the issue, thank you!

S. Ali Tokmen

unread,
Jul 31, 2015, 8:45:41 PM7/31/15
to codehau...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages