users@glassfish.java.net

maven-glassfish-plugin 2.1 with SNAPSHOT dependencies

From: Lars Fischer <reschifl_at_googlemail.com>
Date: Thu, 18 Aug 2011 13:21:59 +0200

Hello,

I would like to use the maven-glassfish-plugin to run integration tests.

I configured maven like this:

<plugin>
        <groupId>org.glassfish.maven.plugin</groupId>
        <artifactId>maven-glassfish-plugin</artifactId>
        <version>2.1</version>
        <configuration>
          <glassfishDirectory>d:\dev\tools\glassfish_3.1.1\</glassfishDirectory>
          <domain>domain1</domain>
        </configuration>
        <executions>
        <execution>
          <id>start-gef</id>
          <phase>pre-integration-test</phase>
          <goals>
            <goal>start-domain</goal>
            <goal>deploy</goal>
          </goals>
          <configuration>
            <background>true</background>
            <logOutput>true</logOutput>
            <multiWindow>true</multiWindow>
          </configuration>
        </execution>
        <execution>
          <id>stop-gef</id>
          <phase>post-integration-test</phase>
          <goals>
            <goal>undeploy</goal>
            <goal>stop-domain</goal>
          </goals>
        </execution>
    </executions>


Running "mvn verify" on Maven v3.0.3 I get this result:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.794s
[INFO] Finished at: Thu Aug 18 13:11:09 CEST 2011
[INFO] Final Memory: 9M/247M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.glassfish.maven.plugin:maven-glassfish-plugin:2.1:start-domain
(start-gef)
on project it: Execution start-gef of goal
org.glassfish.maven.plugin:maven-glassfish-plugin:2.1:start-domain
failed: Plugin org.glassfish.maven.plugin:maven-glassfish-plugin:2.1
or one of its dependencies could not be r
esolved: Failed to collect dependencies for
org.glassfish.maven.plugin:maven-glassfish-plugin:jar:2.1 (): Fail
ed to read artifact descriptor for
org.apache.maven:maven-plugin-api:jar:2.1.0-M2-SNAPSHOT: Could not
find art
ifact org.apache.maven:maven-parent:pom:11-SNAPSHOT in my-mirror


Why do I need to get "SNAPSHOT" dependencies resolved when using a
released plugin?

Where is my mistake?


Regards,
Lars