Skip to content

Conversation

@OndroMih
Copy link
Contributor

@OndroMih OndroMih commented Apr 29, 2025

This PR also introduces IT tests using the maven invoker plugin and moves existing tests to the same test suite (before they had to be executed via another maven execution).

Examples in invoker tests.

The artifact name is change to follow the maven guidelines for naming third-party plugin. With the new name, it's possible to just refer to the pluging with embedded-glassfish on command line, without need to specify full gorup and artifact IDs.

Short example of new functionality:

Start Embedded GlassFish version 7.0.23 specified as a property on command line:

mvn embedded-glassfish:run -Dglassfish.version=7.0.23

Start Embedded GlassFish version 7.0.23 specified as a config property:

<plugin>
    <groupId>org.glassfish.embedded</groupId>
    <artifactId>embedded-glassfish-maven-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>start</goal>
            </goals>
            <configuration>
                <glassfish.version>7.0.23</glassfish.version>
            </configuration>
        </execution>
    </executions>
</plugin>

Start Embedded GlassFish version 7.0.23 specified in dependency management:

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.glassfish.main.extras</groupId>
                <artifactId>glassfish-embedded-all</artifactId>
                <version>7.0.23</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.glassfish.embedded</groupId>
                <artifactId>embedded-glassfish-maven-plugin</artifactId>
                <version>7.1-SNAPSHOT</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>start</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

@OndroMih OndroMih requested a review from pzygielo April 29, 2025 22:16
To specify Embedded GlassFish version to use without having to add the whole dependnecy definition
Added tests to cover GlassFish version/artifact selection.
Moved old tests that were in nested maven modules to invoker tests.
@OndroMih OndroMih force-pushed the ondromih-glassfish-version branch from 5ba47ba to e5fd779 Compare September 29, 2025 19:41
@OndroMih OndroMih requested review from a team and dmatej September 29, 2025 19:44
@OndroMih OndroMih requested review from a team and removed request for a team October 6, 2025 06:39
@dmatej
Copy link
Contributor

dmatej commented Oct 6, 2025

I would do yet one minor change - we use -Dglassfish.version everywhere else (TCK, GF tests), so I would keep this for consistency.

@dmatej dmatej requested a review from a team October 6, 2025 07:45
@OndroMih OndroMih merged commit b2480eb into eclipse-ee4j:master Oct 6, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants