Unable to compile GWT-Frontend

He we will discuss about how to make customization and improvement to the OpenKM source code.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
jorseng
Junior Boarder
Junior Boarder
Posts: 23
Joined: Tue Jan 16, 2018 2:22 pm

Unable to compile GWT-Frontend

Post by jorseng » Fri Feb 09, 2018 10:26 am

Hi All,

I have checkout the source code from github for OpenKM Community 6.3.4 version.
While i was able to export a workable OpenKM.war through the terminal command
$ mvn clean compile install

I am not able to build it in eclipse itself with the following steps:
1. Right click project "openkm"
2. Select "run-as"
3. Select "maven build..."
4. Goal set "clean gwt:compile install"
5. Set VM argument "-Xss1024k"
6. Apply & Run

I receive the following erorrlog:

Code: Select all

[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.4.0:compile (default-cli) on project openkm: GWT Module com.openkmfrontend.Main not found in project sources or resources. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.4.0:compile (default-cli) on project openkm: GWT Module com.openkmfrontend.Main not found in project sources or resources.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: GWT Module com.openkmfrontend.Main not found in project sources or resources.
    at org.codehaus.mojo.gwt.shell.CompileMojo.compilationRequired (CompileMojo.java:447)
    at org.codehaus.mojo.gwt.shell.CompileMojo.compile (CompileMojo.java:308)
    at org.codehaus.mojo.gwt.shell.CompileMojo.doExecute (CompileMojo.java:237)
While i did notice the module com.openkmfrontend.Main does not look right.
But i have searched in eclipse for "openkmfrontend", there is nothing like that.

Please tell me how can i fix this error.

jllort
Moderator
Moderator
Posts: 10341
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Unable to compile GWT-Frontend

Post by jllort » Sun Feb 11, 2018 8:20 am

Is quite strange this error the com.openkmfrontend.Main should be com.openkm.frontend.Main. I do not know from where is getting the other ?
Anyway I tested lates openkm code from gihub and it goes right with this commad line:
mvn -Dmaven.test.skip=true clean compile gwt:compile

I suggest remove the last parameter "install" what I think does not have sense in your scenario.

Also I do not know why are you only compiling the GWT, might be you are interested in debug https://docs.openkm.com/kcenter/view/ok ... rinterface

jorseng
Junior Boarder
Junior Boarder
Posts: 23
Joined: Tue Jan 16, 2018 2:22 pm

Re: Unable to compile GWT-Frontend

Post by jorseng » Mon Feb 12, 2018 5:21 am

Hi jjlort,

Thanks for your reply! Really appreciate your response, I have been trying to solve this for days!

I am sorry if my explanation is confusing.

As I was trying to deploy it inside eclipse itself, and somehow i received an error 404 page when I login to OpenKM. In one of the threads mentioned that the frontend was not compiled. Thus i end up trying to compile just the gwt-frontend.

Here is an update of what i did to generate the initial error encounter:
1. I re-ran maven build with Goal "clean compile" and the build is successful.
2. started server in eclipse. (tomcat version is the openkm version, not clean tomcat)

Here is the error page after login:
frontend.PNG

Let me know i should create a new thread for the above

jllort
Moderator
Moderator
Posts: 10341
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Unable to compile GWT-Frontend

Post by jllort » Thu Feb 15, 2018 5:49 pm

Forget this kind of magic, GWT is so special to get running from Eclipse in this manner, you can debug with tomcat started with GWT tools.

jorseng
Junior Boarder
Junior Boarder
Posts: 23
Joined: Tue Jan 16, 2018 2:22 pm

Re: Unable to compile GWT-Frontend

Post by jorseng » Tue Feb 20, 2018 4:23 am

Thanks! I'll find out how to use the debugging tool.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest