Hi,
On Feb 17, 2009, at 9:50 PM, Bjorn Danielsson wrote:
I am new to both Magnolia and Maven, so maybe I am just confused,
but I had serious problems compiling Magnolia from source (trunk).
First I checked out the "build"
You don't need that, especially if you're new to both Magnolia and
Maven.
and "community" roots in subversion,
You probably just really wanted community/magnolia/trunk, and/or a few
extra modules (community/modules/xyz/trunk)
then I ran checkout.sh,
That works, if you need and want to check out each and every module,
which is probably not what you want right now.
and then I installed Maven and tried to
build everything and anything, but it didn't work due to missing
files at "repo1.maven.org" so I managed to figure out that I needed
a ~/.m2/settings.xml to override the default settings by defining a
maven mirror pointing at "repo.magnolia.info".
That is really not going to help, quite the contrary.
Some dependencies are not allowed to be copied to the central maven
repository for licensing reasons. You have to get and install them
manually. Usually, maven will tell you where to get them, and give a
command which you can simply copy and paste in your shell to install
it in your local repository.
Sadly, both the maven documentation and the error messages are
abysmally inadequate, so it wasn't at all clear what to write in
that settings file. I finally did manage, by trial-and-horror,
to compile and run the module I was interested in, but I am not
at all happy with the process that got me there since it didn't
produce a deterministic recipe.
Well - see above. Get to know Maven basics first. If you don't try
things at random, the error messages, if you read them carefully, are
actually kinda helpful. And reading the "getting started"
documentation, understanding the basic concepts, should also help.
Now -- there is admittedly a problem with our build at the moment; I
won't go into too much details, but our parent poms aren't properly
synched to the central maven repository, so this is probably where the
build started failing. A ~/.m2/settings.xml file like this should
suffice:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd
">
<profiles>
<profile>
<id>my-default-profile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>magnolia</id>
<url>http://repo.magnolia-cms.com/m2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</profile>
</profiles>
</settings>
You shouldn't even need this if you try to build the main Magnolia
project, but you most likely will for the modules. Note that once
you've built one module, you shouldn't even need this anymore.
My questions are: Am I the only one who has Maven problems?
How do all of you experienced people handle Maven repos when
compiling Magnolia? Do you use a custom ~/.m2/settings.xml?
If so, exactly what does it contain that remediates the problem?
I am not going to say our current build is perfect, nor that Maven is.
Far from there; see above. Now that you have a little more grasp on
things, if it all works, I'm sure it'd be helpful for others if you
shared your experience on the wiki; specifically, there are pages
which are probably outdated, give wrong indications, or miss some
details.
Also, if you don't like working by "trial-and-horror" (I don't), why
not report the problem clearly directly ? I'm sure that by reporting
the error you got on this list, you'd have had better results (and
probably less random ones at that) ...
Cheers -- and please let me know if it all works now.
-g
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------