[Yanel-dev] PATCH for Yanel: Fixes issue when Realm uses package-info.java

Balz Schreier balz.schreier at gmail.com
Wed Feb 2 18:53:20 CET 2011


Hi,

since Java SE 5 there is the concept of package-info.java where you can
apply meta data for a whole package (e.g. org/yanel/package-info.java).

This package-info.java is used by various technologies such as JAX-WS, JAXB
and Javadoc.

I am using JAXB in my realm and I need to store meta data in that file
regarding marshalling and unmarshalling.
So it is crucial, that the package-info.class file also gets compiled and
stored in the distribution WAR file.

Unfortunately, all Ant versions have an issue with this new file:
see last section here: http://ant.apache.org/manual/Tasks/javac.html

I found a workaround, see patch.

The patch should have absolutley no impact on any other realms, so please
apply this as soon as possible because I need that for my distribution
process.

Maybe I can overwrite the build-realm target in my local build.xml with the
fix in it, but this I have to check first.

THANKS!
Cheers
Balz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wyona.org/pipermail/yanel-development/attachments/20110202/c8f7849e/attachment.html>
-------------- next part --------------
Index: src/build/realms/realm.build.xml
===================================================================
--- src/build/realms/realm.build.xml	(revision 56203)
+++ src/build/realms/realm.build.xml	(working copy)
@@ -122,6 +122,9 @@
   <target name="compile" description="Compile Java classes" depends="init">
 
     <mkdir dir="${realm.classes.dir}"/>
+    <touch>
+      <fileset dir="${realm.java.dir}" includes="**/package-info.java"/>
+    </touch>
     <javac srcdir="${realm.java.dir}" destdir="${realm.classes.dir}"
       classpathref="classpath"
       encoding="${javac.encoding}"


More information about the Yanel-development mailing list