Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Maven compilação para .jasper

Como faria para configurar o maven para gerar os meus ficheiros jasper a partir do xml? É possível?

1 resposta
solução!

Oi João,

Segue um exemplo:

<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jasperreports-maven-plugin</artifactId>
            <version>1.0-beta-2</version>
            <executions>
                <execution>
                    <goals>
                        <goal>compile-reports</goal>
                    </goals>
                    <configuration>
                        <!--  jrxml file  directory-->
                        <sourceDirectory>src\\main\\resources\\reports\\template</sourceDirectory>
                        <sourceFileExt>.jrxml</sourceFileExt>
                        <compiler>net.sf.jasperreports.engine.design.JRJavacCompiler</compiler>
                        <!--  Destination for jasper file -->
                        <outputDirectory>src\\main\\resources\\reports\\jasper</outputDirectory>
                    </configuration>
                </execution>
            </executions>
            <dependencies>
                <!-- These plugins are used to specify correct version for jrxml xml validation -->
                <dependency>
                    <groupId>net.sf.jasperreports</groupId>
                    <artifactId>jasperreports</artifactId>
                    <version>4.5.0</version>
                </dependency>

                <dependency>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                    <version>1.2.16</version>
                </dependency>

            </dependencies>
        </plugin>

    </plugins>
</build>