srt / maven-openfire-plugin

The Maven Openfire Plugin is responsible for collecting all artifact dependencies, classes and resources of an Openfire plugin and packaging them into a jar suitable for deployment to an Openfire XMPP server.
http://maven.reucon.com/projects/public/maven-openfire-plugin/
Apache License 2.0
22 stars 26 forks source link

Failure Processing JSPC #2

Open niravdangi opened 10 years ago

niravdangi commented 10 years ago

I need to integrate Apple Push Notification Service to Openfire. For that I had followed openfire-apns-plugin. But when I am executing mvn clean install command (last step), I am getting error. So, because of that openfire-apns.jar is not created.

Please help me to figure out this issue. Following log is generated after executing mvn clean install,

root@vps [~/openfire_src/openfire-apns-plugin]# mvn clean install
[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building APNS Service 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ apns ---
[INFO] Deleting /root/openfire_src/openfire-apns-plugin/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ apns ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /root/openfire_src/openfire-apns-plugin/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ apns ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /root/openfire_src/openfire-apns-plugin/target/classes
[INFO] 
[INFO] --- maven-openfire-plugin:1.0.2-SNAPSHOT:jspc (default-jspc) @ apns ---
[INFO] Logging to org.slf4j.impl.SimpleLogger(org.mortbay.log) via org.mortbay.log.Slf4jLog
java.lang.NullPointerException: charsetName
    at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:99)
    at org.apache.jasper.compiler.JDTJavaCompiler.getJavaWriter(JDTJavaCompiler.java:120)
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:362)
    at org.apache.jasper.JspC.processFile(JspC.java:1137)
    at org.apache.jasper.JspC.execute(JspC.java:1306)
    at com.reucon.maven.plugin.openfire.jspc.JspcMojo.compile(JspcMojo.java:279)
    at com.reucon.maven.plugin.openfire.jspc.JspcMojo.execute(JspcMojo.java:196)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    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)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.557 s
[INFO] Finished at: 2014-09-15T06:01:37-05:00
[INFO] Final Memory: 17M/98M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.reucon.maven.plugins:maven-openfire-plugin:1.0.2-SNAPSHOT:jspc (default-jspc) on project apns: Failure processing jsps -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
annovanvliet commented 9 years ago

The jspc target of the plugin used java 1.5 which generated an error. Also the encoding was not initialized. I had to fixe the plugin for it.