maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r611054 - in /maven/sandbox/trunk/plugins/maven-android: ./ maven-aapt-plugin/src/main/java/org/maven/maven/plugin/aapt/ maven-dx-plugin/ maven-dx-plugin/src/main/resources/META-INF/plexus/
Date Fri, 11 Jan 2008 05:37:18 GMT
Author: sisbell
Date: Thu Jan 10 21:37:17 2008
New Revision: 611054

URL: http://svn.apache.org/viewvc?rev=611054&view=rev
Log:
Changed packaging type to android:apk and fixed a problem where the installed artifact was
the java jar but was incorrectly labeled as a dex file. Now the correct apk file is installed.

Modified:
    maven/sandbox/trunk/plugins/maven-android/README.txt
    maven/sandbox/trunk/plugins/maven-android/maven-aapt-plugin/src/main/java/org/maven/maven/plugin/aapt/AaptPackagerMojo.java
    maven/sandbox/trunk/plugins/maven-android/maven-android.iml
    maven/sandbox/trunk/plugins/maven-android/maven-dx-plugin/pom.xml
    maven/sandbox/trunk/plugins/maven-android/maven-dx-plugin/src/main/resources/META-INF/plexus/components.xml

Modified: maven/sandbox/trunk/plugins/maven-android/README.txt
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-android/README.txt?rev=611054&r1=611053&r2=611054&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/maven-android/README.txt (original)
+++ maven/sandbox/trunk/plugins/maven-android/README.txt Thu Jan 10 21:37:17 2008
@@ -10,7 +10,7 @@
 5) Create an android project: http://code.google.com/android/reference/othertools.html#activitycreator
 6) Create a pom.xml file for the project
 
-The packaging type is android:dex
+The packaging type is android:apk
 
 Sample POM
 <?xml version="1.0" encoding="UTF-8"?>
@@ -20,7 +20,7 @@
    <groupId>org.apache.maven</groupId>
    <artifactId>maven-test</artifactId>
    <version>1.0.1-sandbox</version>
-   <packaging>android:dex</packaging>
+   <packaging>android:apk</packaging>
    <name>maven-test</name>
    <description>Maven Plugin for Android DX</description>
    <dependencies>

Modified: maven/sandbox/trunk/plugins/maven-android/maven-aapt-plugin/src/main/java/org/maven/maven/plugin/aapt/AaptPackagerMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-android/maven-aapt-plugin/src/main/java/org/maven/maven/plugin/aapt/AaptPackagerMojo.java?rev=611054&r1=611053&r2=611054&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/maven-android/maven-aapt-plugin/src/main/java/org/maven/maven/plugin/aapt/AaptPackagerMojo.java
(original)
+++ maven/sandbox/trunk/plugins/maven-android/maven-aapt-plugin/src/main/java/org/maven/maven/plugin/aapt/AaptPackagerMojo.java
Thu Jan 10 21:37:17 2008
@@ -97,7 +97,7 @@
         commands.add("-f");
         commands.add("-c");
         commands.add("-M");
-        commands.add(project.getBasedir().getAbsolutePath() +  File.separatorChar + "AndroidManifest.xml");
+        commands.add(project.getBasedir().getAbsolutePath() + File.separatorChar + "AndroidManifest.xml");
         if (resourceDirectory.exists()) {
             commands.add("-S");
             commands.add(resourceDirectory.getAbsolutePath());
@@ -107,7 +107,7 @@
         commands.add(tmpOutputFile.getAbsolutePath());
         getLog().info("aapt " + commands.toString());
         try {
-            executor.executeCommand("aapt", commands,  project.getBasedir(), false);
+            executor.executeCommand("aapt", commands, project.getBasedir(), false);
         } catch (ExecutionException e) {
             throw new MojoExecutionException("", e);
         }
@@ -129,7 +129,7 @@
                 is.close();
             }
             os.putNextEntry(new ZipEntry("classes.dex"));
-            is = new FileInputStream(project.getBasedir().getAbsolutePath() +  File.separatorChar
+ "target/classes.dex");
+            is = new FileInputStream(project.getBasedir().getAbsolutePath() + File.separatorChar
+ "target/classes.dex");
             byte[] buffer = new byte[1024];
             int i;
             while ((i = is.read(buffer)) > 0) {
@@ -155,5 +155,7 @@
                 }
             }
         }
+
+        project.getArtifact().setFile(outputFile);
     }
 }

Modified: maven/sandbox/trunk/plugins/maven-android/maven-android.iml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-android/maven-android.iml?rev=611054&r1=611053&r2=611054&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/maven-android/maven-android.iml (original)
+++ maven/sandbox/trunk/plugins/maven-android/maven-android.iml Thu Jan 10 21:37:17 2008
@@ -25,7 +25,7 @@
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="file://$localRepository$/org/codehaus/plexus/plexus-container-default/1.0-alpha-36"
/>
+          <root url="jar://$localRepository$/org/codehaus/plexus/plexus-container-default/1.0-alpha-34/plexus-container-default-1.0-alpha-34.jar!/"
/>
         </CLASSES>
         <JAVADOC />
         <SOURCES />
@@ -34,7 +34,7 @@
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar://$localRepository$/org/codehaus/plexus/plexus-container-default/1.0-alpha-34/plexus-container-default-1.0-alpha-34.jar!/"
/>
+          <root url="jar://$localRepository$/org/codehaus/plexus/plexus-utils/1.4.5/plexus-utils-1.4.5.jar!/"
/>
         </CLASSES>
         <JAVADOC />
         <SOURCES />
@@ -43,7 +43,7 @@
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar://$localRepository$/org/codehaus/plexus/plexus-utils/1.4.5/plexus-utils-1.4.5.jar!/"
/>
+          <root url="jar://$localRepository$/org/apache/maven/maven-project/2.1-SNAPSHOT/maven-project-2.1-SNAPSHOT.jar!/"
/>
         </CLASSES>
         <JAVADOC />
         <SOURCES />
@@ -52,7 +52,7 @@
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar://$localRepository$/org/apache/maven/maven-project/2.1-SNAPSHOT/maven-project-2.1-SNAPSHOT.jar!/"
/>
+          <root url="jar://$localRepository$/org/apache/maven/maven-artifact/2.1-SNAPSHOT/maven-artifact-2.1-SNAPSHOT.jar!/"
/>
         </CLASSES>
         <JAVADOC />
         <SOURCES />
@@ -61,7 +61,7 @@
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar://$localRepository$/org/apache/maven/maven-artifact/2.1-SNAPSHOT/maven-artifact-2.1-SNAPSHOT.jar!/"
/>
+          <root url="jar://$localRepository$/org/apache/maven/maven-model/2.0.8/maven-model-2.0.8.jar!/"
/>
         </CLASSES>
         <JAVADOC />
         <SOURCES />

Modified: maven/sandbox/trunk/plugins/maven-android/maven-dx-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-android/maven-dx-plugin/pom.xml?rev=611054&r1=611053&r2=611054&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/maven-android/maven-dx-plugin/pom.xml (original)
+++ maven/sandbox/trunk/plugins/maven-android/maven-dx-plugin/pom.xml Thu Jan 10 21:37:17
2008
@@ -38,5 +38,10 @@
          <artifactId>maven-android-core</artifactId>
          <version>${project.version}</version>
       </dependency>
+      <dependency>
+         <groupId>org.apache.maven</groupId>
+         <artifactId>maven-model</artifactId>
+         <version>2.0.8</version>
+      </dependency>
    </dependencies>
 </project>

Modified: maven/sandbox/trunk/plugins/maven-android/maven-dx-plugin/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-android/maven-dx-plugin/src/main/resources/META-INF/plexus/components.xml?rev=611054&r1=611053&r2=611054&view=diff
==============================================================================
--- maven/sandbox/trunk/plugins/maven-android/maven-dx-plugin/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/sandbox/trunk/plugins/maven-android/maven-dx-plugin/src/main/resources/META-INF/plexus/components.xml
Thu Jan 10 21:37:17 2008
@@ -2,7 +2,7 @@
    <components>
       <component>
          <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
-         <role-hint>android:dex</role-hint>
+         <role-hint>android:apk</role-hint>
          <implementation>
             org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
          </implementation>
@@ -40,6 +40,15 @@
          <configuration>
             <extension>dex</extension>
             <type>android:dex</type>
+         </configuration>
+      </component>
+      <component>
+         <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+         <role-hint>android:apk</role-hint>
+         <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+         <configuration>
+            <extension>apk</extension>
+            <type>android:apk</type>
          </configuration>
       </component>
    </components>



Mime
View raw message