wildfly-maven-plugin as a dependency in the spacemvn wildfly: startQuestion
How to add this user? in WildFly with no Maven it is natural to enter wildfly/bin and run add-user.sh but how to do it well in Maven project, finally I go do target/wildfly-run/wildfly-12.0.0.Final/bin/add-user.sh but I'm guessing that this should not be good..
In pom.xml
<project>
    ...
    <build>
        ...
        <plugins>
            ...
            <plugin>
                <groupId>org.wildfly.plugins</groupId>
                <artifactId>wildfly-maven-plugin</artifactId>
                <version>1.2.1.Final</version>
                <configuration>
                    <add-user>
                        <users>
                            <user>
                                <username>admin</username>
                                <password>admin.1234</password>
                            </user>
                            <user>
                                <username>admin-user</username>
                                <password>user.1234</password>
                                <groups>
                                    <group>admin</group>
                                    <group>user</group>
                                </groups>
                                <application-user>true</application-user>
                            </user>
                            <user>
                                <username>default-user</username>
                                <password>user.1234</password>
                                <groups>
                                    <group>user</group>
                                </groups>
                                <application-user>true</application-user>
                            </user>
                        </users>
                    </add-user>
                </configuration>
            </plugin>
            ...
        </plugins>
        ...
    </build>
...
</project>
Source: Section Add a user before running the server of
https://docs.jboss.org/wildfly/plugins/maven/latest/examples/run-example.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With