Coder Social home page Coder Social logo

openfire-apns-plugin's Introduction

Building

Pre-requisite: Use Maven 2.2.1

  1. Install maven-openfire-plugin from https://github.com/srt/maven-openfire-plugin
  2. Obtain a copy of openfire.jar and install it into maven. There are serveral ways you can do it, here are two of them:
  • Option 1. Download source code of the version of openfire you need at http://www.igniterealtime.org/downloads/source.jsp

    Then set $OPENFIRE_PATH and $OPENFIRE_VERSION environment variables according to source code path and version and run:

    cd $OPENFIRE_PATH/build
    ant
    mvn install:install-file -DgroupId=org.igniterealtime.openfire -DartifactId=openfire -Dversion=$OPENFIRE_VERSION -Dpackaging=jar -DgeneratePom=true -Dfile=$OPENFIRE_PATH/target/openfire/lib/openfire.jar
  • Option 2. If you installed openfire using openfire*.deb package on ubuntu, you can find openfire.jar inside /usr/share/openfire/lib:

    Because this directory is read protected from regular users, you would first have to copy it to somewhere in your home directory and change it's read permissions using sudo, e.g by running:

    sudo cp /usr/share/openfire/lib/openfire.jar .
    sudo chmod a+r openfire.jar

    Now you can install it into maven by running:

    mvn install:install-file -DgroupId=org.igniterealtime.openfire -DartifactId=openfire -Dversion=$OPENFIRE_VERSION -Dpackaging=jar -DgeneratePom=true -Dfile=openfire.jar
  1. Inside openfire-apns-plugin directory run: mvn clean install
  2. If the build was successfull openfire-apns.jar should appear in target directory.

openfire-apns-plugin's People

Contributors

fernandoofj avatar flyerhzm avatar yesenarman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openfire-apns-plugin's Issues

org.apache.jasper.JasperException: java.lang.NullPointerException: charsetName Failure processing jsps

In the last step the error is as follow:-

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building APNS Service
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting /home/eduos/openfire/openfire-apns-plugin/target
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/eduos/openfire/openfire-apns-plugin/src/main/resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /home/eduos/openfire/openfire-apns-plugin/target/classes
[INFO] [openfire:jspc {execution: default-jspc}]
2015-01-03 16:46:05.952::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
java.lang.NullPointerException: charsetName
at java.io.OutputStreamWriter.(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.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] : org.apache.jasper.JasperException: java.lang.NullPointerException: charsetName
Failure processing jsps
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Sat Jan 03 16:46:06 IST 2015
[INFO] Final Memory: 25M/217M
[INFO] ------------------------------------------------------------------------

I have tried openfire3.9.3 and 3.8.2. I have also tried changing the maven-plugin pom.xml to maven 2.1.0. Please help!!

apns.jsp is having problems.

Turns out the apns.jsp can not correctly send form data to apnsplugin. I will test and let you guys know if it can be fixed.

Failure Processing JSPC

All the steps given in this tutorial are done, instead of last step mvn clean install.
I am getting exception of java.lang.NullPointerException: charsetName and because of that I am not able to build openfire-apns.jar.
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

after install APNS plugin not working

after install APNS plugin
in openfire admin, APNS setting tag when i open page then give error 404.

have this configuration

Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-i386/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux", version: "4.10.0-39-generic", arch: "i386", family: "unix"

implement in Windows

Is This plugin work in Windows pc?
if not than how can i implement this plugin in openfire on windows laptop

Push messages are not sent.

I am using this plugin and it does not send push notifications.
I have properly set the p12 file and the password but when I view the logs, I get "password was incorrect" exception.

Any ideas?

Plugin update for newer Openfire and APNS versions

Hi guys!

I was implementing push notifications for Openfire. I used this plugin and updated it to work with newer Openfire versions and I also switched to using Pushy for sending the actual pushes.

It its core, the plugin is similar to this one, but I already modified many things. I could open a PR and you might consider accepting these changes, but granted, they are sometimes opinionated and might not be what you are going for in this project.

Anyway, any feedback is appreciated so let me know what you think. You can find my code here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.