You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Lewandowski, Eric" <er...@cgi.com> on 2008/03/28 00:11:45 UTC
Cannot compile jasper report with jasperreports-maven-plugin
Hi !
I have an artifact (jar file) which contains jrxml files and classes
implementing JRDataSource. Theses classes are used in my jrxml files.
I want to use jasperreports-maven-plugin to compile jrxml files. Jasper
compilation fails because it cannot find my classes implementing
JRDataSource, i.e it cannot find the .class files ?
If I compile the java classes, and I compile my JRDataSource in another
step, it's fine !
So, why jasperreports-maven-plugin cannot find my classes generated
during the maven build ?
Here's the definition of jasperreports-maven-plugin in the pom file of
my artefact.
Thanks !
Best Regards !
Eric Lewandowski
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jasperreports-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compile-reports</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>2.0.4</version>
</dependency>
</plugin>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Cannot compile jasper report with jasperreports-maven-plugin
Posted by Dan Tran <da...@gmail.com>.
Please file a JIRA a submit a reproceable sample source.
and better yet, take a look at the source and see if you can fix it :-)
Thanks
-D
On Thu, Mar 27, 2008 at 4:32 PM, David C. Hicks <dh...@i-hicks.org> wrote:
> Try binding the "compile-reports" goal to the "compile" phase of the build.
> Like so...
>
> <executions>
> <execution>
> <phase>compile</phase>
> <goals>
> <goal>compile-reports</goal>
> </goals>
> </execution>
> </executions>
>
> That still might not do the trick. I'm not sure when the plugin will get
> executed with respect to the Java compile step.
>
> For my own use of this plugin, I compile my reports into an entirely
> separate jar file as a separate module. This way, my Java classes are
> available as a dependency.
>
> Dave
>
>
>
> Lewandowski, Eric wrote:
> >
> > Hi !
> >
> > I have an artifact (jar file) which contains jrxml files and classes
> > implementing JRDataSource. Theses classes are used in my jrxml files.
> >
> > I want to use jasperreports-maven-plugin to compile jrxml files. Jasper
> > compilation fails because it cannot find my classes implementing
> > JRDataSource, i.e it cannot find the .class files ?
> >
> > If I compile the java classes, and I compile my JRDataSource in another
> > step, it's fine !
> >
> > So, why jasperreports-maven-plugin cannot find my classes generated
> > during the maven build ?
> >
> > Here's the definition of jasperreports-maven-plugin in the pom file of
> > my artefact.
> >
> > Thanks !
> >
> > Best Regards !
> > Eric Lewandowski
> >
> > <plugin>
> > <groupId>org.codehaus.mojo</groupId>
> > <artifactId>jasperreports-maven-plugin</artifactId>
> > <executions>
> > <execution>
> > <goals>
> > <goal>compile-reports</goal>
> > </goals>
> > </execution>
> > </executions>
> > <dependencies>
> > <dependency>
> > <groupId>jasperreports</groupId>
> > <artifactId>jasperreports</artifactId>
> > <version>2.0.4</version>
> > </dependency>
> > </plugin>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Cannot compile jasper report with jasperreports-maven-plugin
Posted by "Lewandowski, Eric" <er...@cgi.com>.
Thanks a lot David !
Adding <phase>compile</phase> solves the problem because it forces the plugin to compile the report after the java classes compilation.
Regards !
Eric Lewandowski
-----Message d'origine-----
De : David C. Hicks [mailto:dhicks@i-hicks.org]
Envoyé : 27 mars 2008 19:33
À : Maven Users List
Objet : Re: Cannot compile jasper report with jasperreports-maven-plugin
Try binding the "compile-reports" goal to the "compile" phase of the build.
Like so...
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>compile-reports</goal>
</goals>
</execution>
</executions>
That still might not do the trick. I'm not sure when the plugin will get
executed with respect to the Java compile step.
For my own use of this plugin, I compile my reports into an entirely
separate jar file as a separate module. This way, my Java classes are
available as a dependency.
Dave
Lewandowski, Eric wrote:
>
> Hi !
>
> I have an artifact (jar file) which contains jrxml files and classes
> implementing JRDataSource. Theses classes are used in my jrxml files.
>
> I want to use jasperreports-maven-plugin to compile jrxml files. Jasper
> compilation fails because it cannot find my classes implementing
> JRDataSource, i.e it cannot find the .class files ?
>
> If I compile the java classes, and I compile my JRDataSource in another
> step, it's fine !
>
> So, why jasperreports-maven-plugin cannot find my classes generated
> during the maven build ?
>
> Here's the definition of jasperreports-maven-plugin in the pom file of
> my artefact.
>
> Thanks !
>
> Best Regards !
> Eric Lewandowski
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>jasperreports-maven-plugin</artifactId>
> <executions>
> <execution>
> <goals>
> <goal>compile-reports</goal>
> </goals>
> </execution>
> </executions>
> <dependencies>
> <dependency>
> <groupId>jasperreports</groupId>
> <artifactId>jasperreports</artifactId>
> <version>2.0.4</version>
> </dependency>
> </plugin>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Cannot compile jasper report with jasperreports-maven-plugin
Posted by "David C. Hicks" <dh...@i-hicks.org>.
Try binding the "compile-reports" goal to the "compile" phase of the build.
Like so...
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>compile-reports</goal>
</goals>
</execution>
</executions>
That still might not do the trick. I'm not sure when the plugin will get
executed with respect to the Java compile step.
For my own use of this plugin, I compile my reports into an entirely
separate jar file as a separate module. This way, my Java classes are
available as a dependency.
Dave
Lewandowski, Eric wrote:
>
> Hi !
>
> I have an artifact (jar file) which contains jrxml files and classes
> implementing JRDataSource. Theses classes are used in my jrxml files.
>
> I want to use jasperreports-maven-plugin to compile jrxml files. Jasper
> compilation fails because it cannot find my classes implementing
> JRDataSource, i.e it cannot find the .class files ?
>
> If I compile the java classes, and I compile my JRDataSource in another
> step, it's fine !
>
> So, why jasperreports-maven-plugin cannot find my classes generated
> during the maven build ?
>
> Here's the definition of jasperreports-maven-plugin in the pom file of
> my artefact.
>
> Thanks !
>
> Best Regards !
> Eric Lewandowski
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>jasperreports-maven-plugin</artifactId>
> <executions>
> <execution>
> <goals>
> <goal>compile-reports</goal>
> </goals>
> </execution>
> </executions>
> <dependencies>
> <dependency>
> <groupId>jasperreports</groupId>
> <artifactId>jasperreports</artifactId>
> <version>2.0.4</version>
> </dependency>
> </plugin>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org