Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

[09:34:09 CST(-0600)] <drewwills> EricDalquist I wanted to mention that I'm still looking at the solution for the data import for bundled portlets (though I already merged the pull request)

[09:34:56 CST(-0600)] <drewwills> it has come to light that the solution, as-is, doesn't reset the tables... i think it it would be better if it mirrored the behavior of initdb

[11:34:31 CST(-0600)] <drewwills> EricDalquist (or anyone) – is there a way in Maven to "link" one goal to another – such that goal #2 gets invoked automatically whenever goal #1 gets invoked?

[11:35:00 CST(-0600)] <EricDalquist> well ... goals get invoked either explicitly or by a lifecycle

[11:35:21 CST(-0600)] <EricDalquist> I don't think you can automatically invoke a goal in any way beyond just invoking the lifecycle it is bound to

[11:38:49 CST(-0600)] <drewwills> that seem to be the case

[11:39:11 CST(-0600)] <EricDalquist> can you describe what you're trying to do?

[11:39:24 CST(-0600)] <EricDalquist> in a more general sense?

[11:43:11 CST(-0600)] <drewwills> absolutely

[11:44:06 CST(-0600)] <drewwills> i'm still trying to persuade a bundled portlet to drop & recreate it's tables appropriately in the initdb cycle

[11:44:31 CST(-0600)] <drewwills> there is a hibernate3:hbm2ddl goal that can do that nicely

[11:44:57 CST(-0600)] <EricDalquist> so I haven't had a chance to look at the changes so far

[11:45:05 CST(-0600)] <drewwills> but it seems that when i invoke hibernate3:hbm2ddl on up-portlets-overlay/pom.xml, it crashes

[11:45:15 CST(-0600)] <EricDalquist> but jwennmacher was talking about essentially an "ant api"

[11:45:26 CST(-0600)] <drewwills> (interestingly antrun:run doesn't crash like that)

[11:45:35 CST(-0600)] <EricDalquist> how does it crash?

[11:45:39 CST(-0600)] <drewwills> sec...

[11:46:16 CST(-0600)] <drewwills> https://gist.github.com/drewwills/4716187

[11:46:53 CST(-0600)] <drewwills> actually that's with the plugin minimally configured in the up-overlay/pom.xml

[11:47:05 CST(-0600)] <drewwills> without the plugin configured at all, it's a bit different

[11:47:23 CST(-0600)] <EricDalquist> ah

[11:47:38 CST(-0600)] <drewwills> but it seems when i run...

[11:48:07 CST(-0600)]

<drewwills> <param name="pomDir" value="$

Unknown macro: {basedir}

/uportal-portlets-overlay" /> <param name="goal" value="hibernate3:hbm2ddl" />

[11:48:32 CST(-0600)] <drewwills> it actually tries to run that goal on the parent pom, which is meaningless and crashes

[11:49:01 CST(-0600)] <drewwills> i was hoping it would run on each child if – and only if – the child pom defines the plugin

[11:49:24 CST(-0600)] <EricDalquist> so what version of hibernate is the portlet using?

[11:49:35 CST(-0600)] <EricDalquist> since that plugin is explicitly for hibernate 3

[11:49:35 CST(-0600)] <drewwills> which seems to be the behavior of antrun:run

[11:49:56 CST(-0600)] <drewwills> yeah the portlet in question (at least this one) is hibernate 3

[11:49:59 CST(-0600)] <EricDalquist> ok

[11:50:05 CST(-0600)] <drewwills> <param name="goal" value="hibernate3:hbm2ddl" />

[11:50:08 CST(-0600)] <drewwills> oops

[11:50:10 CST(-0600)] <drewwills> 3.2.3.ga

[11:50:17 CST(-0600)] <EricDalquist> so next thought is can that plugin load the hibernate.cfg.xml from a classpath resource

[11:50:22 CST(-0600)] <EricDalquist> instead of from the file system

[11:50:27 CST(-0600)] <EricDalquist> since that is the case you have

[11:50:40 CST(-0600)] <drewwills> i should add that when invoked on the child pom directly, in the submodule dir, it works perfectly fine

[11:50:44 CST(-0600)] <EricDalquist> if you run that goal on the overlay the only thing actually available are overlay local files

[11:50:55 CST(-0600)] <EricDalquist> and the -classes jar + jar dependencies of the overlayed WAR

[11:51:17 CST(-0600)] <EricDalquist> so that plugin needs to be able to load that xml file from the classpath since it only exists in that -classes.jar

[11:51:41 CST(-0600)] <drewwills> this command works: mvn -Dmaven.test.skip=true -Dportlet-data-import=true hibernate3:hbm2ddl

[11:51:56 CST(-0600)] <EricDalquist> where are you running that?

[11:51:57 CST(-0600)] <drewwills> when run from within up-p-o/CalendarPortlet/

[11:52:09 CST(-0600)] <EricDalquist> ok

[11:52:27 CST(-0600)] <drewwills> the error seems to happen even before the child pom comes into play

[11:52:33 CST(-0600)] <EricDalquist> so when does it crash then?

[11:52:43 CST(-0600)] <drewwills> it seem to be an error on the up-p-o/pom.xml level

[11:52:56 CST(-0600)] <EricDalquist> right ... that project has no files

[11:53:06 CST(-0600)] <EricDalquist> so you can't run goals like hibernate3:hbm2ddl

[11:53:13 CST(-0600)] <EricDalquist> you have to run it on the specific portlet projects

[11:53:32 CST(-0600)] <drewwills> how do I do that without naming them explitcitly in the build.xml?

[11:53:45 CST(-0600)] <drewwills> (i was hoping to make them discoverable)

[11:54:35 CST(-0600)] <EricDalquist> hrm

[11:54:36 CST(-0600)] <EricDalquist> so

[11:54:39 CST(-0600)] <drewwills> perhaps that goal is unattainable

[11:54:43 CST(-0600)] <EricDalquist> one thought after some quick googling:

[11:54:44 CST(-0600)] <EricDalquist> https://community.jboss.org/wiki/CreatingACustomLifecycleInMaven

  • No labels