Eclipse dynamic project hit java.lang.NoClassDefFoundError even add dependencies in build.gradle

Good day,

Base on Eclipse WTP Tutorials - Creating Top Down Web Service via Apache Axis2 , I successful up the web service with my wsdl file. The different thing from the website is, I start my webservice in Jboss EAP , the tutorial was using TomCat as example.

I can curl request to http://localhost:8080/eai/services/MyDelegateBeanService successfully.

I would like to make some changes inside the MyDelegateBeanServiceSkeleton.java file, and I need some third party library, for example, com.google.guava . Thus, I try to add gradle on this project.

I create a build.gradle as follow:

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'

mainClassName = "myeai"

repositories { 
    mavenCentral() 
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
    implementation "com.google.guava:guava:17.0"
    testImplementation "junit:junit:4.12"
}

I can run gradle build , gradle eclipse successfully without error, and I can see the guava library appear in the reference library: enter image description here

In my java code, I can see my import is without compilation error as well:

import com.google.common.base.Strings;

System.out.println("item is " + Strings.isNullOrEmpty(reader.getText()));

However, when I curl again, I will hit the following error:

[ERROR] com/google/common/base/Strings
java.lang.NoClassDefFoundError: com/google/common/base/Strings

Caused by: java.lang.ClassNotFoundException: com.google.common.base.Strings from [Module "deployment.allpocEAR.ear.eai.war" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
    ... 47 more

May I know what is my mistaken?

I have try to restart my EAP server in jboss also the same.