You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jan van Mansum <ja...@gmail.com> on 2008/08/29 23:40:17 UTC

How do I add generated resources to target jar?

Hello group,

I am using the antlr3 maven plugin to generate a parser. I would also like the
.tokens file to be included in the target jar file, so that a client
project can use
it to generate a tree walker. How can a achieve this?

Thanks for any help,

best regards,

-- 
Jan van Mansum

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


Re: How do I add generated resources to target jar?

Posted by Simone Tripodi <si...@gmail.com>.
Hi Stephen, Dan,
thank you very much for your help.
Best regards,
Simone

2008/8/30 Dan Tran <da...@gmail.com>:
> no, build helper only adds additional source path, not resource since
> the pom it self can do that.
>
> On Sat, Aug 30, 2008 at 1:29 AM, Simone Tripodi
> <si...@gmail.com> wrote:
>> Hi Jan,
>> I just met a similar problem, as Stephen Connolly suggested me, you
>> should be able adding generated sources using build-helper plugin in
>> generate-sources phase.
>> Hope this helps, best regards,
>> Simone
>>
>> 2008/8/29 Jan van Mansum <ja...@gmail.com>:
>>> Hello group,
>>>
>>> I am using the antlr3 maven plugin to generate a parser. I would also like the
>>> .tokens file to be included in the target jar file, so that a client
>>> project can use
>>> it to generate a tree walker. How can a achieve this?
>>>
>>> Thanks for any help,
>>>
>>> best regards,
>>>
>>> --
>>> Jan van Mansum
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>>
>> --
>> My LinkedIn profile: http://www.linkedin.com/in/simonetripodi
>> My GoogleCode profile: http://code.google.com/u/simone.tripodi/
>> My Sourceforge: https://sourceforge.net/users/stripodi
>> My Picasa: http://picasaweb.google.com/simone.tripodi/
>> My Tube: http://www.youtube.com/user/stripodi
>> My Del.icio.us: http://del.icio.us/simone.tripodi
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
My LinkedIn profile: http://www.linkedin.com/in/simonetripodi
My GoogleCode profile: http://code.google.com/u/simone.tripodi/
My Sourceforge: https://sourceforge.net/users/stripodi
My Picasa: http://picasaweb.google.com/simone.tripodi/
My Tube: http://www.youtube.com/user/stripodi
My Del.icio.us: http://del.icio.us/simone.tripodi

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


Re: How do I add generated resources to target jar?

Posted by Dan Tran <da...@gmail.com>.
no, build helper only adds additional source path, not resource since
the pom it self can do that.

On Sat, Aug 30, 2008 at 1:29 AM, Simone Tripodi
<si...@gmail.com> wrote:
> Hi Jan,
> I just met a similar problem, as Stephen Connolly suggested me, you
> should be able adding generated sources using build-helper plugin in
> generate-sources phase.
> Hope this helps, best regards,
> Simone
>
> 2008/8/29 Jan van Mansum <ja...@gmail.com>:
>> Hello group,
>>
>> I am using the antlr3 maven plugin to generate a parser. I would also like the
>> .tokens file to be included in the target jar file, so that a client
>> project can use
>> it to generate a tree walker. How can a achieve this?
>>
>> Thanks for any help,
>>
>> best regards,
>>
>> --
>> Jan van Mansum
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
>
> --
> My LinkedIn profile: http://www.linkedin.com/in/simonetripodi
> My GoogleCode profile: http://code.google.com/u/simone.tripodi/
> My Sourceforge: https://sourceforge.net/users/stripodi
> My Picasa: http://picasaweb.google.com/simone.tripodi/
> My Tube: http://www.youtube.com/user/stripodi
> My Del.icio.us: http://del.icio.us/simone.tripodi
>
> ---------------------------------------------------------------------
> 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: How do I add generated resources to target jar?

Posted by Stephen Connolly <st...@gmail.com>.
actually this sounds like a use case for adding addionsl resources.  
the saddional source paths will only be scanned for .java files, not  
copied into the jar

Sent from my iPod

On 30 Aug 2008, at 09:29, "Simone Tripodi" <si...@gmail.com>  
wrote:

> Hi Jan,
> I just met a similar problem, as Stephen Connolly suggested me, you
> should be able adding generated sources using build-helper plugin in
> generate-sources phase.
> Hope this helps, best regards,
> Simone
>
> 2008/8/29 Jan van Mansum <ja...@gmail.com>:
>> Hello group,
>>
>> I am using the antlr3 maven plugin to generate a parser. I would  
>> also like the
>> .tokens file to be included in the target jar file, so that a client
>> project can use
>> it to generate a tree walker. How can a achieve this?
>>
>> Thanks for any help,
>>
>> best regards,
>>
>> --
>> Jan van Mansum
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
>
> -- 
> My LinkedIn profile: http://www.linkedin.com/in/simonetripodi
> My GoogleCode profile: http://code.google.com/u/simone.tripodi/
> My Sourceforge: https://sourceforge.net/users/stripodi
> My Picasa: http://picasaweb.google.com/simone.tripodi/
> My Tube: http://www.youtube.com/user/stripodi
> My Del.icio.us: http://del.icio.us/simone.tripodi
>
> ---------------------------------------------------------------------
> 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: How do I add generated resources to target jar?

Posted by Simone Tripodi <si...@gmail.com>.
Hi Jan,
I just met a similar problem, as Stephen Connolly suggested me, you
should be able adding generated sources using build-helper plugin in
generate-sources phase.
Hope this helps, best regards,
Simone

2008/8/29 Jan van Mansum <ja...@gmail.com>:
> Hello group,
>
> I am using the antlr3 maven plugin to generate a parser. I would also like the
> .tokens file to be included in the target jar file, so that a client
> project can use
> it to generate a tree walker. How can a achieve this?
>
> Thanks for any help,
>
> best regards,
>
> --
> Jan van Mansum
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
My LinkedIn profile: http://www.linkedin.com/in/simonetripodi
My GoogleCode profile: http://code.google.com/u/simone.tripodi/
My Sourceforge: https://sourceforge.net/users/stripodi
My Picasa: http://picasaweb.google.com/simone.tripodi/
My Tube: http://www.youtube.com/user/stripodi
My Del.icio.us: http://del.icio.us/simone.tripodi

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


Re: How do I add generated resources to target jar?

Posted by Jan van Mansum <ja...@gmail.com>.
Thanks Dan!

That did the trick. I included the following in my pom and it works beautifully:

...
  <build>
        <resources>
            <resource>
                <directory>target/generated-sources/antlr</directory>
                <includes>
                    <include>**/*.tokens</include>
                </includes>
            </resource>
        </resources>
  ....
   </build>


2008/8/30 Dan Tran <da...@gmail.com>:
> Maven pom allows you to add additional resource directories.  Check
> the pom schema again.
>
> -D
>
> On Fri, Aug 29, 2008 at 2:40 PM, Jan van Mansum <ja...@gmail.com> wrote:
>> Hello group,
>>
>> I am using the antlr3 maven plugin to generate a parser. I would also like the
>> .tokens file to be included in the target jar file, so that a client
>> project can use
>> it to generate a tree walker. How can a achieve this?
>>
>> Thanks for any help,
>>
>> best regards,
>>
>> --
>> Jan van Mansum
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
Jan van Mansum

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


Re: How do I add generated resources to target jar?

Posted by Dan Tran <da...@gmail.com>.
Maven pom allows you to add additional resource directories.  Check
the pom schema again.

-D

On Fri, Aug 29, 2008 at 2:40 PM, Jan van Mansum <ja...@gmail.com> wrote:
> Hello group,
>
> I am using the antlr3 maven plugin to generate a parser. I would also like the
> .tokens file to be included in the target jar file, so that a client
> project can use
> it to generate a tree walker. How can a achieve this?
>
> Thanks for any help,
>
> best regards,
>
> --
> Jan van Mansum
>
> ---------------------------------------------------------------------
> 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