Browse Source

made oc_framework a mvn project
updated compile instructions for mvn

oc_framework is a standalone mvn project which must be installed.
if anyone knows how to make oc_framework a submodule without changing the directory structure ... please do it!

Luke Owncloud 11 years ago
parent
commit
af77468dbc
3 changed files with 100 additions and 7 deletions
  1. 3 1
      SETUP.md
  2. 81 0
      oc_framework/pom.xml
  3. 16 6
      pom.xml

+ 3 - 1
SETUP.md

@@ -32,7 +32,9 @@ NOTE: You must have mvn (version >= 3.1.1) in your environment path. Current And
 * "git clone https://github.com/mosabua/maven-android-sdk-deployer.git"
 * "cd maven-android-sdk-deployer"
 * "mvn -pl com.simpligility.android.sdk-deployer:android-19 -am install"
-* "cd ../android"
+* "cd ../android/oc_framework"
+* "mvn install"
+* "cd .."
 * Now you can create ownCloud APK using "mvn package"
 
 ### 4. Building with Eclipse:

+ 81 - 0
oc_framework/pom.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>com.owncloud.android</groupId>
+    <artifactId>oc_framework</artifactId>
+    <version>${owncloud.version}</version>
+    <packaging>jar</packaging>
+    <name>oc_framework for Owncloud Android</name>
+
+    <properties>
+        <owncloud.version>1.5.1-SNAPSHOT</owncloud.version>
+        <java-version>1.6</java-version>
+        <!-- Given by maven-android-sdk-deployer -->
+        <google.android-version>4.4_r1</google.android-version>
+        <!-- Usually the latest Android API -->
+        <google.android-api>19</google.android-api>
+    </properties>
+
+    <description>oc_framwork for Owncloud for Android</description>
+    
+    <dependencies>
+
+        <dependency>
+            <groupId>android</groupId>
+            <artifactId>android</artifactId>
+            <version>${google.android-version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>commons-httpclient</groupId>
+          <artifactId>commons-httpclient</artifactId>
+          <version>3.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.jackrabbit</groupId>
+            <artifactId>jackrabbit-webdav</artifactId>
+            <version>2.5.2</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+
+        <sourceDirectory>src</sourceDirectory>
+
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.0</version>
+                <configuration>
+                    <source>${java-version}</source>
+                    <target>${java-version}</target>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>com.jayway.maven.plugins.android.generation2</groupId>
+                <artifactId>android-maven-plugin</artifactId>
+                <version>3.8.0</version>
+                <configuration>
+                    <sdk>
+                        <path>${env.ANDROID_HOME}</path>
+                        <platform>${google.android-api}</platform>
+                    </sdk>
+                </configuration>
+                <extensions>true</extensions>
+            </plugin>
+
+        </plugins>
+
+    </build>
+
+</project>
+

+ 16 - 6
pom.xml

@@ -5,13 +5,17 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.owncloud.android</groupId>
     <artifactId>owncloud</artifactId>
-    <version>1.3.21-SNAPSHOT</version>
+    <version>${owncloud.version}</version>
     <packaging>apk</packaging>
     <name>Owncloud Android</name>
 
     <properties>
+        <owncloud.version>1.5.1-SNAPSHOT</owncloud.version>
         <java-version>1.6</java-version>
-        <google.android-version>4.2.2_r2</google.android-version>
+        <!-- Given by maven-android-sdk-deployer -->
+        <google.android-version>4.4_r1</google.android-version>
+        <!-- Usually the latest Android API -->
+        <google.android-api>19</google.android-api>
         <actionbarsherlock-version>4.2.0</actionbarsherlock-version>
     </properties>
 
@@ -22,7 +26,7 @@
         <developerConnection>scm:git:git@github.com:owncloud/android.git</developerConnection>
         <url>https://github.com/owncloud/android</url>
     </scm>
-
+    
     <dependencies>
 
         <dependency>
@@ -51,6 +55,13 @@
             <artifactId>jackrabbit-webdav</artifactId>
             <version>2.5.2</version>
         </dependency>
+        
+        <!-- MUST BE INSTALLED FIRST: cd oc_framework; mvn install -->
+        <dependency>
+         <groupId>com.owncloud.android</groupId>
+         <artifactId>oc_framework</artifactId>
+         <version>${owncloud.version}</version>
+      </dependency>
 
     </dependencies>
 
@@ -74,12 +85,11 @@
             <plugin>
                 <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                 <artifactId>android-maven-plugin</artifactId>
-                <version>3.5.0</version>
+                <version>3.8.0</version>
                 <configuration>
                     <sdk>
-                        <!-- platform or api level (api level 4 = platform 1.6)-->
                         <path>${env.ANDROID_HOME}</path>
-                        <platform>17</platform>
+                        <platform>${google.android-api}</platform>
                     </sdk>
                 </configuration>
                 <extensions>true</extensions>