# portals-jetspeed-dev mailing list archives

##### Site index · List index
Message view
Top
From Randy Watler <wat...@wispertel.net>
Subject Re: minimal maven2 build ready to test
Date Thu, 16 Feb 2006 07:31:32 GMT
```Jian,

Wow. Well, glad you got that fixed! I'll put a note in the settings.xml
file.

Thanks for letting us know,

Randy

On Thu, 2006-02-16 at 14:04 +0800, Jian Liao wrote:
> Sorry for the delay.
> After a painful debug, I found the reason.
> This issue is caused by
>
> 1. I did not place my setting.xml in %user.home%/.m2/ or %user.home%/.ant/,
> I used the default setting.xml which is in the Maven2/conf/.
>
> 2. My repository is not in the default place(%user.home%/.m2/repository), I
> defined it in my setting.xml.
>
> The Dependencies Task will try to location my setting.xml from
> %user.home%/.m2/ and %user.home%/.ant/, if it can't find it, it will just
> use %user.home%/.m2/repository as the repository path. I don't know why it
> do not try location my setting.xml from %MAVEN2_HOME%/conf/.
>
> 165 - 211.
>
> The workaround is to place a copy of my setting.xml to %user.home%/.m2/
> folder.
>
> Now all the m2 build run successfully on my env.
>
> thanks,
> - Jian Liao
>
> On 2/16/06, Randy Watler <watler@wispertel.net> wrote:
> >
> > Jian,
> >
> > Is this the first time you have run the 'tomcat' profile, or is this new
> > behavior that has suddenly appeared?
>
>
> No, this is not my first time to encounter this. All the other m2 target run
> successfully except this one.
>
> It looks like the maven and ant tasks versions might be out of date. We
> > need to see what version of the maven ant tasks you actually got out of
> > the repository.
> >
> Randy
> >
> > On Wed, 2006-02-15 at 14:38 +0800, Jian Liao wrote:
> > > Hi randy,
> > > When I run mvn -P tomcat, I got this:
> > >
> > > [ERROR] BUILD ERROR
> > > [INFO]
> > >
> > -------------------------------------------------------------------------
> > > ---
> > > [INFO] Error executing ant tasks
> > >
> > > Embedded error: The following error occurred while executing this line:
> > > D:\eclipse\workspace\jetspeed-2-m2\app-servers\build.xml:80:
> > > java.lang.ClassCast
> > > Exception
> > > [INFO]
> > >
> > -------------------------------------------------------------------------
> > > ---
> > > [INFO] Trace
> > > org.apache.maven.lifecycle.LifecycleExecutionException: Error executing
> > ant
> > > s
> > >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> > > (Defa
> > > ultLifecycleExecutor.java:556)
> > >         at
> > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
> > > fecycle(DefaultLifecycleExecutor.java:472)
> > >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
> > > (Defau
> > > ltLifecycleExecutor.java:451)
> > >         at
> > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> > > dleFailures(DefaultLifecycleExecutor.java:303)
> > >         at
> > > ts(DefaultLifecycleExecutor.java:270)
> > >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
> > > (DefaultLi
> > > fecycleExecutor.java:139)
> > >         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
> > :322)
> > >         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> > >         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke
> > > (NativeMethodAccessorImpl.
> > > java:39)
> > >         at sun.reflect.DelegatingMethodAccessorImpl.invoke
> > > (DelegatingMethodAcces
> > > sorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:324)
> > >         at org.codehaus.classworlds.Launcher.launchEnhanced(
> > Launcher.java
> > > :315)
> > >         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> > >         at org.codehaus.classworlds.Launcher.mainWithExitCode (
> > Launcher.java
> > > :430)
> > >
> > >         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > > Caused by: org.apache.maven.plugin.MojoExecutionException: Error
> > executing
> > > ant t
> > > (AbstractA
> > > ntMojo.java:114)
> > >         at org.apache.maven.plugin.antrun.AntRunMojo.execute(
> > AntRunMojo.java
> > > :83)
> > >
> > >         at org.apache.maven.plugin.DefaultPluginManager.executeMojo
> > > (DefaultPlugi
> > > nManager.java:415)
> > >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> > > (Defa
> > > ultLifecycleExecutor.java:531)
> > >         ... 16 more
> > > Caused by: The following error occurred while executing this line:
> > > D:\eclipse\workspace\jetspeed-2-m2\app-servers\build.xml:80:
> > > java.lang.ClassCast
> > > Exception
> > >         at
> > > (Projec
> > > tHelper.java:539)
> > >         at org.apache.tools.ant.taskdefs.Ant.execute (Ant.java:384)
> > >         at org.apache.tools.ant.UnknownElement.execute(
> > UnknownElement.java
> > > :275)
> > >         at org.apache.tools.ant.Target.execute (Target.java:341)
> > > (AbstractA
> > > ntMojo.java:108)
> > >         ... 19 more
> > > Caused by: D:\eclipse\workspace\jetspeed-2-m2\app-servers\build.xml:80:
> > > java.lan
> > > g.ClassCastException
> > >         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)
> > >         at
> > org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets
> > > (Single
> > > CheckExecutor.java:37)
> > >         at org.apache.tools.ant.Project.executeTargets(Project.java
> > :1068)
> > >         ... 23 more
> > > Caused by: java.lang.ClassCastException
> > >         at
> > org.apache.maven.usability.diagnostics.ErrorDiagnostics.diagnose
> > > (Erro
> > > rDiagnostics.java:75)
> > >         at
> > > (Abst
> > > (AbstractAr
> > >         at org.apache.tools.ant.UnknownElement.execute (
> > UnknownElement.java
> > > :275)
> > >         ... 29 more
> > > [INFO]
> > >
> > -------------------------------------------------------------------------
> > > ---
> > > [INFO] Total time: 2 minutes 15 seconds
> > > [INFO] Finished at: Wed Feb 15 14:34:53 GMT+08:00 2006
> > > [INFO] Final Memory: 13M/27M
> > > [INFO]
> > >
> > -------------------------------------------------------------------------
> > > ---
> > >
> > > My env:
> > > WinXP SP2
> > > JDK1.4.2_10
> > > Oracle 10g
> > > Maven 2.0.2
> > >
> > > thanks,
> > > - Jian Liao
> > >
> > > On 2/14/06, Randy Watler < watler@wispertel.net> wrote:
> > > >
> > > > Jian,
> > > >
> > > > I'll take a look at this... but i know you are right. I probably just
> > > > missed this somehow along the way while trying to copy versions into
> > the
> > > > appropriate target directory, (and it did not matter for mysql)...
> > :-).
> > > >
> > > > Thanks,
> > > >
> > > > Randy
> > > >
> > > > On Mon, 2006-02-13 at 18:50 +0800, Jian Liao wrote:
> > > > > Hi randy,
> > > > > Sorry, please ignore my previous patch. Please review this one.
> > > > > populate-userinfo-for-default-psml.sql in the etc\target\sql\
> > > > > \${database}\ should be executed. The one in the etc\target\sql\
> > should
> > > > > be ignored.
> > > > >
> > > > > My env:
> > > > > WinXP SP2
> > > > > JDK1.4.2_10
> > > > > Oracle 10g
> > > > > Maven 2.0.2
> > > > >
> > > > > regards,
> > > > > - Jian Liao
> > > > >
> > > > > On 2/13/06, Jian Liao <jian.liao@gmail.com> wrote:
> > > > >         A small issue, the general sql should be copy from specific
> > db
> > > > >         folder. See the attachment.
> > > > >
> > > > >         My test env:
> > > > >         WinXP SP2
> > > > >         JDK1.4.2_10
> > > > >
> > > > >         - Jian Liao
> > > > >
> > > > >
> > > > >         On 2/12/06, Jian Liao <jian.liao@gmail.com> wrote:
> > > > >                 Hi randy,
> > > > >                 Great work! I've been waiting for building j2 with
> > > > >                 maven-2 for days, thanks for your hard work.
> > > > >                 I'll start to test it tomorrow(Mon.).
> > > > >
> > > > >                 Cheers,
> > > > >
> > > > >                 - Jian Liao
> > > > >
> > > > >
> > > > >                 On 2/12/06, Randy Watler <watler@wispertel.net>
> > wrote:
> > > > >                         J2 Dev Team,
> > > > >
> > > > >                         The maven2 build seems sufficiently
> > functional
> > > > >                         to have you all test it
> > > > >                         if you find the time. At the moment, it is
> > > > >                         very minimal; it can
> > > > >                         essentially do the following:
> > > > >
> > > > >                         - Build Jetspeed2 components and
> > > > >                         applications,
> > > > >                         - populate the test database and run unit
> > > > >                         tests, and
> > > > >                         - populate the production database and
> > deploy
> > > > >                         to Tomcat 5/5.5.
> > > > >
> > > > >                         I have not implemented Derby support, but
I
> > > > >                         plan to be doing that
> > > > >                         sometime in the next week. I still have to
> > > > >                         resolve how best to get Derby
> > > > >                         dependencies into the build. It should be
> > > > >                         simple, but I have not put any
> > > > >                         cycles against it to date.
> > > > >
> > > > >                         About the only problematic portions of the
> > > > >                         main build that are left to
> > > > >                         resolve are building the site/documentation
> > > > >                         and the LDAP compiled schema
> > > > >                         component. There are a few Maven2
> > bugs/issues
> > > > >                         still to be resolved. The
> > > > >                         most significant are classloader isolation
> > > > >                         problems I have encountered
> > > > >                         with our Spring based testcases... these
> > have
> > > > >                         forced me to fork the
> > > > >                         component test cases so test result output
> > to
> > > > >                         the build console is not
> > > > >                         available and the reports must be scanned
> > for
> > > > >                         failure information.
> > > > >
> > > > >                         I have tested the 1.4 and 1.5 JVMs on Linux
> > > > >                         fairly extensively. Here are
> > > > >                         the essential operations required to perform
> >
> > > > >                         the existing build
> > > > >                         functions:
> > > > >
> > > > >                         1. Acquire Maven2 2.0.2 and install as you
> > > > >                         feel fit, (both mavens can be
> > > > >                         installed on the path simultaneously).
> > > > >                         2. Create ~/.m2 and copy settings.xml.sample
> > > > >                         from the J2 root dir into
> > > > >                         it. Modify as you would build.properties
in
> > > > >                         the existing Maven1 build.
> > > > >                         3. Execute 'mvn -P test' in the J2 root dir
> > to
> > > > >                         execute a full build with
> > > > >                         tests. To skip the tests, one can run just
> > > > >                         'mvn'. Be prepared, the
> > > > >                         with a Maven2 repository.
> > > > >                         4. To install into Tomcat, execute 'mvn -P
> > > > >                         tomcat'. One can skip
> > > > >                         straight to this command since it performs
> > the
> > > > >                         base build as well.
> > > > >                         5. As with Maven1, the '-o' option can be
> > > > >                         supplied to force the build
> > > > >                         into offline mode after the repository has
> > > > >                         been built.
> > > > >
> > > > >                         Any and all feedback is welcome. The build
> > is
> > > > >                         captured entirely in the
> > > > >                         'pom.xml' and 'build.xml' files throughout
> > the
> > > > >                         source tree. I have opted
> > > > >                         to construct the build w/o any custom
> > plugins
> > > > >                         and rely on the builtin
> > > > >                         antrun Maven2 plugin to do the miscellaneous
> > > > >                         build dirty work. My plans
> > > > >                         are to construct a Maven2 archetype to
> > replace
> > > > >                         the existing Maven1
> > > > >                         genapp plugin goals. I am not sure that will
> >
> > > > >                         do everything we want, but
> > > > >                         we'll see when we get there.
> > > > >
> > > > >                         I am planning on taking a breather on this
> > > > >                         work to give you all some
> > > > >                         time to evaluate and comment what I have
> > done
> > > > >                         to date. Please respond to
> > > > >                         this thread with all feedback. Eventually,
I
> > > > >                         will push forward after
> > > > >                         addressing/accommodating all of your
> > concerns.
> > > > >
> > > > >                         Thanks!
> > > > >
> > > > >                         Randy
> > > > >
> > > > >
> > > > >
> > > > >
> > > > ---------------------------------------------------------------------
> > > > >                         To unsubscribe, e-mail:
> > > > >                         jetspeed-dev-unsubscribe@portals.apache.org
> > > > >                         For additional commands, e-mail:
> > > > >                         jetspeed-dev-help@portals.apache.org
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >                 --
> > > > >                 thanks,
> > > > >                 - Jian Liao
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >         --
> > > > >         thanks,
> > > > >         - Jian Liao
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > thanks,
> > > > > - Jian Liao
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> > > > > For additional commands, e-mail:
> > jetspeed-dev-help@portals.apache.org
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> > > > For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > thanks,
> > > - Jian Liao
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
> >
> >
>
>
> --
> thanks,
> - Jian Liao

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org