title: error compiling project netbeans with proguard
body: <p>I'm trying to add proguard to obfuscate my java code with nebeans. I've followed a blog where it says that I must add some code in <code>build.xml</code>. I've modified <code>build.xml</code> but it gives me an error:</p>
  
  <blockquote>
    <p>jar doesn't support the nested "property" element.</p>
  </blockquote>
  
  <p>I added proguard location and all code of the blog but always gives me that error. Could you help me please? Thanks.</p>
  
  <p>Blog is <a href="https://dzone.com/articles/obfuscating-netbeans-java-appl" rel="nofollow noreferrer">https://dzone.com/articles/obfuscating-netbeans-java-appl</a></p>
  
  <p>I put the code of my <code>build.xml</code>:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project name="AFB_CONEXIONES_DENTRO" default="default" basedir="."&gt;
      &lt;description&gt;Builds, tests, and runs the project AFB_CONEXIONES_DENTRO.&lt;/description&gt;
      &lt;import file="nbproject/build-impl.xml"/&gt;
  &lt;target name="-post-jar"&gt;
    &lt;jar jarfile="dist/AFB_con_librerias.jar"&gt;
      &lt;zipfileset src="${dist.jar}" excludes="META-INF/*" /&gt;
      &lt;zipfileset src="lib/ojdbc6.jar" excludes="META-INF/*" /&gt;
      &lt;zipfileset src="lib/proguard.jar" excludes="META-INF/*" /&gt;
      &lt;zipfileset src="lib/log4j-1.2.17.jar" excludes="META-INF/*" /&gt;
      &lt;zipfileset src="lib/postgresql-9.2-1002.jdbc4.jar" excludes="META-INF/*" /&gt;
      &lt;property name="proguard.jar.path" value="/home/y9c4db/Downloads/proguard6.1.1/lib/proguard.jar" /&gt;
  
  
          &lt;taskdef resource="proguard/ant/task.properties"
                   classpath="${proguard.jar.path}" /&gt;
  
          &lt;echo message="Obfuscating ${dist.jar}..."/&gt;
          &lt;mkdir dir="${build.dir}/obfuscated"/&gt;
          &lt;proguard printmapping="${build.dir}/obfuscated/${application.title}.map"
                    renamesourcefileattribute="SourceFile" ignorewarnings="true"&gt;
  
              &lt;!-- Specify the input jars, output jars, and library jars. --&gt;
              &lt;injar  file="${dist.jar}" /&gt;
              &lt;outjar file="${build.dir}/obfuscated/BalloonWindCore_JavaSE.jar" /&gt;
  
              &lt;libraryjar path="${javac.classpath}" /&gt;            
              &lt;libraryjar file="${java.home.path}/jre/lib/rt.jar" /&gt;
  
              &lt;!-- Keep some useful attributes. --&gt;
  
              &lt;keepattribute name="InnerClasses" /&gt;
              &lt;keepattribute name="SourceFile" /&gt;
              &lt;keepattribute name="LineNumberTable" /&gt;
              &lt;keepattribute name="Deprecated" /&gt;
              &lt;keepattribute name="*Annotation*" /&gt;
              &lt;keepattribute name="Signature" /&gt;
  
              &lt;!-- Preserve all public classes, and their public and protected fields and methods. --&gt;
  
              &lt;keep access="public"&gt;
                  &lt;field  access="public protected" /&gt;
                  &lt;method access="public protected" /&gt;
              &lt;/keep&gt;
  
  
              &lt;!-- Preserve all .class method names. --&gt;
  
              &lt;keepclassmembernames access="public"&gt;
                  &lt;method type      ="java.lang.Class"
                          name      ="class$"
                          parameters="java.lang.String" /&gt;
                  &lt;method type      ="java.lang.Class"
                          name      ="class$"
                          parameters="java.lang.String,boolean" /&gt;
              &lt;/keepclassmembernames&gt;
  
              &lt;!-- Preserve all native method names and the names of their classes. --&gt;
  
              &lt;keepclasseswithmembernames&gt;
                  &lt;method access="native" /&gt;
              &lt;/keepclasseswithmembernames&gt;
  
              &lt;!-- Preserve the methods that are required in all enumeration classes. --&gt;
  
              &lt;keepclassmembers extends="java.lang.Enum"&gt;
                  &lt;method access="public static"
                          type="**[]"
                          name="values"
                          parameters="" /&gt;
                  &lt;method access="public static"
                          type="**"
                          name="valueOf"
                          parameters="java.lang.String" /&gt;
              &lt;/keepclassmembers&gt;
  
              &lt;!-- Explicitly preserve all serialization members. The Serializable
                   interface is only a marker interface, so it wouldn't save them.
                   You can comment this out if your library doesn't use serialization.
                   With this code serializable classes will be backward compatible --&gt;
  
              &lt;keepnames implements="java.io.Serializable"/&gt;
              &lt;keepclassmembers implements="java.io.Serializable"&gt;
                  &lt;field  access    ="final"
                          type      ="long"
                          name      ="serialVersionUID" /&gt;
                  &lt;field  access    ="!static !transient"
                          name      ="**"/&gt;
                  &lt;field  access    ="!private"
                          name      ="**"/&gt;
                  &lt;method access    ="!private"
                          name      ="**"/&gt;
                  &lt;method access    ="private"
                          type      ="void"
                          name      ="writeObject"
                          parameters="java.io.ObjectOutputStream" /&gt;
                  &lt;method access    ="private"
                          type      ="void"
                          name      ="readObject"
                          parameters="java.io.ObjectOutputStream" /&gt;
                  &lt;method type      ="java.lang.Object"
                          name      ="writeReplace"
                          parameters="" /&gt;
                  &lt;method type      ="java.lang.Object"
                          name      ="readResolve"
                          parameters="" /&gt;
              &lt;/keepclassmembers&gt;
  
              &lt;!-- Your application may contain more items that need to be preserved;
                   typically classes that are dynamically created using Class.forName --&gt;
  
          &lt;/proguard&gt;
      &lt;manifest&gt;
          &lt;attribute name="Main-Class" value="${main.class}"/&gt;
      &lt;/manifest&gt;
    &lt;/jar&gt;
  &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Please any help? Thanks</p>