wildfly-extras / wildfly-graphql-feature-pack

5 stars 6 forks source link

Add wildfly-maven-plugin `dev` mode to quickstart #111

Closed t1 closed 1 year ago

t1 commented 1 year ago

The quickstart could show how to run with the dev mode.

I've already tried it, but it doesn't recognise my @GraphQLApi:

            <plugin>
                <groupId>org.wildfly.plugins</groupId>
                <artifactId>wildfly-maven-plugin</artifactId>
                <version>4.1.0.Beta3</version>
                <configuration>
                    <feature-packs>
                        <feature-pack>
                            <location>wildfly@maven(org.jboss.universe:community-universe):current#27.0.1.Final</location>
                        </feature-pack>
                        <feature-pack>
                            <location>org.wildfly.extras.graphql:wildfly-microprofile-graphql-feature-pack:2.0.0.Final</location>
                        </feature-pack>
                    </feature-packs>
                    <layers>
                        <layer>cloud-server</layer>
                        <layer>management</layer>
                        <layer>h2-driver</layer>
                        <layer>ejb</layer>
                        <layer>microprofile-graphql</layer>
                    </layers>
                </configuration>
            </plugin>

BTW: the docu mentions galleon 4, but the provision.xml in the quickstart actually needs 5

jmartisk commented 1 year ago

Hey I can have a look at it but not sure when, as I'm quite busy nowadays and WildFly is that much of a priority for me. I also have never tried the WF dev mode yet. If you can figure out how to get it working, PRs are welcome.

t1 commented 1 year ago

When, instead of the <feature-packs>, I use the <feature-pack-location>org.wildfly.extras.graphql:wildfly-microprofile-graphql-feature-pack:${project.version}</feature-pack-location>, it run's into a NullPointerException: Cannot invoke "org.jboss.galleon.universe.UniverseSpec.getFactory()" because "universeSpec" is null in UniverseFactoryLoader.java:109, which I don't understand.

t1 commented 1 year ago

I could be a problem with the wildfly-maven-plugin, so I started a discussion there.

t1 commented 1 year ago

So it's actually a bug in the plugin. It works when you call mvn wildfly:provision wildfly:dev. I'll still create a PR including an update to the readme.