User development,
A new message was posted in the thread "EJB 3.0 tutorial build problem with Maven
2.2.1":
http://community.jboss.org/message/527324#527324
Author : jaikiran pai
Profile :
http://community.jboss.org/people/jaikiran
Message:
--------------------------------------------------------------
tothc wrote:
[WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with
message:
Detected Maven Version: 2.2.1 is not in the allowed range [2.0.9,2.1).
This error
states that the Maven version which you are using (2.2.1) is not allowed for the project
you are building (the tutorials). Within the tutorial pom.xml file we have set this
restriction. The tutorials have been tested using Maven 2.0.9. The only reason why we
added a upper limit to the Maven version is because we of our experience with Maven issues
with every new Maven version. It doesn't mean the the tutorial +will+ not work against
Maven 2.2.1, it just means we haven't tested it agains that version and hence
don't know if it's going to run into issues.
You'll have to downgrade to Maven 2.0.9 (atleast for now) to get that running. But i
think it makes sense to remove that restriction from the tutorials. I'll create a JIRA
for that and fix it.
tothc wrote:
I want to start with the first example, the stateless bean.
First I got FATAL errors. Googled it and turned out that I had to add this
" <repositories>
<repository>
<id>jboss-repo</id>
<
url>http://repository.jboss.org/maven2/</url>
</repository>
</repositories>"
to the pom.xml of the stateless example. Note: does this mean that I have to do this
modification to every freakin' example's pom.xml???
Maven works on the
concept of "repositories" where it searches for dependent published artifacts.
Any project like the tutorial you are building can depend on these published artifacts.
The project has to point Maven to the right repositories. This can be done in two ways:
1) Either set it in the pom.xml (hierarchy) of the project you are building
OR 2) Set in a global Maven settings.xml file (like explained here
http://community.jboss.org/wiki/MavenSettings)
You don't have set it in every pom.xml. Either set it in the Maven settings.xml file
or set it in TUTORIAL_HOME/build/pom.xml. Again, i think this should have been done in the
tutorials by default so that users don't have to change it themselves. I'll create
a JIRA for this too.
tothc wrote:
After adding this to the xml the build command seemed to work, it downloaded gazillions
of pom (?) files to somewhere (??? I couldn't find where, I could just read the
source, the webpage address it downloaded from).
That's expected from Maven. As i explained earlier, Maven downloads the
dependencies of projects from repositories. So if project A depends on project B, then
while building project A, Maven downloads project B to your local file system. Project B
internally might depend on project C, so this will lead to a long chain of transitive
dependency downloads. So the first time you build a prooject through Maven it usually
takes time to download all those dependencies. Once they are downloaded to your local file
system, they won't be downloaded the next time.
By the way, if you are running into trouble with Maven and instead are more interested in
just seeing EJB3 in action, then you can alternatively use the Ant approach of building
the tutorials (which is explained in the tutorial docs).
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/527324#527324