Skip to content

Commit

Permalink
use assembly plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
hzw1199 committed Mar 19, 2020
1 parent 308d777 commit 9c7f658
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ java -jar xml2axml d [AndroidManifest-bin-in.xml] [AndroidManifest-readable-out.
```

Note
This project is based on [This project](https://github.com/l741589/xml2axml)
The project is based on [This project](https://github.com/l741589/xml2axml)
60 changes: 55 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.bigzhao.axml</groupId>
<artifactId>xml2axml</artifactId>
<version>1.0.2-SNAPSHOT</version>
<version>1.1.0-SNAPSHOT</version>

<dependencies>
<dependency>
Expand All @@ -31,8 +31,7 @@
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>28.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/android.jar</systemPath>
<scope>compile</scope>
</dependency>

</dependencies>
Expand All @@ -48,6 +47,7 @@
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<!--package without jar in lib -->
<!--<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -69,8 +69,9 @@
</execution>
</executions>
</plugin>-->

<!--package with jar in lib-->
<plugin>
<!--<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
Expand All @@ -96,7 +97,56 @@
</goals>
</execution>
</executions>
</plugin>-->

<!-- make jar compile scope -->
<!-- https://eureka.ykyuen.info/2014/06/10/maven-include-system-scope-dependency-in-maven-assembly-plugin/ -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>install-external</id>
<phase>clean</phase>
<configuration>
<file>${basedir}/libs/android.jar</file>
<repositoryLayout>default</repositoryLayout>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>28.0.0</version>
<packaging>jar</packaging>
<generatePom>true</generatePom>
</configuration>
<goals>
<goal>install-file</goal>
</goals>
</execution>
</executions>
</plugin>
<!--package jar as class in lib-->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>com.bigzhao.xml2axml.test.Main</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>assembly</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
</project>
10 changes: 1 addition & 9 deletions xml2axml.iml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
<orderEntry type="library" name="Maven: commons-io:commons-io:1.4" level="project" />
<orderEntry type="library" name="Maven: net.sf.kxml:kxml2:2.3.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
<orderEntry type="module-library">
<library name="Maven: com.google.android:android:28.0.0">
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/android.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="Maven: com.google.android:android:28.0.0" level="project" />
</component>
</module>

0 comments on commit 9c7f658

Please sign in to comment.