欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

tapestry入门(翻译)3 导入项目到eclipse

程序员文章站 2022-05-31 09:16:38
...

原文:

http://tapestry.apache.org/loading-the-project-into-eclipse.html

 

 

首先让maven为我们创建eclipse的项目文件(.classpath and .project)

 

$ mvn eclipse:eclipse -DdownloadSources=true
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.1.1/maven-war-plugin-2.1.1.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.1.1/maven-war-plugin-2.1.1.pom (7 KB at 7.1 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.1.1/maven-war-plugin-2.1.1.jar
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.1.1/maven-war-plugin-2.1.1.jar (76 KB at 83.4 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-eclipse-plugin/maven-metadata.xml
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-eclipse-plugin/maven-metadata.xml (680 B at 1.9 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-eclipse-plugin/2.8/maven-eclipse-plugin-2.8.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-eclipse-plugin/2.8/maven-eclipse-plugin-2.8.pom (12 KB at 22.9 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/17/maven-plugins-17.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/17/maven-plugins-17.pom (13 KB at 25.6 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-eclipse-plugin/2.8/maven-eclipse-plugin-2.8.jar
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-eclipse-plugin/2.8/maven-eclipse-plugin-2.8.jar (202 KB at 237.8 KB/sec)
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building tutorial1 Tapestry 5 Application 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> maven-eclipse-plugin:2.8:eclipse (default-cli) @ tutorial1 >>>
[INFO] 
[INFO] <<< maven-eclipse-plugin:2.8:eclipse (default-cli) @ tutorial1 <<<
[INFO] 
[INFO] --- maven-eclipse-plugin:2.8:eclipse (default-cli) @ tutorial1 ---
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.pom
Downloaded: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.pom (2 KB at 2.3 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-components/1.1.6/plexus-components-1.1.6.pom
Downloaded: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-components/1.1.6/plexus-components-1.1.6.pom (2 KB at 3.7 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.2/plexus-utils-1.2.pom
Downloaded: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.2/plexus-utils-1.2.pom (767 B at 1.5 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus/1.0.5/plexus-1.0.5.pom
Downloaded: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus/1.0.5/plexus-1.0.5.pom (6 KB at 11.6 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.4.6/plexus-utils-1.4.6.pom
Downloaded: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.4.6/plexus-utils-1.4.6.pom (3 KB at 4.8 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interactivity-jline/1.0-alpha-5/plexus-interactivity-jline-1.0-alpha-5.pom
Downloaded: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interactivity-jline/1.0-alpha-5/plexus-interactivity-jline-1.0-alpha-5.pom (772 B at 1.9 KB/sec)
Downloading: http://repo1.maven.org/maven2/jline/jline/0.9.1/jline-0.9.1.pom
Downloaded: http://repo1.maven.org/maven2/jline/jline/0.9.1/jline-0.9.1.pom (145 B at 0.3 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-archiver/2.2/maven-archiver-2.2.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/maven-archiver/2.2/maven-archiver-2.2.pom (2 KB at 2.5 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-components/3/maven-shared-components-3.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-components/3/maven-shared-components-3.pom (2 KB at 4.1 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/4/maven-parent-4.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/4/maven-parent-4.pom (10 KB at 19.7 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/apache/3/apache-3.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/apache/3/apache-3.pom (0 B at 0.0 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-resources/1.0-alpha-7/plexus-resources-1.0-alpha-7.pom
Downloaded: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-resources/1.0-alpha-7/plexus-resources-1.0-alpha-7.pom (2 KB at 2.8 KB/sec)
Downloading: http://repo1.maven.org/maven2/biz/aQute/bndlib/0.0.145/bndlib-0.0.145.pom
Downloaded: http://repo1.maven.org/maven2/biz/aQute/bndlib/0.0.145/bndlib-0.0.145.pom (886 B at 1.8 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-osgi/0.2.0/maven-osgi-0.2.0.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-osgi/0.2.0/maven-osgi-0.2.0.pom (2 KB at 4.0 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-components/8/maven-shared-components-8.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-components/8/maven-shared-components-8.pom (3 KB at 5.3 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/7/maven-parent-7.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/7/maven-parent-7.pom (21 KB at 41.9 KB/sec)
Downloading: http://repo1.maven.org/maven2/biz/aQute/bndlib/0.0.203/bndlib-0.0.203.pom
Downloaded: http://repo1.maven.org/maven2/biz/aQute/bndlib/0.0.203/bndlib-0.0.203.pom (886 B at 1.9 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/eclipse/core/resources/3.3.0-v20070604/resources-3.3.0-v20070604.pom
Downloaded: http://repo1.maven.org/maven2/org/eclipse/core/resources/3.3.0-v20070604/resources-3.3.0-v20070604.pom (2 KB at 2.3 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interactivity-jline/1.0-alpha-5/plexus-interactivity-jline-1.0-alpha-5.jar
Downloading: http://repo1.maven.org/maven2/jline/jline/0.9.1/jline-0.9.1.jar
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-archiver/2.2/maven-archiver-2.2.jar
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-resources/1.0-alpha-7/plexus-resources-1.0-alpha-7.jar
Downloaded: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar (139 KB at 94.5 KB/sec)
Downloading: http://repo1.maven.org/maven2/biz/aQute/bndlib/0.0.145/bndlib-0.0.145.jar
Downloaded: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interactivity-jline/1.0-alpha-5/plexus-interactivity-jline-1.0-alpha-5.jar (6 KB at 3.0 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-osgi/0.2.0/maven-osgi-0.2.0.jar
Downloaded: http://repo1.maven.org/maven2/jline/jline/0.9.1/jline-0.9.1.jar (46 KB at 23.0 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/eclipse/core/resources/3.3.0-v20070604/resources-3.3.0-v20070604.jar
Downloaded: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-resources/1.0-alpha-7/plexus-resources-1.0-alpha-7.jar (23 KB at 10.3 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/maven-archiver/2.2/maven-archiver-2.2.jar (10 KB at 4.0 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-osgi/0.2.0/maven-osgi-0.2.0.jar (13 KB at 7.0 KB/sec)
Downloaded: http://repo1.maven.org/maven2/biz/aQute/bndlib/0.0.145/bndlib-0.0.145.jar (112 KB at 49.6 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/eclipse/core/resources/3.3.0-v20070604/resources-3.3.0-v20070604.jar (663 KB at 258.9 KB/sec)
[INFO] Using Eclipse Workspace: /Users/hlship/Documents/workspace
[WARNING] Workspace defines a VM that does not contain a valid jre/lib/rt.jar: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-core/5.3/tapestry-core-5.3-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-core/5.3/tapestry-core-5.3-sources.jar (2403 KB at 558.9 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/antlr/antlr/2.7.7/antlr-2.7.7-sources.jar
Downloading: http://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-sources.jar
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-json/5.3/tapestry-json-5.3-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-json/5.3/tapestry-json-5.3-sources.jar (24 KB at 63.5 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-ioc/5.3/tapestry-ioc-5.3-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-ioc/5.3/tapestry-ioc-5.3-sources.jar (414 KB at 494.3 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-func/5.3/tapestry-func-5.3-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-func/5.3/tapestry-func-5.3-sources.jar (36 KB at 246.0 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry5-annotations/5.3/tapestry5-annotations-5.3-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry5-annotations/5.3/tapestry5-annotations-5.3-sources.jar (20 KB at 157.9 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tapestry/plastic/5.3/plastic-5.3-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/tapestry/plastic/5.3/plastic-5.3-sources.jar (720 KB at 633.5 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-javadoc/5.3/tapestry-javadoc-5.3-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-javadoc/5.3/tapestry-javadoc-5.3-sources.jar (10 KB at 33.8 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-test/5.3/tapestry-test-5.3-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-test/5.3/tapestry-test-5.3-sources.jar (454 KB at 698.4 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/bouncycastle/bcprov-jdk15/135/bcprov-jdk15-135-sources.jar
Downloading: http://repo1.maven.org/maven2/bouncycastle/bcprov-jdk15/135/bcprov-jdk15-135-sources.jar
Downloading: https://repository.apache.org/content/groups/staging/org/apache/httpcomponents/httpclient/4.0.2/httpclient-4.0.2-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/httpcomponents/httpclient/4.0.2/httpclient-4.0.2-sources.jar (382 KB at 418.3 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1-sources.jar (286 KB at 542.9 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/xalan/serializer/2.7.1/serializer-2.7.1-sources.jar
Downloading: http://repo1.maven.org/maven2/xalan/serializer/2.7.1/serializer-2.7.1-sources.jar
Downloading: https://repository.apache.org/content/groups/staging/org/apache/httpcomponents/httpmime/4.0.1/httpmime-4.0.1-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/httpcomponents/httpmime/4.0.1/httpmime-4.0.1-sources.jar (24 KB at 56.9 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/apache/james/apache-mime4j/0.6/apache-mime4j-0.6-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/james/apache-mime4j/0.6/apache-mime4j-0.6-sources.jar (314 KB at 574.1 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1-sources.jar
Downloading: http://repo1.maven.org/maven2/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1-sources.jar
Downloading: https://repository.apache.org/content/groups/staging/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1-sources.jar (22 KB at 66.0 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/eclipse/jetty/jetty-webapp/7.0.0.v20091005/jetty-webapp-7.0.0.v20091005-sources.jar
Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-webapp/7.0.0.v20091005/jetty-webapp-7.0.0.v20091005-sources.jar
Downloaded: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-webapp/7.0.0.v20091005/jetty-webapp-7.0.0.v20091005-sources.jar (40 KB at 63.9 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/eclipse/jetty/jetty-xml/7.0.0.v20091005/jetty-xml-7.0.0.v20091005-sources.jar
Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-xml/7.0.0.v20091005/jetty-xml-7.0.0.v20091005-sources.jar
Downloaded: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-xml/7.0.0.v20091005/jetty-xml-7.0.0.v20091005-sources.jar (16 KB at 44.6 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/eclipse/jetty/jetty-util/7.0.0.v20091005/jetty-util-7.0.0.v20091005-sources.jar
Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-util/7.0.0.v20091005/jetty-util-7.0.0.v20091005-sources.jar
Downloaded: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-util/7.0.0.v20091005/jetty-util-7.0.0.v20091005-sources.jar (117 KB at 228.4 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/eclipse/jetty/jetty-servlet/7.0.0.v20091005/jetty-servlet-7.0.0.v20091005-sources.jar
Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlet/7.0.0.v20091005/jetty-servlet-7.0.0.v20091005-sources.jar
Downloaded: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlet/7.0.0.v20091005/jetty-servlet-7.0.0.v20091005-sources.jar (40 KB at 110.2 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/eclipse/jetty/jetty-security/7.0.0.v20091005/jetty-security-7.0.0.v20091005-sources.jar
Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-security/7.0.0.v20091005/jetty-security-7.0.0.v20091005-sources.jar
Downloaded: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-security/7.0.0.v20091005/jetty-security-7.0.0.v20091005-sources.jar (45 KB at 128.6 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/eclipse/jetty/jetty-server/7.0.0.v20091005/jetty-server-7.0.0.v20091005-sources.jar
Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-server/7.0.0.v20091005/jetty-server-7.0.0.v20091005-sources.jar
Downloaded: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-server/7.0.0.v20091005/jetty-server-7.0.0.v20091005-sources.jar (163 KB at 296.6 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/eclipse/jetty/jetty-continuation/7.0.0.v20091005/jetty-continuation-7.0.0.v20091005-sources.jar
Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-continuation/7.0.0.v20091005/jetty-continuation-7.0.0.v20091005-sources.jar
Downloaded: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-continuation/7.0.0.v20091005/jetty-continuation-7.0.0.v20091005-sources.jar (16 KB at 42.0 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/eclipse/jetty/jetty-http/7.0.0.v20091005/jetty-http-7.0.0.v20091005-sources.jar
Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-http/7.0.0.v20091005/jetty-http-7.0.0.v20091005-sources.jar
Downloaded: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-http/7.0.0.v20091005/jetty-http-7.0.0.v20091005-sources.jar (75 KB at 215.9 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/org/eclipse/jetty/jetty-io/7.0.0.v20091005/jetty-io-7.0.0.v20091005-sources.jar
Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-io/7.0.0.v20091005/jetty-io-7.0.0.v20091005-sources.jar
Downloaded: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-io/7.0.0.v20091005/jetty-io-7.0.0.v20091005-sources.jar (48 KB at 135.9 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/jetty/org.mortbay.jetty/5.1.12/org.mortbay.jetty-5.1.12-sources.jar
Downloading: http://repo1.maven.org/maven2/jetty/org.mortbay.jetty/5.1.12/org.mortbay.jetty-5.1.12-sources.jar
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tomcat/dbcp/6.0.30/dbcp-6.0.30-sources.jar
Downloading: http://repo1.maven.org/maven2/org/apache/tomcat/dbcp/6.0.30/dbcp-6.0.30-sources.jar
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tomcat/coyote/6.0.30/coyote-6.0.30-sources.jar
Downloading: http://repo1.maven.org/maven2/org/apache/tomcat/coyote/6.0.30/coyote-6.0.30-sources.jar
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tomcat/catalina/6.0.30/catalina-6.0.30-sources.jar
Downloading: http://repo1.maven.org/maven2/org/apache/tomcat/catalina/6.0.30/catalina-6.0.30-sources.jar
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tomcat/servlet-api/6.0.30/servlet-api-6.0.30-sources.jar
Downloading: http://repo1.maven.org/maven2/org/apache/tomcat/servlet-api/6.0.30/servlet-api-6.0.30-sources.jar
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tomcat/juli/6.0.30/juli-6.0.30-sources.jar
Downloading: http://repo1.maven.org/maven2/org/apache/tomcat/juli/6.0.30/juli-6.0.30-sources.jar
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tomcat/annotations-api/6.0.30/annotations-api-6.0.30-sources.jar
Downloading: http://repo1.maven.org/maven2/org/apache/tomcat/annotations-api/6.0.30/annotations-api-6.0.30-sources.jar
Downloading: https://repository.apache.org/content/groups/staging/org/beanshell/bsh/2.0b4/bsh-2.0b4-sources.jar
Downloading: http://repo1.maven.org/maven2/org/beanshell/bsh/2.0b4/bsh-2.0b4-sources.jar
Downloading: https://repository.apache.org/content/groups/staging/com/google/inject/guice/2.0/guice-2.0-sources.jar
Downloading: http://repo1.maven.org/maven2/com/google/inject/guice/2.0/guice-2.0-sources.jar
Downloading: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-yuicompressor/5.3/tapestry-yuicompressor-5.3-sources.jar
Downloaded: https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-yuicompressor/5.3/tapestry-yuicompressor-5.3-sources.jar (7 KB at 25.8 KB/sec)
Downloading: https://repository.apache.org/content/groups/staging/rhino/js/1.6R7/js-1.6R7-sources.jar
Downloading: http://repo1.maven.org/maven2/rhino/js/1.6R7/js-1.6R7-sources.jar
[INFO] Wrote settings to /Users/hlship/Documents/workspace/tutorial1/.settings/org.eclipse.jdt.core.prefs
[INFO] Wrote Eclipse project for "tutorial1" to /Users/hlship/Documents/workspace/tutorial1.
[INFO] 
       Sources for some artifacts are not available.
       List of artifacts without a source archive:
         o antlr:antlr:2.7.7
         o bouncycastle:bcprov-jdk15:135
         o xalan:serializer:2.7.1
         o xerces:xercesImpl:2.9.1
         o jetty:org.mortbay.jetty:5.1.12
         o org.apache.tomcat:dbcp:6.0.30
         o org.apache.tomcat:coyote:6.0.30
         o org.apache.tomcat:catalina:6.0.30
         o org.apache.tomcat:servlet-api:6.0.30
         o org.apache.tomcat:juli:6.0.30
         o org.apache.tomcat:annotations-api:6.0.30
         o org.beanshell:bsh:2.0b4
         o com.google.inject:guice:2.0
         o rhino:js:1.6R7

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39.526s
[INFO] Finished at: Tue Nov 22 11:52:57 PST 2011
[INFO] Final Memory: 9M/81M
[INFO] ------------------------------------------------------------------------
~/Documents/workspace/tutorial1
 

 

在这里,maven已经创建了eclipse的.project and .classpath文件,我们可以导入项目了。此外,由于我们指定了 -DdownloadSources=true,maven也下载了库的源代码jar包(如果有的话),这意味着我们能在eclipse里看到tapestry库的各种源代码,在调试时这可是很有用的

在这里,我们已经准备好把maven创建的项目导入到eclipse里,启动eclipse,然后切换视图到Java Perspective(java透视图).

右击Package Explorer下的空白地方,然后选择“import...”。


tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  

选择 "existing projects" 这一项:

 


tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  

现在选择用Maven创建的文件夹:

 


tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  

 

当你点击finish按钮时,项目将导入到eclipse的工作空间。

 


tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  

无论如何,有一些错误。maven预期你将配置一个classpath变量,M2_REPO,指向你的本地仓库。在你的家目录(译注:xp上通常是C:\Documents and Settings\Administrator)下的某个目录存储了所有的下载的jar包和别的文件。打开eclispe->preferences->java->Build Path->Classpath Variable


tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  

点击 New 按钮, 输入 the new variable新变量 (你要调整到适应你自己的操作系统的路径):


tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  

 

现在eclipse将执行一个干净的构建,错误会消失。

 

 

eclipse中运行应用程序

 

我们的工作是启动jetty来运行应用程序,在eclipse的路径之外,这是一种很好的开发web程序的方式,因为这样我们就不必再使用maven来编译和运行应用程序了。更糟糕的是,如果使用maven打包和部署程序,那么当我们想把程序部署到生产环境中就太慢了。对于开发,我们需要一个快速敏捷的环境来适应变化,这意味着我们不能等待重新部署和重新启动服务器。

 

选择run...这一菜单,弹出启动配置对话框。


tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  

 

(译注:先安装jetty的eclipse插件,URL是http://run-jetty-run.googlecode.com/svn/trunk/updatesite)

右击jetty webapp,然后点击New按钮,再填充一些数值如下:

 


tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  


你需要点击“Show advanced Options”复选框,然后反选(译注:即取消)"SSL" 和"Enable Scanner".

tapestry会运行的很好,你需要点击"Arguments" 标签页,输入下列VM参数:
-XX:MaxPermSize=256M -Xmx600m -Dtapestry.execution-mode=development

 


tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  

 

相对一个典型的应用程序,tapestry使用更多的PermGen空间(java内存的一部分,用于加载类),并且使用更多的堆内存。
这样的设置能更好的适应大中型tapestry应用程序,保证java良好运行即使垃圾收集比较频繁,而刚才的设置VM参数确保了开发时比较好,而且异常报告也比较详细。

用这样的设置,你可以点击run然后jetty将启动(只需要几秒钟)。

一旦你点击run,jetty将启动(一两秒)(译注:如果有提示不能启动,则先点击选中左边的项目tutorial1)

 


tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  

 

打开浏览器,输入 http://localhost:8080/tutorial1/   看效果

 

上一篇:

http://xieye.iteye.com/blog/1663554

下一篇:

http://xieye.iteye.com/blog/1664101

 

  • tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  
  • 大小: 77.1 KB
  • tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  
  • 大小: 34.4 KB
  • tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  
  • 大小: 50.1 KB
  • tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  
  • 大小: 137.8 KB
  • tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  
  • 大小: 81.8 KB
  • tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  
  • 大小: 14.3 KB
  • tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  
  • 大小: 57 KB
  • tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  
  • 大小: 94.9 KB
  • tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  
  • 大小: 70.1 KB
  • tapestry入门(翻译)3 导入项目到eclipse
            
    
    博客分类: java  
  • 大小: 138.6 KB