Hi, Why not using XML entities, which is not specific to Ant but simply XML ?
Nico "Kent Larsson" <[EMAIL PROTECTED]> wrote on 14/03/2008 11:28:03: > Hi, > > In our Ant script to build Javadoc we have lots of <link ...>'s inside > our <javadoc ...>'s where the <link ...>'s are duplicated into most of > our <javadoc ...>'s. We would like to reference these so we don't have > the same lines of code in lots of places in the build script. We have > tried googling and reading the Ant and Javadoc manuals without success. > > /* Start of example Javadoc Ant snippet */ > <javadoc destdir="${javadoc.dir}/common" > classpathref="path.combined" > windowtitle="SOM Common API Doc" > encoding="UTF-8" > charset="UTF-8" > access="private"> > <!-- This part is very common : Start --> > <link offline="true" href="http://java.sun.com/j2se/1.5.0/docs/api/" > packagelistLoc="javadoc/j2se-1.5.0"/> > <link offline="true" href="http://java.sun.com/javaee/5/docs/api/" > packagelistLoc="javadoc/javaee-5"/> > <link href="http://lab.ourserver.com/javadoc/common/"/> > <link href="http://lab.ourserver.com/javadoc/dist/"/> > <link href="http://lab.ourserver.com/javadoc/ejb/"/> > <link href="http://lab.ourserver.com/javadoc/web/"/> > <link href="http://lab.ourserver.com/javadoc/downloadClient/"/> > <!-- This part is very common : End --> > <fileset dir="${somCommon.dir}/src"> > <include name="**/*.java"/> > </fileset> > </javadoc> > /* End of example Javadoc Ant snippet */ > > Is there a way to bundle the links so they may be referenced? Something > similar to: > > /* Start of example pseudo-code Javadoc Ant snippet */ > <linkbundle name="thecommonlinks"> > <!-- This part is very common : Start --> > <link offline="true" href="http://java.sun.com/j2se/1.5.0/docs/api/" > packagelistLoc="javadoc/j2se-1.5.0"/> > <link offline="true" href="http://java.sun.com/javaee/5/docs/api/" > packagelistLoc="javadoc/javaee-5"/> > <link href="http://lab.ourserver.com/javadoc/common/"/> > <link href="http://lab.ourserver.com/javadoc/dist/"/> > <link href="http://lab.ourserver.com/javadoc/ejb/"/> > <link href="http://lab.ourserver.com/javadoc/web/"/> > <!-- This part is very common : End --> > </linkbudle> > > <javadoc destdir="${javadoc.dir}/common" > classpathref="path.combined" > windowtitle="SOM Common API Doc" > encoding="UTF-8" > charset="UTF-8" > access="private"> > <linkbudlereference name="thecommonlinks"/> > <fileset dir="${somCommon.dir}/src"> > <include name="**/*.java"/> > </fileset> > </javadoc> > /* End of example pseudo-code Javadoc Ant snippet */ > > As we have 7-8 <javadoc> tags (to build individual javadocs when we > don't want to build them all) it would be nice and clean to reference > common <link> tags in some way. > > Thanks for reading! > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Ce message est à l'attention exclusive des destinataires désignés. Il peut contenir des informations confidentielles. Si vous n'êtes pas destinataire du message, merci d'en avertir immédiatement l'expéditeur et de détruire ce message. Le contenu de ce message ne pourrait engager la responsabilité de Steria que s'il a été émis par une personne dûment habilitée agissant dans le strict cadre de ses fonctions et à des fins non étrangères à ses attributions. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être engagée pour tout dommage résultant d'un virus transmis. This message is intended exclusively for the designated addressee. It may contain confidential material. If you are not the correct addressee, please notify the sender immediately and destroy the message. The content of this message will engage the responsibility of Steria only if it has been sent by an authorized person acting in the strict scope of his functions and for purposes that are related to his competence. Although reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.