Author: sergeyb
Date: Sun Jan 19 18:02:02 2014
New Revision: 1559540

URL: http://svn.apache.org/r1559540
Log:
Adding a server profile to Tika Server

Modified:
    tika/trunk/tika-server/pom.xml
    
tika/trunk/tika-server/src/main/java/org/apache/tika/server/TikaServerCli.java

Modified: tika/trunk/tika-server/pom.xml
URL: 
http://svn.apache.org/viewvc/tika/trunk/tika-server/pom.xml?rev=1559540&r1=1559539&r2=1559540&view=diff
==============================================================================
--- tika/trunk/tika-server/pom.xml (original)
+++ tika/trunk/tika-server/pom.xml Sun Jan 19 18:02:02 2014
@@ -171,7 +171,31 @@
       </plugin>
     </plugins>
   </build>
-
+  <profiles>
+     <profile>
+         <id>server</id>
+         <build>
+             <defaultGoal>test</defaultGoal>
+             <plugins>
+                 <plugin>
+                     <groupId>org.codehaus.mojo</groupId>
+                     <artifactId>exec-maven-plugin</artifactId>
+                     <executions>
+                        <execution>
+                             <phase>test</phase>
+                             <goals>
+                                 <goal>java</goal>
+                             </goals>
+                             <configuration>
+                                 
<mainClass>org.apache.tika.server.TikaServerCli</mainClass>
+                             </configuration>
+                          </execution>
+                      </executions>
+                  </plugin>
+              </plugins>
+         </build>
+      </profile>
+  </profiles>  
   <url>http://tika.apache.org/</url>
   <organization>
        <name>The Apache Software Foundation</name>

Modified: 
tika/trunk/tika-server/src/main/java/org/apache/tika/server/TikaServerCli.java
URL: 
http://svn.apache.org/viewvc/tika/trunk/tika-server/src/main/java/org/apache/tika/server/TikaServerCli.java?rev=1559540&r1=1559539&r2=1559540&view=diff
==============================================================================
--- 
tika/trunk/tika-server/src/main/java/org/apache/tika/server/TikaServerCli.java 
(original)
+++ 
tika/trunk/tika-server/src/main/java/org/apache/tika/server/TikaServerCli.java 
Sun Jan 19 18:02:02 2014
@@ -52,7 +52,7 @@ public class TikaServerCli {
   public static void main(String[] args) {
     Properties properties = new Properties();
     try {
-      
properties.load(ClassLoader.getSystemResourceAsStream("tikaserver-version.properties"));
+      
properties.load(TikaServerCli.class.getClassLoader().getResourceAsStream("tikaserver-version.properties"));
     } catch (IOException e) {
       throw new RuntimeException(e);
     }


Reply via email to