Quantcast

Template overrides through maven pom.xml.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Template overrides through maven pom.xml.

Luis Torres-8
Hello All,


I'm very noob with torque;  I'm currently using Maven 3.0.4
with the maven2 torque plugin and I'm trying to set the equivalent
to torque.override.dir=<dir> in the Maven pom.xml, I apologize
beforehand if this topic has been visited before but I've gone
and tried all possible solutions but none seem to work (templates
are not overridden).  


Thank you in advance,
-----
Luis Torres
Systems Administrator PATH/ITS
UC Berkeley
[hidden email]






---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Template overrides through maven pom.xml.

Thomas Fox-2
The answer depends on which Torque maven plugin you use:
torque-4.0-beta1 or torque-3.3 ?

     Thomas

> Hello All,
>
>
> I'm very noob with torque;  I'm currently using Maven 3.0.4
> with the maven2 torque plugin and I'm trying to set the equivalent
> to torque.override.dir=<dir> in the Maven pom.xml, I apologize
> beforehand if this topic has been visited before but I've gone
> and tried all possible solutions but none seem to work (templates
> are not overridden).
>
>
> Thank you in advance,
> -----
> Luis Torres
> Systems Administrator PATH/ITS
> UC Berkeley
> [hidden email]
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Template overrides through maven pom.xml.

Thomas Fox-2
> The answer depends on which Torque maven plugin you use:
> torque-4.0-beta1 or torque-3.3 ?

For Torque 3 , set
      <plugin>
        <groupId>org.apache.torque</groupId>
        <artifactId>torque-maven-plugin</artifactId>
        <version>3.3</version>
        <configuration>
          <useClasspath>false</useClasspath>
...

and torque will only use the templates in src/main/torque/templates and
ignore its original templates

For torque 4, use

      <plugin>
        <groupId>org.apache.torque</groupId>
        <artifactId>torque-maven-plugin</artifactId>
        <version>4.0-beta1</version>
        <configuration>
          <overrideConfigDir>src/main/torque/templates</overrideConfigDir>

and Torque will use the templates in src/main/torque/templates preferred
to, but still using the original templates.

   Hope that helps,

         Thomas

> > Hello All,
> >
> >
> > I'm very noob with torque;  I'm currently using Maven 3.0.4
> > with the maven2 torque plugin and I'm trying to set the equivalent
> > to torque.override.dir=<dir> in the Maven pom.xml, I apologize
> > beforehand if this topic has been visited before but I've gone
> > and tried all possible solutions but none seem to work (templates
> > are not overridden).
> >
> >
> > Thank you in advance,
> > -----
> > Luis Torres
> > Systems Administrator PATH/ITS
> > UC Berkeley
> > [hidden email]
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Template overrides through maven pom.xml.

Luis Torres-8
In reply to this post by Thomas Fox-2
Hi Tom!


We're using torque-3.3.  We don't know how to get the override
process working, we were thinking about delegating it to ant
through maven, is there a better way involving the plugin itself?

-L-
On Nov 22, 2012, at 12:27 AM, Thomas Fox wrote:

> The answer depends on which Torque maven plugin you use:
> torque-4.0-beta1 or torque-3.3 ?
>
>     Thomas
>
>> Hello All,
>>
>>
>> I'm very noob with torque;  I'm currently using Maven 3.0.4
>> with the maven2 torque plugin and I'm trying to set the equivalent
>> to torque.override.dir=<dir> in the Maven pom.xml, I apologize
>> beforehand if this topic has been visited before but I've gone
>> and tried all possible solutions but none seem to work (templates
>> are not overridden).
>>
>>
>> Thank you in advance,
>> -----
>> Luis Torres
>> Systems Administrator PATH/ITS
>> UC Berkeley
>> [hidden email]
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

-----
Luis Torres
Systems Administrator PATH/ITS
UC Berkeley
[hidden email]






---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Template overrides through maven pom.xml.

Luis Torres-8
In reply to this post by Thomas Fox-2
Thanks Thomas,


What we're trying to do is to set some overrides
that omit SQL "drops", we used to do this in
ant by setting the torque.override.dir property to
the template directories, I'll try what you sent me
below and find out if works for us.

-Luis-
On Nov 23, 2012, at 12:26 AM, Thomas Fox wrote:

>> The answer depends on which Torque maven plugin you use:
>> torque-4.0-beta1 or torque-3.3 ?
>
> For Torque 3 , set
>      <plugin>
>        <groupId>org.apache.torque</groupId>
>        <artifactId>torque-maven-plugin</artifactId>
>        <version>3.3</version>
>        <configuration>
>          <useClasspath>false</useClasspath>
> ...
>
> and torque will only use the templates in src/main/torque/templates and
> ignore its original templates
>
> For torque 4, use
>
>      <plugin>
>        <groupId>org.apache.torque</groupId>
>        <artifactId>torque-maven-plugin</artifactId>
>        <version>4.0-beta1</version>
>        <configuration>
>          <overrideConfigDir>src/main/torque/templates</overrideConfigDir>
>
> and Torque will use the templates in src/main/torque/templates preferred
> to, but still using the original templates.
>
>   Hope that helps,
>
>         Thomas
>
>>> Hello All,
>>>
>>>
>>> I'm very noob with torque;  I'm currently using Maven 3.0.4
>>> with the maven2 torque plugin and I'm trying to set the equivalent
>>> to torque.override.dir=<dir> in the Maven pom.xml, I apologize
>>> beforehand if this topic has been visited before but I've gone
>>> and tried all possible solutions but none seem to work (templates
>>> are not overridden).
>>>
>>>
>>> Thank you in advance,
>>> -----
>>> Luis Torres
>>> Systems Administrator PATH/ITS
>>> UC Berkeley
>>> [hidden email]
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

-----
Luis Torres
Systems Administrator PATH/ITS
UC Berkeley
[hidden email]






---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

tv
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Template overrides through maven pom.xml.

tv
In reply to this post by Thomas Fox-2
On 23.11.12 09:26, Thomas Fox wrote:

>> The answer depends on which Torque maven plugin you use:
>> torque-4.0-beta1 or torque-3.3 ?
>
> For Torque 3 , set
>       <plugin>
>         <groupId>org.apache.torque</groupId>
>         <artifactId>torque-maven-plugin</artifactId>
>         <version>3.3</version>
>         <configuration>
>           <useClasspath>false</useClasspath>
> ...
>
> and torque will only use the templates in src/main/torque/templates and
> ignore its original templates

I recommend
--8<--
        <configuration>
            <templatePath>/path/to/your/templates/</templatePath>
            <useClasspath>true</useClasspath>
--8<--

This will allow you to place just the templates to override into the
template path and use the rest from the torque-templates package.

Bye, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...