diff options
author | Marc R. Hoffmann <hoffmann@mountainminds.com> | 2009-07-06 09:15:28 +0000 |
---|---|---|
committer | Marc R. Hoffmann <hoffmann@mountainminds.com> | 2009-07-06 09:15:28 +0000 |
commit | 0948cb944815e6b81bb5e384705c319f78cafbbc (patch) | |
tree | 13e672e5a4d7e1a2bbe8c610013e19637c3808fb /org.jacoco.agent | |
parent | 5267b6cb91e650598cbf25013244382403a51ac0 (diff) | |
download | jacoco-0948cb944815e6b81bb5e384705c319f78cafbbc.tar.gz |
Creating a shorter random identifier for agent package names.
Diffstat (limited to 'org.jacoco.agent')
-rw-r--r-- | org.jacoco.agent/buildhook.xml | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/org.jacoco.agent/buildhook.xml b/org.jacoco.agent/buildhook.xml index 1d00ffd1..465c219b 100644 --- a/org.jacoco.agent/buildhook.xml +++ b/org.jacoco.agent/buildhook.xml @@ -19,27 +19,23 @@ </classpath>
</taskdef>
- <!-- The purpose of the checksum is to create a unique package name -->
- <checksum totalproperty="checksum">
- <fileset dir="${result.tmp.bundle.classes.dir}"/>
- <fileset dir="${toString:bundle-org.jacoco.core}"/>
- </checksum>
+ <!-- The random identifier will be used to create a unique package names -->
+ <randomid name="randomid"/>
<echo>The following warning is false (Ant 1.7.0 Bug #47470), the archive is created anyway.</echo>
<jar destfile="${result.dist.lib.dir}/jacocoagent.jar">
<manifest>
- <attribute name="Premain-Class" value="org.jacoco._${checksum}.agent.JacocoAgent"/>
+ <attribute name="Premain-Class" value="org.jacoco.${randomid}.agent.JacocoAgent"/>
<attribute name="Implementation-Title" value="JaCoCo Java Agent"/>
<attribute name="Implementation-Vendor" value="Mountainminds GmbH & Co. KG"/>
<attribute name="Implementation-Version" value="${qualified.bundle.version}"/>
</manifest>
- <!-- Move classes in own namespace to avoid clashes with application
- classes. This also allows JaCoCo selftests. -->
+ <!-- Move classes into unique packages -->
<renamedclassfileset>
- <mapping from="org/jacoco/(.*)" to="org/jacoco/_${checksum}/$1"/>
- <mapping from="org/objectweb/asm/(.*)" to="org/jacoco/_${checksum}/asm/$1"/>
+ <mapping from="org/jacoco/(.*)" to="org/jacoco/${randomid}/$1"/>
+ <mapping from="org/objectweb/asm/(.*)" to="org/jacoco/${randomid}/asm/$1"/>
<!-- Ship required classes only in the agent JAR -->
<deepclassfileset rootclass="org/jacoco/agent/JacocoAgent">
@@ -49,6 +45,7 @@ <fileset file="${toString:bundle-org.objectweb.asm}"/>
</zipfileset>
</deepclassfileset>
+
</renamedclassfileset>
</jar>
|