diff --git a/EXPORTS b/EXPORTS deleted file mode 100644 index 2e4e9f2..0000000 --- a/EXPORTS +++ /dev/null @@ -1,4 +0,0 @@ -,com.dotmarketing.beans, -com.dotmarketing.business, -com.dotmarketing.util, -twitter4j \ No newline at end of file diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF deleted file mode 100644 index 4d88965..0000000 --- a/META-INF/MANIFEST.MF +++ /dev/null @@ -1,17 +0,0 @@ -Manifest-Version: 1.0 -Author: Aquent, LLC (cfalzone@aquent.com) -Bundle-Name: Twitter OSGI Viewtool -Bundle-Activator: com.aquent.viewtools.TwitterToolActivator -Bundle-SymbolicName: Twitter OSGI Viewtool -Bundle-Version: 1.0.0 -Bundle-RequiredExecutionEnvironment: OSGi/Minimum-1.0 -Bundle-ClassPath: .,lib/twitter4j-async-3.0.3.jar,lib/twitter4j-core-3.0.3.jar,lib/twitter4j-media-support-3.0.3.jar,lib/twitter4j-stream-3.0.3.jar -DynamicImport-Package: * -Import-Package: org.osgi.service.http, - org.apache.felix.http.api, - org.apache.velocity.tools, - org.apache.velocity.tools.view, - org.apache.velocity.tools.view.tools, - com.dotmarketing.util, - com.dotmarketing.beans, - com.dotmarketing.business diff --git a/README.md b/README.md index 3dfe758..375f674 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,8 @@ Twitter OSGI Viewtool ================================================= An osgi plugin for dotCMS that adds a viewtool for interacting with Twitter using Twitter4J. -Installation -================================== -* Navigate to the dotCMS Dynamic plugins page: "System" > "Dynamic Plugins" -* Click on "Upload plugin" and select the .jar file located in the "build/jar/" folder -* Click on "Exported Packages" and add the contents of the EXPORTS file to the bottom of the list - Twitter4J Configuration -=================================== +----------------------- You need to create the following host variables and enter the values in your Default Host: twitter4JConsumerKey - Text @@ -20,8 +14,20 @@ twitter4jDebug - Boolean (Select or Radio with True/False) For More information see the Twitter4J website: http://twitter4j.org/en/configuration.html -Usage: -====== +Installation +------------ +* Make sure you have the Twitter4J Configuration setup before deploying the osgi jar +* Navigate to the dotCMS Dynamic plugins page: "System" > "Dynamic Plugins" +* Click on "Upload plugin" and select the .jar file located in the "build/jar/" folder +* Click on "Exported Packages" and add the following to the bottom of the list +``` +,com.dotmarketing.beans, +com.dotmarketing.business, +com.dotmarketing.util +``` + +Usage +------ You will want to have to Twitter4J JavaDoc handy: http://twitter4j.org/javadoc/index.html The tool is mapped to the key $twitter and currently has the following methods implemented: @@ -160,6 +166,11 @@ If a method is not working check your log file, you probably exceeded the twitte ``` -Additional Info: -==================================== +Building +-------- +* Install Gradle (if not already installed) +* gradle jar + +Additional Info +---------------- This plugin includes software from Twitter4J.org. You can see the license term at http://twitter4j.org/en/index.html#license diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..5a61481 --- /dev/null +++ b/build.gradle @@ -0,0 +1,39 @@ +apply plugin: 'war' +apply plugin: 'osgi' +apply plugin: 'eclipse' + +sourceCompatibility = '1.6' +version = '1.0' + +repositories { + maven { + url "http://repo.dotcms.com/artifactory/libs-release" + } +} + +dependencies { + compile (group: 'com.dotcms', name: 'dotcms', version: '2.5.1'){ + transitive = true + } + providedCompile "javax.servlet:servlet-api:2.5" + compile fileTree(dir: 'src/main/resources/lib', include: '*.jar') +} + +jar { + manifest { + name = 'Aquent TwitterTool' + symbolicName = 'com.aquent.plugins.twittertool' + instruction 'Bundle-Vendor', 'Aquent, LLC (cfalzone@aquent.com)' + instruction 'Bundle-Description', 'Aquent TwiterTool Plugin' + instruction 'Bundle-DocURL', 'http://www.aquent.com' + instruction 'Bundle-Activator', 'com.aquent.viewtools.TwitterToolActivator' + instruction 'Bundle-ClassPath', '.', + 'lib/twitter4j-async-3.0.3.jar', + 'lib/twitter4j-core-3.0.3.jar', + 'lib/twitter4j-media-support-3.0.3.jar', + 'lib/twitter4j-stream-3.0.3.jar' + instruction 'DynamicImport-Package', '*' + instruction 'Import-Package', '!org.springframework.*', '!twitter4j.*', '*;version=0' + } +} + diff --git a/build.xml b/build.xml deleted file mode 100644 index f918abe..0000000 --- a/build.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Building at: ${plugin.name} at ${basedir} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/jar/bundle-com.aquent.plugins.twittertool.jar b/build/libs/com.aquent.plugins.twittertool-0.1.jar similarity index 96% rename from build/jar/bundle-com.aquent.plugins.twittertool.jar rename to build/libs/com.aquent.plugins.twittertool-0.1.jar index d34704b..f8569de 100644 Binary files a/build/jar/bundle-com.aquent.plugins.twittertool.jar and b/build/libs/com.aquent.plugins.twittertool-0.1.jar differ diff --git a/src/com/aquent/viewtools/TwitterTool.java b/src/main/java/com/aquent/viewtools/TwitterTool.java similarity index 100% rename from src/com/aquent/viewtools/TwitterTool.java rename to src/main/java/com/aquent/viewtools/TwitterTool.java diff --git a/src/com/aquent/viewtools/TwitterToolActivator.java b/src/main/java/com/aquent/viewtools/TwitterToolActivator.java similarity index 100% rename from src/com/aquent/viewtools/TwitterToolActivator.java rename to src/main/java/com/aquent/viewtools/TwitterToolActivator.java diff --git a/src/com/aquent/viewtools/TwitterToolInfo.java b/src/main/java/com/aquent/viewtools/TwitterToolInfo.java similarity index 100% rename from src/com/aquent/viewtools/TwitterToolInfo.java rename to src/main/java/com/aquent/viewtools/TwitterToolInfo.java diff --git a/lib/twitter4j-async-3.0.3.jar b/src/main/resources/lib/twitter4j-async-3.0.3.jar similarity index 100% rename from lib/twitter4j-async-3.0.3.jar rename to src/main/resources/lib/twitter4j-async-3.0.3.jar diff --git a/lib/twitter4j-core-3.0.3.jar b/src/main/resources/lib/twitter4j-core-3.0.3.jar similarity index 100% rename from lib/twitter4j-core-3.0.3.jar rename to src/main/resources/lib/twitter4j-core-3.0.3.jar diff --git a/lib/twitter4j-media-support-3.0.3.jar b/src/main/resources/lib/twitter4j-media-support-3.0.3.jar similarity index 100% rename from lib/twitter4j-media-support-3.0.3.jar rename to src/main/resources/lib/twitter4j-media-support-3.0.3.jar diff --git a/lib/twitter4j-stream-3.0.3.jar b/src/main/resources/lib/twitter4j-stream-3.0.3.jar similarity index 100% rename from lib/twitter4j-stream-3.0.3.jar rename to src/main/resources/lib/twitter4j-stream-3.0.3.jar