cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren Shepherd <darren.s.sheph...@gmail.com>
Subject Re: DatabaseUpgradeChecker and running from eclipse
Date Thu, 19 Sep 2013 16:12:36 GMT
Its has to do with my maven setup in Eclipse really.  So import all the
projects then create a new Maven Build Debug Configuration with

Base Directory: ${workspace_loc:/cloudstack}
Goals: -pl :cloud-client-ui jetty:run
Check "Resolve Workspace Artifacts"

So the issue comes from "Resolve Workspace Artifacts."  If you uncheck it
that works fine.  When it is checked, m2e does some magic and fools with
the classloaders and as a result it won't find MANIFEST.MF files.  But if
you don't check that theres not a good guarantee that the code your running
is really what you expect.  It could be whatever is the latest SNAPSHOT in
~/.m2/repository.  So for development you really want to check resolve
artifacts.  Basically your relying on Eclipse to build everything for you.

It's just my guess, but I'm guessing that most people's development
interations involve running mvn to compile stuff.  I never, never run mvn
to compile.  Only to test builds before commit.  mvn is too slow.

Darren


On Thu, Sep 19, 2013 at 8:27 AM, Daan Hoogland <daan.hoogland@gmail.com>wrote:

> Darren, what is your scenario to run into this? I had some upgrade
> paths to run through but didn't encounter this.
>
> regards,
> Daan
>
> On Wed, Sep 11, 2013 at 6:58 PM, Darren Shepherd
> <darren.s.shepherd@gmail.com> wrote:
> > So I run ACS from eclipse for development, but DatabaseUpgradeChecker
> does
> > the following
> >
> > String currentVersion =
> > this.getClass().getPackage().getImplementationVersion();
> >                 if (currentVersion == null) {
> >                     currentVersion =
> > this.getClass().getSuperclass().getPackage().getImplementationVersion();
> >                 }
> >
> > Which results in currentVersion = "1.6.0_45" which is the package
> version of
> > java because the super class is java.lang.Object.  So upgrade fails.  So
> I
> > always comment out the DatabaseUpgradeChecker.  Changing the super class
> to
> > ManagerBase also works around the problem sorta (currentVersion == null,
> so
> > it just does nothing).
> >
> > What are others doing?  In general I want to get rid of any use of
> > getImplementationVersion() as it makes development annoying.
> >
> > Darren
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message