Hello,

I'm having trouble installing Cocoon 2.2 using Maven. Please see attached 
install log.

Any advice would be much appreciated, I have spent hours on this!

Thanks
Gary


GARY BROWNE | Development Programmer 
Library IT Services | University Library
THE UNIVERSITY OF SYDNEY
Level 1, Fisher Library F03 | The University of Sydney | NSW | 2006
T +61 2 9351 5946  | F +61 2 9036 0000
E [email protected]  | W http://sydney.edu.au 

Sent from my plain old desktop computer.

CRICOS 00026A
This email plus any attachments to it are confidential. Any unauthorised use is 
strictly prohibited. If you receive this email in error, please delete it and 
any attachments.
Please think of our environment and only print this e-mail if necessary.


[r...@blah anthologise]# mvn archetype:generate 
-DarchetypeCatalog=http://cocoon.apache.org
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be 
retrieved from repository: central due to an error: Error transferring file: 
Connection timed out
[INFO] Repository 'central' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not 
exist or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 minutes 21 seconds
[INFO] Finished at: Fri Oct 23 14:40:15 EST 2009
[INFO] Final Memory: 1M/3M
[INFO] ------------------------------------------



I then added settings.xml to /root/.m2 and it worked except:


Missing:
----------
1) org.apache.velocity:velocity:jar:1.5

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=org.apache.velocity 
-DartifactId=velocity -Dversion=1.5 -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.apache.velocity 
-DartifactId=velocity -Dversion=1.5 -Dpackaging=jar -Dfile=/path/to/file 
-Durl=[url] -DrepositoryId=[id]

  Path to dependency:
        1) 
org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:2.0-alpha-4
        2) org.apache.maven.archetype:archetype-common:jar:2.0-alpha-4
        3) org.apache.velocity:velocity:jar:1.5

2) dom4j:dom4j:jar:1.6.1

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=dom4j -DartifactId=dom4j 
-Dversion=1.6.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=dom4j -DartifactId=dom4j -Dversion=1.6.1 
-Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
        1) 
org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:2.0-alpha-4
        2) org.apache.maven.archetype:archetype-common:jar:2.0-alpha-4
        3) dom4j:dom4j:jar:1.6.1

3) velocity:velocity-dep:jar:1.4

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=velocity -DartifactId=velocity-dep 
-Dversion=1.4 -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there:
      mvn deploy:deploy-file -DgroupId=velocity -DartifactId=velocity-dep 
-Dversion=1.4 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] 
-DrepositoryId=[id]

  Path to dependency:
        1) 
org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:2.0-alpha-4
        2) org.apache.maven.archetype:archetype-common:jar:2.0-alpha-4
        3) org.codehaus.plexus:plexus-velocity:jar:1.1.3
        4) velocity:velocity:jar:1.4
        5) velocity:velocity-dep:jar:1.4

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

for artifact:
  org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:2.0-alpha-4

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



THIS WORKED, but then when running:

      mvn archetype:generate -DarchetypeCatalog=http://cocoon.apache.org
      
again, I get this new error:


[WARNING] Error reading archetype catalog http://cocoon.apache.org
java.lang.RuntimeException: java.lang.IllegalArgumentException: protocol = http 
host = null
        at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:919)
        at 
sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2019)
        at 
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:376)
        at 
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:115)
        at 
org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
        at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
        at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
        at 
org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.getArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:89)
        at 
org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultArchetype.java:197)
        at 
org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesByCatalog(DefaultArchetypeSelector.java:283)
        at 
org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetype(DefaultArchetypeSelector.java:74)
        at 
org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:180)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at 
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.IllegalArgumentException: protocol = http host = null
        at 
sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:146)
        at 
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:775)
        at 
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:705)
        at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:949)
        at 
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
        ... 28 more
[INFO] No archetype defined. Using maven-archetype-quickstart 
(org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
Choose a number: :


and the command line is unresponsive.


Then tried:

mvn archetype:generate

and chose 34: cocoon-22-archetype-block from the list

Then I ran:

 mvn jetty:run


 [INFO] Compilation failure
/usr/local/anthologise/anthologiser/src/main/java/au/edu/usyd/library/april-dev/MyBean.java:[17,33]
 ';' expected


SO: then I deleted the application directory and ran:

mvn archetype:generate

again, this time choosing:

        35: internal -> cocoon-22-archetype-webapp
        
[INFO] BUILD SUCCESSFUL


Then I changed to the application directory and ran:

mvn jetty:run

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Webapp source directory 
/usr/local/anthologise/anthologies/target/anthologies-1.0-SNAPSHOT does not 
exist


Then I changed the version of Jetty in pom.xml from 6.1.7 to 6.0.2 and ran:

mvn jetty:run

again. Same error:

[INFO] Webapp source directory 
/usr/local/anthologise/anthologies/target/anthologies-1.0-SNAPSHOT does not 
exist


So I created the stinkin' directory:

      mkdir anthologies-1.0-SNAPSHOT


and ran:

mvn jetty:run

again.

[INFO] web.xml does not exist at location 
/usr/local/anthologise/anthologies/target/anthologies-1.0-SNAPSHOT/WEB-INF/web.xml

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to