Skip to content

Commit 458130f

Browse files
committed
Using maven jar plugin to create an additional API JAR that only contains the annotations. 18k instead of 140k.
Fixes issue 21
1 parent 567e42d commit 458130f

3 files changed

Lines changed: 23 additions & 11 deletions

File tree

‎AndroidAnnotations/pom.xml‎

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<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">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
23

34
<modelVersion>4.0.0</modelVersion>
45
<groupId>com.googlecode.androidannotations</groupId>
@@ -39,6 +40,25 @@
3940
</execution>
4041
</executions>
4142
</plugin>
43+
<plugin>
44+
<groupId>org.apache.maven.plugins</groupId>
45+
<artifactId>maven-jar-plugin</artifactId>
46+
<version>2.3.1</version>
47+
<executions>
48+
<execution>
49+
<phase>package</phase>
50+
<goals>
51+
<goal>jar</goal>
52+
</goals>
53+
<configuration>
54+
<classifier>api</classifier>
55+
<includes>
56+
<include>com/googlecode/androidannotations/annotations/**</include>
57+
</includes>
58+
</configuration>
59+
</execution>
60+
</executions>
61+
</plugin>
4262
</plugins>
4363
<pluginManagement>
4464
<plugins>
@@ -58,14 +78,6 @@
5878
</extensions>
5979
</build>
6080

61-
<dependencyManagement>
62-
<dependencies>
63-
</dependencies>
64-
</dependencyManagement>
65-
66-
<dependencies>
67-
</dependencies>
68-
6981
<distributionManagement>
7082
<repository>
7183
<uniqueVersion>false</uniqueVersion>

‎HelloWorldEclipse/.classpath‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<attribute name="optional" value="true"/>
99
</attributes>
1010
</classpathentry>
11-
<classpathentry kind="lib" path="/androidannotations/target/androidannotations-1.0.2-SNAPSHOT.jar" sourcepath="/androidannotations/target/androidannotations-1.0.2-SNAPSHOT-sources.jar"/>
11+
<classpathentry kind="lib" path="/androidannotations/target/androidannotations-1.0.2-SNAPSHOT-api.jar" sourcepath="/androidannotations/target/androidannotations-1.0.2-SNAPSHOT-sources.jar"/>
1212
<classpathentry kind="output" path="bin"/>
1313
</classpath>

‎RoboGuiceExample/.classpath‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</attributes>
1010
</classpathentry>
1111
<classpathentry kind="lib" path="lib/guice-2.0-no_aop.jar"/>
12-
<classpathentry kind="lib" path="/androidannotations/target/androidannotations-1.0.2-SNAPSHOT.jar" sourcepath="/androidannotations/target/androidannotations-1.0.2-SNAPSHOT-sources.jar"/>
1312
<classpathentry kind="lib" path="lib/roboguice-1.1.1.jar"/>
13+
<classpathentry kind="lib" path="/androidannotations/target/androidannotations-1.0.2-SNAPSHOT-api.jar" sourcepath="/androidannotations/target/androidannotations-1.0.2-SNAPSHOT-sources.jar"/>
1414
<classpathentry kind="output" path="bin"/>
1515
</classpath>

0 commit comments

Comments
 (0)