The implemented binary file check breaks copyRawFile
for files that contains "jar" as part of their file
name but aren't binary files.
Our J2EE MDB project template contained a ejb-jar.xml
file and resulted in this exception:
copyRawFile from =
'templates/rap-template/modules/mdb/src/ejb/META-INF/ejb-jar.xml'
to = 'eTest/modules/mdb/src/ejb/META-INF/ejb-jar.xml'
trying in jar for
templates/rap-template/modules/mdb/src/ejb/META-INF/ejb-jar.xml
trouble reading/writing files
com.javanicus.megg.Megg
java.io.IOException: Stream closed
at
java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:138)
at
java.io.BufferedInputStream.read(BufferedInputStream.java:218)
at
com.javanicus.megg.Megg.copyRawFile(Megg.java:680)
at com.javanicus.megg.Megg.apply(Megg.java:479)
at com.javanicus.megg.Megg.generate(Megg.java:337)
at com.javanicus.megg.Megg.main(Megg.java:175)
A work-around is to rename the file and restore the
name using a move statement in megg.xml. Perhaps a
check for ".jar" should be performed (same for gif and
jpg) instead.