Discussion:
[Middlegen-user] Externalizing entity-cmp-20.vm
Rod Macpherson
2003-09-24 15:34:02 UTC
Permalink
We have been using middlegen for over a year now but every now and then
we have to tweak our velocity scripts. I replaced entity-cmp-20.vm to
generate a very custom set of EJBs but how do I externalize that file so
that we do not have to rebuild the middlegen entity bean jar? This came
up a year ago but the response has escaped me.

TIA,

Rod
Gregory Joseph
2003-09-24 15:48:04 UTC
Permalink
I haven't done this with middlegen, only with xdoclet, but I bet the same
hack will work: put your custom .vm file at the same directory level as it is
in the jar file. (org/middlegen/...i guess), and have the root of this be in
your classpath when you call middlegen.
I repeat, this is a hack :D

g

-----Original Message-----
From: Rod Macpherson [mailto:***@verilet.com]
Sent: mercredi 24 septembre 2003 19:35
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] Externalizing entity-cmp-20.vm


We have been using middlegen for over a year now but every now and then
we have to tweak our velocity scripts. I replaced entity-cmp-20.vm to
generate a very custom set of EJBs but how do I externalize that file so
that we do not have to rebuild the middlegen entity bean jar? This came
up a year ago but the response has escaped me.

TIA,

Rod



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Rod Macpherson
2003-09-24 20:03:05 UTC
Permalink
That sounds like it would work since it's convenient to plop resources
in a package and let the class loader fetch the resource from the
classpath. Still no more convenient than rebuilding the
middlegen-entity.jar file, however. Aslak mentioned the entity-cmp-20.vm
could be externalized but I forgot how.

Thanks

-----Original Message-----
From: Gregory Joseph [mailto:***@kiala.com]
Sent: Wednesday, September 24, 2003 10:47 AM
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] Externalizing entity-cmp-20.vm


I haven't done this with middlegen, only with xdoclet, but I bet the
same hack will work: put your custom .vm file at the same directory
level as it is in the jar file. (org/middlegen/...i guess), and have the
root of this be in your classpath when you call middlegen. I repeat,
this is a hack :D

g

-----Original Message-----
From: Rod Macpherson [mailto:***@verilet.com]
Sent: mercredi 24 septembre 2003 19:35
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] Externalizing entity-cmp-20.vm


We have been using middlegen for over a year now but every now and then
we have to tweak our velocity scripts. I replaced entity-cmp-20.vm to
generate a very custom set of EJBs but how do I externalize that file so
that we do not have to rebuild the middlegen entity bean jar? This came
up a year ago but the response has escaped me.

TIA,

Rod



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Eivind Waaler
2003-09-25 07:27:16 UTC
Permalink
You could also specify a fileproducer element in the cmp plugin i think
(in build.xml):

<cmp20...
<fileproducer
id="entity-cmp-20"
template="mycmp20.vm"
/>
...
</cmp20>

That way you can name and locate your new vm file whereever you want..

.eivind
Post by Rod Macpherson
That sounds like it would work since it's convenient to plop resources
in a package and let the class loader fetch the resource from the
classpath. Still no more convenient than rebuilding the
middlegen-entity.jar file, however. Aslak mentioned the entity-cmp-20.vm
could be externalized but I forgot how.
Thanks
-----Original Message-----
Sent: Wednesday, September 24, 2003 10:47 AM
Subject: RE: [Middlegen-user] Externalizing entity-cmp-20.vm
I haven't done this with middlegen, only with xdoclet, but I bet the
same hack will work: put your custom .vm file at the same directory
level as it is in the jar file. (org/middlegen/...i guess), and have the
root of this be in your classpath when you call middlegen. I repeat,
this is a hack :D
g
-----Original Message-----
Sent: mercredi 24 septembre 2003 19:35
Subject: [Middlegen-user] Externalizing entity-cmp-20.vm
We have been using middlegen for over a year now but every now and then
we have to tweak our velocity scripts. I replaced entity-cmp-20.vm to
generate a very custom set of EJBs but how do I externalize that file so
that we do not have to rebuild the middlegen entity bean jar? This came
up a year ago but the response has escaped me.
TIA,
Rod
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Rod Macpherson
2003-09-25 18:52:05 UTC
Permalink
Wonderful, thanks.


-----Original Message-----
From: Eivind Waaler [mailto:***@tihlde.org]
Sent: Thursday, September 25, 2003 2:26 AM
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] Externalizing entity-cmp-20.vm


You could also specify a fileproducer element in the cmp plugin i think
(in build.xml):

<cmp20...
<fileproducer
id="entity-cmp-20"
template="mycmp20.vm"
/>
...
</cmp20>

That way you can name and locate your new vm file whereever you want..

.eivind
Post by Rod Macpherson
That sounds like it would work since it's convenient to plop resources
in a package and let the class loader fetch the resource from the
classpath. Still no more convenient than rebuilding the
middlegen-entity.jar file, however. Aslak mentioned the
entity-cmp-20.vm could be externalized but I forgot how.
Thanks
-----Original Message-----
Sent: Wednesday, September 24, 2003 10:47 AM
Subject: RE: [Middlegen-user] Externalizing entity-cmp-20.vm
I haven't done this with middlegen, only with xdoclet, but I bet the
same hack will work: put your custom .vm file at the same directory
level as it is in the jar file. (org/middlegen/...i guess), and have
the root of this be in your classpath when you call middlegen. I
repeat, this is a hack :D
g
-----Original Message-----
Sent: mercredi 24 septembre 2003 19:35
Subject: [Middlegen-user] Externalizing entity-cmp-20.vm
We have been using middlegen for over a year now but every now and
then we have to tweak our velocity scripts. I replaced
entity-cmp-20.vm to generate a very custom set of EJBs but how do I
externalize that file so that we do not have to rebuild the middlegen
entity bean jar? This came up a year ago but the response has escaped
me.
TIA,
Rod
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

Loading...