You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Haszlakiewicz, Eric" <EH...@transunion.com> on 2010/08/05 17:16:04 UTC

RE: adding non-class files to a JAR

>-----Original Message-----
>From: asookazian [mailto:asookazian@gmail.com]
>
>Wayne Fay wrote:
>>
>>> anybody know how to get Maven to include non-class files into a JAR?
>>>
>>> i have .jrxml files that I precompile into .jasper files via a
custom
>>> plugin
>>> but maven is not including them in the EAR AFAIK.
>>
>> Put them in the correct directory (src/main/resources in general) and
>> they should be bundled into the Jar properly.

>thx for the response.  the compiled .jasper files are in
sub-directories
>inside src/main/resources, so perhaps that is the problem and they all
need
>to be placed in src/main/resources directly so they are included in the
>JAR.
>let me give that a shot!  thx.

If you're trying to include compiled files, I think they should be
created in the *target* directory.  Putting build output (the .jasper
files) into the source directories seems wrong.  I just tried a quick
test, and maven will happily include anything I put in target/classes
into the jar file.  You probably need to adjust how your .jasper files
are created so they go in the right place.

eric

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: adding non-class files to a JAR

Posted by Baptiste MATHUS <ml...@batmat.net>.
Your plugin should always generate into the outputDirectory (or
testOutputDirectory).
Please be aware not using "target" in the code. This name can always be
redefined in the pom. Always refer to it as
${project.build.outputDirectory}.

Cheers

Le 5 août 2010 17:16:04 UTC+2, Haszlakiewicz, Eric
<EH...@transunion.com>a écrit :

> >-----Original Message-----
> >From: asookazian [mailto:asookazian@gmail.com]
> >
> >Wayne Fay wrote:
> >>
> >>> anybody know how to get Maven to include non-class files into a JAR?
> >>>
> >>> i have .jrxml files that I precompile into .jasper files via a
> custom
> >>> plugin
> >>> but maven is not including them in the EAR AFAIK.
> >>
> >> Put them in the correct directory (src/main/resources in general) and
> >> they should be bundled into the Jar properly.
>
> >thx for the response.  the compiled .jasper files are in
> sub-directories
> >inside src/main/resources, so perhaps that is the problem and they all
> need
> >to be placed in src/main/resources directly so they are included in the
> >JAR.
> >let me give that a shot!  thx.
>
> If you're trying to include compiled files, I think they should be
> created in the *target* directory.  Putting build output (the .jasper
> files) into the source directories seems wrong.  I just tried a quick
> test, and maven will happily include anything I put in target/classes
> into the jar file.  You probably need to adjust how your .jasper files
> are created so they go in the right place.
>
> eric
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !