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 32 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

[11:54:54 CST(-0600)] <EricDalquist> we create a maven plugin that introduces some custom lifecycles

[11:54:59 CST(-0600)] <drewwills> yeah I looked quickly

[11:55:07 CST(-0600)] <EricDalquist> then

[11:55:14 CST(-0600)] <drewwills> looked as though I would have to write a plugin

[11:55:32 CST(-0600)] <EricDalquist> in the pom.xml of a specific overlay (for example calendar) you would declare the hibernate3 plugin

[11:55:44 CST(-0600)] <EricDalquist> and bind the appropriate goals to the new lifecycles

[11:55:47 CST(-0600)] <drewwills> and bind it to a lifecycle phase

[11:56:19 CST(-0600)] <EricDalquist> so say we (aka jwennmacher) writes a plugin that adds "up-initdb, up-updatedb, up-importdb, ..."

[11:56:34 CST(-0600)] <EricDalquist> then we can have it be essentially discoverable

[11:56:46 CST(-0600)] <EricDalquist> by binding the right plugins/goals in the individual overlay poms

[11:56:57 CST(-0600)] <EricDalquist> since each portlet might have slightly different init/update/import needs

[11:57:20 CST(-0600)] <drewwills> and then we'd invoke a goal on that plugin to trigger the whole thing, correct?

[11:57:33 CST(-0600)] <drewwills> or invoke a lifecycle phase?

[11:58:08 CST(-0600)] <EricDalquist> I think by invoking the custom lifecycle phanse

[11:58:08 CST(-0600)] <EricDalquist> http://www.sonatype.com/people/2009/08/create-a-customized-build-process-in-maven/

[11:58:57 CST(-0600)] <EricDalquist> so this looks doable

[11:59:01 CST(-0600)] <drewwills> how does the parent pom know about the lifecycle phase? by declaring the plugin? (but without binding any behavior to it)

[11:59:08 CST(-0600)] <EricDalquist> yeah I think so

[11:59:20 CST(-0600)] <EricDalquist> but will likely require a fair amount of trial and error and some test projects

[11:59:29 CST(-0600)] <EricDalquist> as the documentation is semi-old and not all that great

[11:59:35 CST(-0600)] <drewwills> cool... can this plugin be another subproject in uP, or does it have to be completely outside?

[11:59:43 CST(-0600)] <EricDalquist> it should be an outside projecty

[11:59:57 CST(-0600)] <EricDalquist> otherwise we're going to get into circular depenency hell

[11:59:58 CST(-0600)] <drewwills> we will need a release of it then

[12:00:04 CST(-0600)] <EricDalquist> yup

[12:00:08 CST(-0600)] <EricDalquist> thats easy enough to do

[12:00:24 CST(-0600)] <EricDalquist> we can create a project in github for it

[12:01:04 CST(-0600)] <EricDalquist> and use https://github.com/Jasig/sass-maven-plugin as an example pom.xml to base the project on

[12:02:06 CST(-0600)] <drewwills> is this approach enough better than invoking the poms of overlaid portlets directly from build.xml?

[12:02:30 CST(-0600)] <EricDalquist> well it does require less central fiddling right?

[12:02:37 CST(-0600)] <EricDalquist> we come up with a handful of lifecycle goals

[12:02:43 CST(-0600)] <drewwills> it could be... but I feel it's important to ask... there's a ton of cool work in the queue

[12:02:45 CST(-0600)] <EricDalquist> er lifecycles (not goals)

[12:03:03 CST(-0600)] <EricDalquist> well it is a trade off

[12:03:06 CST(-0600)] <EricDalquist> more work now

[12:03:11 CST(-0600)] <EricDalquist> less maintenance work later

[12:03:17 CST(-0600)] <EricDalquist> and a more flexible api

[12:03:29 CST(-0600)] <drewwills> less maintenance and likely fewer regressions

[12:03:32 CST(-0600)] <EricDalquist> and maven only which is a long term project goal

[12:03:33 CST(-0600)] <drewwills> mixups

[12:03:33 CST(-0600)] <EricDalquist> yup

[12:03:36 CST(-0600)] <EricDalquist> should be much more stable

[12:03:47 CST(-0600)] <EricDalquist> since the entire configuration onus is within each overlay pom

[12:03:56 CST(-0600)] <EricDalquist> and those are independent of each other

[12:03:59 CST(-0600)] <drewwills> yeah that's what I was hoping for

[12:04:30 CST(-0600)] <drewwills> does this new plugin need to do anything besides define new lifecycle phases?

[12:06:07 CST(-0600)] <EricDalquist> that I'm not sure

[12:06:11 CST(-0600)] <EricDalquist> and will require some trial and error

[12:06:31 CST(-0600)] <EricDalquist> whoever does this needs to be prepared to do some serious problem solving with maven plugins/goals/lifecycles

[12:06:43 CST(-0600)] <EricDalquist> as I think those blog posts will get you about 70% of the way

[12:06:51 CST(-0600)] <EricDalquist> and the rest will require testing/fiddling/discussion here

[12:08:22 CST(-0600)] <drewwills> well... we already have tested & ready plugin cofigs for the Calendar... we just need lifecycle phases to bind them to

[12:08:44 CST(-0600)] <drewwills> i hope there's a 12 hr or less version of this (tongue)

[12:09:00 CST(-0600)] <EricDalquist> maybe

[12:09:12 CST(-0600)] <EricDalquist> it could end up being really easy

[12:09:22 CST(-0600)] <drewwills> it might

[12:38:19 CST(-0600)] <drewwills> alright – i just had a quick chat with jwennmacher, and he has graciously agreed to put this on his list (wink)

[12:38:46 CST(-0600)] <EricDalquist> (smile)

[13:51:23 CST(-0600)] <prabhu> hi

[13:51:43 CST(-0600)] <prabhu> How to make uportal local authentication alone?

[13:51:49 CST(-0600)] <prabhu> please help me ou

[13:51:50 CST(-0600)] <prabhu> please help me out

[13:55:21 CST(-0600)] <prabhu> I followed the steps in the documentation and uncommented the # in the local authentication on security.properties file

[13:56:06 CST(-0600)] <prabhu> but after recompilation I dont see any login portlet to sign up with my username and password

  • No labels