FAQ
Per CAY-591, I'm in the process of porting the cgen ant task to be a
maven2 plugin. So far, what I have works pretty well and I've just
refactored a bunch of crap so that I even like the code a little bit.
The problem I'm facing is that the cgen ant task used VPP for Velocity
stuff. VPP is highly tied to ant and in probing the maven user list,
I'm not getting the sense there's going to be any way for me to use it.

So, we're at a bit of a crossroads. From what I can see, our options
are:

1) Port VPP to Maven
2) Strike the Velocity options from cgen for maven
3) Find a new way of doing the Velocity stuff

1) seems like a fair amount of work that has a questionable amount to do
with Cayenne proper. Nonetheless, I could look into doing it. My
primary concern is that it appears active development on VPP has ceased
and I'd have to convince them to host it upstream, since we shouldn't be
maintaining it in Cayenne.

2) is where we're at right now. It's sort of a sucky position to be in,
because I'd really like people to just be able to do everything with the
plugin that could do in ant. However, even if we go this route, I think
the plugin would still be an 80% solution.

3) is what I'm guessing is the most reasonable option. Alas, my
experience with Velocity is quite limited. As of right now, I'm still
not 100% sure I understand what the VPP stuff is doing, since I've never
had the need to use it in cgen. If we go this route, I'm likely going
to need help.

Thoughts?

--
Kevin Menard
Servprise International
WebReboot -- Remote Reboot Without Pulling the Plug
800.832.3823

Search Discussions

  • Mike Kienenberger at Nov 3, 2006 at 6:52 pm
    I make extensive using of VPP with cgen.

    Vpp is essentially a velocity configuration tool that runs before cgen.

    It allows you to configure the Velocity templating engine (the
    <engine> tags), and the current Velocity context (the <context> tags).

    This allows you to add additional tools (or variables) to your
    template before the template runs. Vpp also allows you to define
    such configurations globally and reuse them. Finally, it allows you
    to use the ant typedef task to preconfigure individual velocity tools
    before storing them in the context task.

    So Vpp is essentially a bridge between ant and velocity. Porting it
    probably doesn't make as much sense as simply rewriting it since I'm
    sure the internals for maven work differently.

    There's not really a lot to Vpp. I think most classes are simply data holders.

    I thought I heard that you can run ant tasks directly from maven.
    That might be a better way to go in the short term.
    On 11/3/06, Kevin Menard wrote:
    Per CAY-591, I'm in the process of porting the cgen ant task to be a
    maven2 plugin. So far, what I have works pretty well and I've just
    refactored a bunch of crap so that I even like the code a little bit.
    The problem I'm facing is that the cgen ant task used VPP for Velocity
    stuff. VPP is highly tied to ant and in probing the maven user list,
    I'm not getting the sense there's going to be any way for me to use it.

    So, we're at a bit of a crossroads. From what I can see, our options
    are:

    1) Port VPP to Maven
    2) Strike the Velocity options from cgen for maven
    3) Find a new way of doing the Velocity stuff

    1) seems like a fair amount of work that has a questionable amount to do
    with Cayenne proper. Nonetheless, I could look into doing it. My
    primary concern is that it appears active development on VPP has ceased
    and I'd have to convince them to host it upstream, since we shouldn't be
    maintaining it in Cayenne.

    2) is where we're at right now. It's sort of a sucky position to be in,
    because I'd really like people to just be able to do everything with the
    plugin that could do in ant. However, even if we go this route, I think
    the plugin would still be an 80% solution.

    3) is what I'm guessing is the most reasonable option. Alas, my
    experience with Velocity is quite limited. As of right now, I'm still
    not 100% sure I understand what the VPP stuff is doing, since I've never
    had the need to use it in cgen. If we go this route, I'm likely going
    to need help.

    Thoughts?

    --
    Kevin Menard
    Servprise International
    WebReboot -- Remote Reboot Without Pulling the Plug
    800.832.3823
  • Aristedes Maniatis at Nov 4, 2006 at 5:03 am

    On 04/11/2006, at 3:50 AM, Kevin Menard wrote:

    1) Port VPP to Maven
    2) Strike the Velocity options from cgen for maven
    3) Find a new way of doing the Velocity stuff
    4) Leave it in ant and call the ant script from maven

    If cgen gets moved across to maven will this force all of us using
    ant currently to build their Cayenne-based projects to also move to
    maven? If so, ugh.

    Ari



    -------------------------->
    ish
    http://www.ish.com.au
    Level 1, 30 Wilson Street Newtown 2042 Australia
    phone +61 2 9550 5001 fax +61 2 9550 4001
    GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
  • Kevin Menard at Nov 4, 2006 at 5:01 pm

    If cgen gets moved across to maven will this force all of us using
    ant currently to build their Cayenne-based projects to also move to
    maven? If so, ugh.
    Nope. It's just a port, not a replacement. The idea is to natively
    support each build tool. When trying to call ant from maven, I ran into
    a lot of problems originally (I think I recently a fix for the root of
    them though). I also found it awkward to split the cgen stuff out into
    a separate ant file just because there was no native way to configure it
    in maven.

    As it stands right now, the maven port is going to be limited by the VPP
    stuff. So, there isn't going to be a 1:1 feature set, which I was
    hoping to avoid. I may just take Mike's suggestion and implement the
    VPP stuff myself.

    --
    Kevin
  • Andrus Adamchik at Nov 20, 2006 at 5:21 pm
    On my customer project I just upgraded Cayenne jar to the trunk
    version (from the one we had that was a few months old). Now I am
    getting the exception below when trying to build classes with Ant. Of
    course adding VPP jars to CLASSPATH fixes the problem, but I thought
    it was optional?

    Thanks
    Andrus


    BUILD FAILED
    java.lang.NoClassDefFoundError: foundrylogic/vpp/VPPConfig
    at org.apache.tools.ant.Project.executeSortedTargets
    (Project.java:1225)
    at org.apache.tools.ant.Project.executeTarget(Project.java:
    1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
    (DefaultExecutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:
    1068)
    at org.apache.tools.ant.Main.runBuild(Main.java:668)
    at org.apache.tools.ant.Main.startAnt(Main.java:187)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Caused by: java.lang.NoClassDefFoundError: foundrylogic/vpp/VPPConfig
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
    at java.lang.Class.privateGetPublicMethods(Class.java:2488)
    at java.lang.Class.getMethods(Class.java:1406)
    at org.apache.tools.ant.IntrospectionHelper.<init>
    (IntrospectionHelper.java:171)
    at org.apache.tools.ant.IntrospectionHelper.getHelper
    (IntrospectionHelper.java:315)
    at org.apache.tools.ant.UnknownElement.handleChildren
    (UnknownElement.java:318)
    at org.apache.tools.ant.UnknownElement.configure
    (UnknownElement.java:182)
    at org.apache.tools.ant.UnknownElement.maybeConfigure
    (UnknownElement.java:158)
    at org.apache.tools.ant.Task.perform(Task.java:363)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets
    (Project.java:1216)
  • Kevin Menard at Nov 20, 2006 at 5:38 pm
    Perhaps I screwed something up in the refactoring. I thought what I had
    done was further isolate things though. I'll give it a look later this
    afternoon/evening though. I'll also see what can be done on the testing
    end of things to prevent issues like this.

    --
    Kevin Menard
    Servprise International
    WebReboot -- Remote Reboot Without Pulling the Plug
    800.832.3823
    -----Original Message-----
    From: Andrus Adamchik
    Sent: Monday, November 20, 2006 12:21 PM
    To: cayenne-dev@incubator.apache.org
    Subject: Re: cgen and VPP

    On my customer project I just upgraded Cayenne jar to the trunk
    version (from the one we had that was a few months old). Now I am
    getting the exception below when trying to build classes with Ant. Of
    course adding VPP jars to CLASSPATH fixes the problem, but I thought
    it was optional?

    Thanks
    Andrus


    BUILD FAILED
    java.lang.NoClassDefFoundError: foundrylogic/vpp/VPPConfig
    at org.apache.tools.ant.Project.executeSortedTargets
    (Project.java:1225)
    at org.apache.tools.ant.Project.executeTarget(Project.java:
    1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
    (DefaultExecutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:
    1068)
    at org.apache.tools.ant.Main.runBuild(Main.java:668)
    at org.apache.tools.ant.Main.startAnt(Main.java:187)
    at
    org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    at
    org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Caused by: java.lang.NoClassDefFoundError: foundrylogic/vpp/VPPConfig
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
    at java.lang.Class.privateGetPublicMethods(Class.java:2488)
    at java.lang.Class.getMethods(Class.java:1406)
    at org.apache.tools.ant.IntrospectionHelper.<init>
    (IntrospectionHelper.java:171)
    at org.apache.tools.ant.IntrospectionHelper.getHelper
    (IntrospectionHelper.java:315)
    at org.apache.tools.ant.UnknownElement.handleChildren
    (UnknownElement.java:318)
    at org.apache.tools.ant.UnknownElement.configure
    (UnknownElement.java:182)
    at org.apache.tools.ant.UnknownElement.maybeConfigure
    (UnknownElement.java:158)
    at org.apache.tools.ant.Task.perform(Task.java:363)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets
    (Project.java:1216)
  • Andrus Adamchik at Nov 20, 2006 at 6:09 pm
    That would be awesome.

    Andrus
    On Nov 20, 2006, at 12:38 PM, Kevin Menard wrote:

    Perhaps I screwed something up in the refactoring. I thought what
    I had
    done was further isolate things though. I'll give it a look later
    this
    afternoon/evening though. I'll also see what can be done on the
    testing
    end of things to prevent issues like this.

    --
    Kevin Menard
    Servprise International
    WebReboot -- Remote Reboot Without Pulling the Plug
    800.832.3823
    -----Original Message-----
    From: Andrus Adamchik
    Sent: Monday, November 20, 2006 12:21 PM
    To: cayenne-dev@incubator.apache.org
    Subject: Re: cgen and VPP

    On my customer project I just upgraded Cayenne jar to the trunk
    version (from the one we had that was a few months old). Now I am
    getting the exception below when trying to build classes with Ant. Of
    course adding VPP jars to CLASSPATH fixes the problem, but I thought
    it was optional?

    Thanks
    Andrus


    BUILD FAILED
    java.lang.NoClassDefFoundError: foundrylogic/vpp/VPPConfig
    at org.apache.tools.ant.Project.executeSortedTargets
    (Project.java:1225)
    at org.apache.tools.ant.Project.executeTarget(Project.java:
    1185)
    at
    org.apache.tools.ant.helper.DefaultExecutor.executeTargets
    (DefaultExecutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:
    1068)
    at org.apache.tools.ant.Main.runBuild(Main.java:668)
    at org.apache.tools.ant.Main.startAnt(Main.java:187)
    at
    org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    at
    org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Caused by: java.lang.NoClassDefFoundError: foundrylogic/vpp/VPPConfig
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:
    2365)
    at java.lang.Class.privateGetPublicMethods(Class.java:2488)
    at java.lang.Class.getMethods(Class.java:1406)
    at org.apache.tools.ant.IntrospectionHelper.<init>
    (IntrospectionHelper.java:171)
    at org.apache.tools.ant.IntrospectionHelper.getHelper
    (IntrospectionHelper.java:315)
    at org.apache.tools.ant.UnknownElement.handleChildren
    (UnknownElement.java:318)
    at org.apache.tools.ant.UnknownElement.configure
    (UnknownElement.java:182)
    at org.apache.tools.ant.UnknownElement.maybeConfigure
    (UnknownElement.java:158)
    at org.apache.tools.ant.Task.perform(Task.java:363)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets
    (Project.java:1216)
  • Kevin Menard at Nov 21, 2006 at 4:01 am
    I didn't see anything immediately that's indicative of the problem.
    This may actually be symptomatic of a larger problem with improper
    dependency scope mentioned some time back. I'm going to try to clean
    that up a bit and see if it helps any.

    --
    Kevin Menard
    Servprise International
    WebReboot -- Remote Reboot Without Pulling the Plug
    800.832.3823
    -----Original Message-----
    From: Andrus Adamchik
    Sent: Monday, November 20, 2006 12:21 PM
    To: cayenne-dev@incubator.apache.org
    Subject: Re: cgen and VPP

    On my customer project I just upgraded Cayenne jar to the trunk
    version (from the one we had that was a few months old). Now I am
    getting the exception below when trying to build classes with Ant. Of
    course adding VPP jars to CLASSPATH fixes the problem, but I thought
    it was optional?
  • Andrus Adamchik at Nov 21, 2006 at 4:14 am
    I don't think it os related to dependency scope - I am not using
    Maven on this project.

    Andrus

    On Nov 20, 2006, at 11:01 PM, Kevin Menard wrote:

    I didn't see anything immediately that's indicative of the problem.
    This may actually be symptomatic of a larger problem with improper
    dependency scope mentioned some time back. I'm going to try to clean
    that up a bit and see if it helps any.

    --
    Kevin Menard
    Servprise International
    WebReboot -- Remote Reboot Without Pulling the Plug
    800.832.3823
    -----Original Message-----
    From: Andrus Adamchik
    Sent: Monday, November 20, 2006 12:21 PM
    To: cayenne-dev@incubator.apache.org
    Subject: Re: cgen and VPP

    On my customer project I just upgraded Cayenne jar to the trunk
    version (from the one we had that was a few months old). Now I am
    getting the exception below when trying to build classes with Ant. Of
    course adding VPP jars to CLASSPATH fixes the problem, but I thought
    it was optional?
  • Kevin Menard at Nov 21, 2006 at 1:23 pm

    -----Original Message-----
    From: Andrus Adamchik
    Sent: Monday, November 20, 2006 11:14 PM
    To: cayenne-dev@incubator.apache.org
    Subject: Re: cgen and VPP

    I don't think it os related to dependency scope - I am not using
    Maven on this project.
    I've just set something up to reproduce the problem. So, I'll be
    pegging away at it.

    --
    Kevin
  • Mike Kienenberger at Nov 20, 2006 at 6:07 pm
    Hey Andrus,

    If I recall, there is a cayenne compile-time dependency on VPP, but no
    runtime dependency.

    On 11/20/06, Andrus Adamchik wrote:
    On my customer project I just upgraded Cayenne jar to the trunk
    version (from the one we had that was a few months old). Now I am
    getting the exception below when trying to build classes with Ant. Of
    course adding VPP jars to CLASSPATH fixes the problem, but I thought
    it was optional?

    Thanks
    Andrus


    BUILD FAILED
    java.lang.NoClassDefFoundError: foundrylogic/vpp/VPPConfig
    at org.apache.tools.ant.Project.executeSortedTargets
    (Project.java:1225)
    at org.apache.tools.ant.Project.executeTarget(Project.java:
    1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
    (DefaultExecutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:
    1068)
    at org.apache.tools.ant.Main.runBuild(Main.java:668)
    at org.apache.tools.ant.Main.startAnt(Main.java:187)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Caused by: java.lang.NoClassDefFoundError: foundrylogic/vpp/VPPConfig
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
    at java.lang.Class.privateGetPublicMethods(Class.java:2488)
    at java.lang.Class.getMethods(Class.java:1406)
    at org.apache.tools.ant.IntrospectionHelper.<init>
    (IntrospectionHelper.java:171)
    at org.apache.tools.ant.IntrospectionHelper.getHelper
    (IntrospectionHelper.java:315)
    at org.apache.tools.ant.UnknownElement.handleChildren
    (UnknownElement.java:318)
    at org.apache.tools.ant.UnknownElement.configure
    (UnknownElement.java:182)
    at org.apache.tools.ant.UnknownElement.maybeConfigure
    (UnknownElement.java:158)
    at org.apache.tools.ant.Task.perform(Task.java:363)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets
    (Project.java:1216)
  • Kevin Menard at Nov 21, 2006 at 2:24 pm
    Looks like it's all squared away. There was an errant setter method
    added. I can't find an reference to one prior to my refactorings, so I
    must have added it unwittingly. I've just removed it. Fortunately,
    Mike did all the hard work originally [1], so that was a big help.

    I'm still looking at ways we could test this for the future.

    [1] --
    http://www.objectstyle.org/cayenne/lists/cayenne-devel/2005/05/0157.html

    --
    Kevin


    -----Original Message-----
    From: Kevin Menard
    Sent: Tuesday, November 21, 2006 8:23 AM
    To: cayenne-dev@incubator.apache.org
    Subject: RE: cgen and VPP

    -----Original Message-----
    From: Andrus Adamchik
    Sent: Monday, November 20, 2006 11:14 PM
    To: cayenne-dev@incubator.apache.org
    Subject: Re: cgen and VPP

    I don't think it os related to dependency scope - I am not using
    Maven on this project.
    I've just set something up to reproduce the problem. So, I'll be
    pegging away at it.

    --
    Kevin
  • Andrus Adamchik at Nov 21, 2006 at 2:41 pm
    Great! I should be able to try it in our environment within a week.

    Thanks=
    Andrus

    On Nov 21, 2006, at 9:24 AM, Kevin Menard wrote:
    Looks like it's all squared away. There was an errant setter method
    added. I can't find an reference to one prior to my refactorings,
    so I
    must have added it unwittingly. I've just removed it. Fortunately,
    Mike did all the hard work originally [1], so that was a big help.

    I'm still looking at ways we could test this for the future.

    [1] --
    http://www.objectstyle.org/cayenne/lists/cayenne-devel/
    2005/05/0157.html

    --
    Kevin


    -----Original Message-----
    From: Kevin Menard
    Sent: Tuesday, November 21, 2006 8:23 AM
    To: cayenne-dev@incubator.apache.org
    Subject: RE: cgen and VPP

    -----Original Message-----
    From: Andrus Adamchik
    Sent: Monday, November 20, 2006 11:14 PM
    To: cayenne-dev@incubator.apache.org
    Subject: Re: cgen and VPP

    I don't think it os related to dependency scope - I am not using
    Maven on this project.
    I've just set something up to reproduce the problem. So, I'll be
    pegging away at it.

    --
    Kevin

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriescayenne
postedNov 3, '06 at 4:50p
activeNov 21, '06 at 2:41p
posts13
users5
websitecayenne.apache.org

People

Translate

site design / logo © 2022 Grokbase