简体   繁体   中英

unable to acess the admin console of Wildfly when using wildfly-maven-plugin

I am new to Wildfly (8.0.0.Final) and maven. I used the standalone script to start WildFly server and I've added a management user called admin to be able to acess the admin interface. But when I start the wildfly server using wildfly maven plugin like this :

   <plugin>
            <groupId>org.wildfly.plugins</groupId>
            <artifactId>wildfly-maven-plugin</artifactId>
            <version>1.0.0.Final</version>
            <configuration>
            /configuration> 
    </plugin>

and trying to access the admin console I see a prompt message ""Your WildFly Application Server is running. However you have not yet added any users to be able to access the admin console.""

Any clue??? Thanks

First of all why don't you use the latest versions of a) wildlfy server: 8.2.0 and b) wildlfy maven plugin: 1.0.2.Final

Now if you want to use maven to both start the server and deploy your app then you need to tell to maven where your server is located by using -Djboss-as.home property (info taken from http://blog.arungupta.me/wildfly-maven-plugin-tech-tip-9/ ) or set the <jbossHome/> configuration tag.

If the property -Djboss-as.home or <jbossHome/> is not specified WildFly is downloaded and started and the application is deployed to it. You will find at the target directory of your project the newly downloaded server, in my case: mavenWildfyTest\\target\\wildfly-run\\wildfly-8.2.0.Final Check into the bin folder and you will find add-user.bat . If you run it you will add a user and you will be able to log in to the management console of the downloaded wildlfy server.

However, I believe, this is not what you want but instead you want to use maven plugin to deploy apps in your own Wildfly server.

In that case you have two options:

  • start the server beforehand by using the standalone script (bat or sh) and then use mvn wildfly:deploy or
  • use mvn wildfly:run with -Djboss-as.home defined, in my case: mvn wildfly:run -Djboss-as.home=K:\\app_servers\\wildfly-8.1.0.Final

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM