Skip to content

Commit 57fd7bf

Browse files
committed
Merge pull request #3 from manalishah/OSSRH-20885
Ossrh 20885
2 parents 2c26c40 + 5b6d20d commit 57fd7bf

File tree

4 files changed

+155
-9
lines changed

4 files changed

+155
-9
lines changed

nltkrest-examples/pom.xml

Lines changed: 150 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,35 @@ the License.
1818
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1919
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2020
<modelVersion>4.0.0</modelVersion>
21-
<groupId>edu.usc.cs.ir</groupId>
21+
<groupId>edu.usc.ir</groupId>
2222
<artifactId>nltkrest-examples</artifactId>
2323
<packaging>jar</packaging>
2424
<version>1.0-SNAPSHOT</version>
25-
<name>Java REST client examples for NLTK integration with Tika</name>
26-
<url>http://maven.apache.org</url>
27-
<build>
25+
<name>NLTK REST Java Example Client</name>
26+
<description>Java REST client examples for NLTK integration with Tika</description>
27+
<url>https://github.com/manalishah/NLTKRest</url>
28+
<licenses>
29+
<license>
30+
<name>The Apache License, Version 2.0</name>
31+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
32+
</license>
33+
</licenses>
34+
<developers>
35+
<developer>
36+
<name>Manali Shah</name>
37+
<organization>USC</organization>
38+
</developer>
39+
<developer>
40+
<name>Chris A. Mattmann</name>
41+
<organization>JPL</organization>
42+
</developer>
43+
</developers>
44+
<scm>
45+
<url>https://github.com/manalishah/NLTKRest.git</url>
46+
<connection>scm:git:git://github.com/manalishah/NLTKRest.git</connection>
47+
</scm>
48+
<build>
49+
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
2850
<plugins>
2951
<plugin>
3052
<artifactId>maven-shade-plugin</artifactId>
@@ -76,8 +98,131 @@ the License.
7698
</execution>
7799
</executions>
78100
</plugin>
101+
<plugin>
102+
<groupId>org.apache.maven.plugins</groupId>
103+
<artifactId>maven-compiler-plugin</artifactId>
104+
<version>3.3</version>
105+
<configuration>
106+
<source>1.7</source>
107+
<target>1.7</target>
108+
</configuration>
109+
</plugin>
110+
<plugin>
111+
<groupId>org.apache.maven.plugins</groupId>
112+
<artifactId>maven-enforcer-plugin</artifactId>
113+
<version>1.4.1</version>
114+
<executions>
115+
<execution>
116+
<id>enforce-java</id>
117+
<phase>validate</phase>
118+
<goals>
119+
<goal>enforce</goal>
120+
</goals>
121+
<configuration>
122+
<rules>
123+
<requireJavaVersion>
124+
<version>[1.7.0,1.8)</version>
125+
<message>Error:: Please use jdk7 for compilation.</message>
126+
</requireJavaVersion>
127+
</rules>
128+
</configuration>
129+
</execution>
130+
</executions>
131+
</plugin>
79132
</plugins>
80133
</build>
134+
<profiles>
135+
<profile>
136+
<id>release</id>
137+
<activation>
138+
<activeByDefault>false</activeByDefault>
139+
</activation>
140+
<distributionManagement>
141+
<snapshotRepository>
142+
<id>ossrh</id>
143+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
144+
</snapshotRepository>
145+
<repository>
146+
<id>ossrh</id>
147+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
148+
</repository>
149+
</distributionManagement>
150+
<build>
151+
<plugins>
152+
<plugin>
153+
<groupId>org.sonatype.plugins</groupId>
154+
<artifactId>nexus-staging-maven-plugin</artifactId>
155+
<version>1.6.3</version>
156+
<extensions>true</extensions>
157+
<configuration>
158+
<serverId>ossrh</serverId>
159+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
160+
<autoReleaseAfterClose>false</autoReleaseAfterClose>
161+
</configuration>
162+
</plugin>
163+
<plugin>
164+
<groupId>org.apache.maven.plugins</groupId>
165+
<artifactId>maven-source-plugin</artifactId>
166+
<version>2.2.1</version>
167+
<executions>
168+
<execution>
169+
<id>attach-sources</id>
170+
<goals>
171+
<goal>jar-no-fork</goal>
172+
</goals>
173+
</execution>
174+
</executions>
175+
</plugin>
176+
<plugin>
177+
<groupId>org.apache.maven.plugins</groupId>
178+
<artifactId>maven-javadoc-plugin</artifactId>
179+
<version>2.9.1</version>
180+
<executions>
181+
<execution>
182+
<id>attach-javadocs</id>
183+
<goals>
184+
<goal>jar</goal>
185+
</goals>
186+
</execution>
187+
</executions>
188+
</plugin>
189+
<plugin>
190+
<groupId>org.apache.maven.plugins</groupId>
191+
<artifactId>maven-gpg-plugin</artifactId>
192+
<version>1.5</version>
193+
<executions>
194+
<execution>
195+
<id>sign-artifacts</id>
196+
<phase>verify</phase>
197+
<goals>
198+
<goal>sign</goal>
199+
</goals>
200+
</execution>
201+
</executions>
202+
</plugin>
203+
<plugin>
204+
<groupId>org.apache.maven.plugins</groupId>
205+
<artifactId>maven-assembly-plugin</artifactId>
206+
<version>2.3</version>
207+
<configuration>
208+
<descriptors>
209+
<descriptor>src/main/assembly/assembly.xml</descriptor>
210+
</descriptors>
211+
</configuration>
212+
<executions>
213+
<execution>
214+
<id>assembly-def</id>
215+
<phase>package</phase>
216+
<goals>
217+
<goal>single</goal>
218+
</goals>
219+
</execution>
220+
</executions>
221+
</plugin>
222+
</plugins>
223+
</build>
224+
</profile>
225+
</profiles>
81226
<dependencies>
82227
<dependency>
83228
<groupId>org.apache.cxf</groupId>
@@ -91,4 +236,4 @@ the License.
91236
<scope>test</scope>
92237
</dependency>
93238
</dependencies>
94-
</project>
239+
</project>

nltkrest-examples/src/main/java/edu/usc/cs/ir/nltkrest/CXFClient.java renamed to nltkrest-examples/src/main/java/edu/usc/ir/nltkrest/CXFClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package edu.usc.cs.ir.nltkrest;
17+
package edu.usc.ir.nltkrest;
1818

1919
import javax.ws.rs.core.Form;
2020
import javax.ws.rs.core.Response;

nltkrest/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ the `--process-dependency-links` to pip in order to install the software.
1818

1919
1. Just run `python setup.py install`
2020

21-
After installation you will have a command called `nltk-rest`. By default it starts a REST server
21+
After installation you will have a command called `nltk-server`. By default it starts a REST server
2222
on port `8881`. You can change the port by typing `--port or -p`. You can also turn on verbose
2323
mode by typing `-v`.
2424

2525
## Start the NLTK Server
2626

2727
To begin, start the server, turn on verbose mode, and change the port to 8888.
2828

29-
`nltk-rest -v --port 8888`
29+
`nltk-server -v --port 8888`
3030

3131
## Example cURL client command
3232

@@ -85,4 +85,4 @@ Contributors
8585

8686
License
8787
=======
88-
[Apache License, version 2](http://www.apache.org/licenses/LICENSE-2.0)
88+
[Apache License, version 2](http://www.apache.org/licenses/LICENSE-2.0)

nltkrest/nltkrest/server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from flask import Flask, request
2121
import nltk
2222
import json
23+
2324
from nltk_contrib import timex
2425
import time
2526
import sys

0 commit comments

Comments
 (0)