You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by so...@apache.org on 2008/02/03 23:38:29 UTC

Installing Cocoon-2.2 on Win2003

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?

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).

solprovider

===
>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

2) org.mortbay.jetty:servlet-api-2.5: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=servlet-
api-2.5 -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=servlet-ap
i-2.5 -Dversion=2.4.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -Dreposit
oryId=[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:servlet-api-2.5:jar:2.4.1

3) org.mortbay.jetty:jsp-api-2.0: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=jsp-api-
2.0 -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=jsp-api-2.
0 -Dversion=2.4.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryI
d=[id]

  Path to dependency:
        1) org.mortbay.jetty:maven-jetty-plugin:maven-plugin:6.1.5
        2) org.mortbay.jetty:jsp-2.0:pom:6.1.5
        3) org.mortbay.jetty:jsp-api-2.0:jar:2.4.1

----------
3 required artifacts are missing.

for artifact:
  org.mortbay.jetty:maven-jetty-plugin:maven-plugin:6.1.5

from the specified remote repositories:
  codehaus.org (http://snapshots.repository.codehaus.org),
  central (http://repo1.maven.org/maven2),
  apache.m2.incubator (http://people.apache.org/repo/m2-snapshot-repository/)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Installing Cocoon-2.2 on Win2003

Posted by so...@apache.org.
On Sun, Feb 3, 2008 at 6:26 PM, Grzegorz Kossakowski
<gk...@apache.org> wrote:
> solprovider@apache.org pisze:
> > The Cocoon 2.2 installation instructions ...
>  Good suggestion. I'll adjust docs as soon as I have some spare time.

Happy to help.

>  > 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.

I understood that, but others might not.  A note about the lengthy
install might help; at least the screen keeps changing so the admin
knows something is happening. See the italic text on:
http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html

>  > ===
>  >> 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.
>  <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. ;-)

Just lucky.

>  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.

The W2003 PC has several versions of Java installed.  I can easily
switch to Java 1.5 or 1.6, but I need Java 1.4.  Lenya 1.3 (my current
project) needs Java 1.4 and Cocoon-2.1.

My next project (an add-on to another company's product) will also
need Java 1.4 and Cocoon.  I was hoping to use Cocoon-2.2.  Assuming
Cocoon-2.2 is similar to Cocoon-2.1, I need to patch it and add
several components before creating an EAR.  Will Maven issues continue
to cause problems after Cocoon is download?

Why is "-Dversion=6.1.5" dirty?  What is lost?  What software is being
versioned to 6.1.5?

>  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...
>  Grzegorz Kossakowski

I will vote when I am home.  (I forgot my JIRA logon.)

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Installing Cocoon-2.2 on Win2003

Posted by Grzegorz Kossakowski <gk...@apache.org>.
solprovider@apache.org 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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org