[EMAIL PROTECTED] pisze:
> The Cocoon 2.2 installation instructions assume changing directories
> happens during the optional "Import the block in Eclipse" section.
> This causes confusion when skipping to the "Run the block as Java web
> application". Please change the order of sections to "Install",
> "Run", then "Develop". Why would anyone start development without
> verifying the "Hello World" example runs properly?
Good suggestion. I'll adjust docs as soon as I have some spare time.
> After changing to the block directory, "mvn jetty:run" runs for a long
> time and ends with errors about missing JARs for Jetty (see below).
It runs for long time only at first usage because Maven needs to pull all
dependencies.
> ===
>> mvn --version
> Maven version: 2.0.8
> Java version: 1.4.2_15
> OS name: "windows 2003" version: "5.2" arch: "x86" Family: "windows"
>
>> mvn jetty:run
> ...
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>
> Missing:
> ----------
> 1) org.mortbay.jetty:jetty-util:jar:2.4.1
>
> Try downloading the file manually from the project website.
>
> Then, install it using the command:
> mvn install:install-file -DgroupId=org.mortbay.jetty
> -DartifactId=jetty-ut
> il -Dversion=2.4.1 -Dpackaging=jar -Dfile=/path/to/file
>
> Alternatively, if you host your own repository you can deploy the file
> there:
>
> mvn deploy:deploy-file -DgroupId=org.mortbay.jetty
> -DartifactId=jetty-util
> -Dversion=2.4.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
> -DrepositoryId
> =[id]
>
> Path to dependency:
> 1) org.mortbay.jetty:maven-jetty-plugin:maven-plugin:6.1.5
> 2) org.mortbay.jetty:jetty:jar:6.1.5
> 3) org.mortbay.jetty:jetty-util:jar:2.4.1
<snip what="other dependencies on non-existing 2.4.1 version of artifacts"/>
Damn, you are unbelievably effective on stumbling upon Maven's
bugs/limitations. ;-)
This problem is caused by infamous combo of Java 1.4.2, Maven 2.0.x and usage
of ${project.version}
in one of POMs (in this case[1]). This bug is known as MNG-2339[2] and is my
the most hated issue
with Maven.
Solutions are (all dirty, unfortunately):
1. Upgrade to Java 1.5.x OR
2. Add failing dependencies to your block's pom.xml with hardcoded versions
instead of
{project.version} expressions OR
3. Attach -Dversion=6.1.5 to the cmd you are running, e.g.:
mvn clean jetty:run -Dversion=6.1.5
The third one is the quickest work-around but the most dirty one at the same
time. The second
pollutes your pom but is reliable solution until MNG-2339 is fixed. The first
one is rather
hypothetical options because I presume that if you still stick to Java 1.4.x
you must have a good
reason for that.
Voting for this issue is probably a good idea. I'm really sorry that you are
starting with C2.2 in a
such unfortunate way...
[1] http://repo1.maven.org/maven2/org/mortbay/jetty/jetty/6.1.5/jetty-6.1.5.pom
[2] http://jira.codehaus.org/browse/MNG-2339
--
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]