~ubuntu-branches/ubuntu/utopic/proguard/utopic

« back to all changes in this revision

Viewing changes to examples/ant/servlets.xml

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg
  • Date: 2014-04-10 13:58:11 UTC
  • mfrom: (1.2.5)
  • Revision ID: package-import@ubuntu.com-20140410135811-ddwzt2avu94rnolt
Tags: 4.11-1
* Team upload.
* New upstream release
* Removed the non-free documentation from the package (Closes: #719706)
* Removed the pre-built jars from the upstream tarball
* debian/control:
  - The package is now co-maintained with the Java Team
  - Standards-Version updated to 3.9.5 (no changes)
  - Added the Vcs-* fields
  - Added the Homepage field
* Switch to debhelper level 9
* Use XZ compression for the upstream tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!-- This Ant build file illustrates how to process servlets.
2
 
     Usage: ant -f servlets.xml -->
3
 
 
4
 
<project name="Servlets" default="obfuscate" basedir="../..">
5
 
 
6
 
<target name="obfuscate">
7
 
  <taskdef resource="proguard/ant/task.properties"
8
 
           classpath="lib/proguard.jar" />
9
 
 
10
 
  <proguard printseeds="on"
11
 
            printmapping="proguard.map"
12
 
            renamesourcefileattribute="SourceFile">
13
 
 
14
 
    <!-- Specify the input jars, output jars, and library jars. -->
15
 
 
16
 
    <injar  file="in.jar" />
17
 
    <outjar file="out.jar" />
18
 
 
19
 
    <libraryjar file="${java.home}/lib/rt.jar" />
20
 
 
21
 
    <!-- Optionally preserve line numbers in the obfuscated stack traces.
22
 
    <keepattribute name="LineNumberTable">
23
 
    <keepattribute name="SourceFile">
24
 
    -->
25
 
 
26
 
    <!-- Preserve all annotations. -->
27
 
 
28
 
    <keepattribute name="*Annotation*" />
29
 
 
30
 
    <!-- Keep all public servlets. -->
31
 
 
32
 
    <keep access="public" implements="javax.servlet.Servlet" />
33
 
 
34
 
    <!-- Preserve all native method names and the names of their classes. -->
35
 
 
36
 
    <keepclasseswithmembernames>
37
 
      <method access="native" />
38
 
    </keepclasseswithmembernames>
39
 
    
40
 
    <!-- Preserve the methods that are required in all enumeration classes. -->
41
 
    
42
 
    <keepclassmembers extends="java.lang.Enum">
43
 
      <method access="public static"
44
 
              type="**[]"
45
 
              name="values"
46
 
              parameters="" />
47
 
      <method access="public static"
48
 
              type="**"
49
 
              name="valueOf"
50
 
              parameters="java.lang.String" />
51
 
    </keepclassmembers>
52
 
 
53
 
    <!-- Explicitly preserve all serialization members. The Serializable
54
 
         interface is only a marker interface, so it wouldn't save them.
55
 
         You can comment this out if your library doesn't use serialization.
56
 
         If your code contains serializable classes that have to be backward
57
 
         compatible, please refer to the manual. -->
58
 
 
59
 
    <keepclassmembers implements="java.io.Serializable">
60
 
      <field  access    ="static final"
61
 
              type      ="long"
62
 
              name      ="serialVersionUID" />
63
 
      <field  access    ="static final"
64
 
              type      ="java.io.ObjectStreamField[]"
65
 
              name      ="serialPersistentFields" />
66
 
      <method access    ="private"
67
 
              type      ="void"
68
 
              name      ="writeObject"
69
 
              parameters="java.io.ObjectOutputStream" />
70
 
      <method access    ="private"
71
 
              type      ="void"
72
 
              name      ="readObject"
73
 
              parameters="java.io.ObjectInputStream" />
74
 
      <method type      ="java.lang.Object"
75
 
              name      ="writeReplace"
76
 
              parameters="" />
77
 
      <method type      ="java.lang.Object"
78
 
              name      ="readResolve"
79
 
              parameters="" />
80
 
    </keepclassmembers>
81
 
 
82
 
    <!-- Your application may contain more items that need to be preserved;
83
 
         typically classes that are dynamically created using Class.forName -->
84
 
 
85
 
  </proguard>
86
 
</target>
87
 
 
88
 
</project>