Re compilation errors: fop-1.0 is java 1.4 compliant and does not contain generics. The code below is not from fop-1.0.
You can switch target version without harm. Re junit tests: ant junit runs many tests which are not related to fop.jar. Other jar files such as sandbox and transcoder are built, and irrelevant tests are run. The following tests are relevant to the functioning of fop.jar: junit-basic Runs FOP's JUnit basic tests junit-intermediate-format Runs FOP's intermediate format JUnit tests junit-layout-standard Runs FOP's standard JUnit layout tests junit-text-linebreak Runs FOP's JUnit unicode linebreak tests junit-userconfig Runs FOP's user config JUnit tests junit-area-tree-xml-format junit-render-pdf The following test is irrelevant: junit-transcoder The following test cannot be run without hyphenation patterns, and causes the junit target to report failure: junit-layout-hyphenation Note that only the target junit reports success or failure; other junit targets report success even if the test reports failure. One could construct a test junit-package which only includes tests relevant to fop.jar. ON this wiki page, http://wiki.apache.org/xmlgraphics-fop/HowTo/BuildFOPAlternatively, I describe a method to run some tests without ant, to avoid dependencies in the build file. But it includes only one target. Best, Simon On Fri, Sep 16, 2011 at 02:47:56PM +0200, Mathieu Malaterre wrote: > Hi Simon, > > On Mon, Aug 29, 2011 at 1:37 PM, Simon Pepping <[email protected]> wrote: > > It would be good if alternative builds of fop would run a number of > > our junit tests. The fop team should look into this to formulate a > > recommendation. > > AFAIK running fop tests simply involved running the 'junit' ant target > ? Right ? In this case the code does not compile for me: > > [javac] > /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/util/text/LocatorFormatter.java > [javac] > /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:64: > generics are not supported in -source 1.4 > [javac] (use -source 5 or higher to enable generics) > [javac] private List<AFMCharMetrics> charMetrics = new > java.util.ArrayList<AFMCharMetrics>(); > [javac] ^ > [javac] > /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:418: > for-each loops are not supported in -source 1.4 > [javac] (use -source 5 or higher to enable for-each loops) > [javac] for (Map.Entry<String, Map<String, Dimension2D>> > entryFrom : this.kerningMap.entrySet()) { > [javac] > ^ > [javac] > /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:500: > annotations are not supported in -source 1.4 > [javac] (use -source 5 or higher to enable annotations) > [javac] @Override > [javac] ^ > [javac] 3 errors > > > Can I switch the target version ? > > Thanks > -- > Mathieu > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
