웹 응용 프로그램 (실제로는 gwt 응용 프로그램)이 있고 셀레늄 테스트 용으로 Jetty 서버에 배포하려는 경우 maven, jetty-plugin, gwt-maven-plugin을 사용했습니다. 셀레늄 - 받는다는 - 플러그인, 내가 마지막으로 실행 부두 및 셀레늄의 단절을 가지고 있지만, 셀레늄 테스트 때문에 유명한 404 eror의 실패 :부두에 웹 응용 프로그램을 배포하는 방법
com.thoughtworks.selenium.SeleniumException: XHR ERROR: URL = http://127.0.0.1:8080/index.html Response_Code = 404 Error_Message = Not Found
메신저 확실하지 않은 내 부두 구성에 새의 메신저 종류의 이후 올 경우 내가 MVN 클린 설치 달렸다
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<configuration>
<contextPath>/sample-console</contextPath>
<webAppSourceDirectory>${basedir}/target/${project.artifactId}-${project.version}</webAppSourceDirectory>
<webXml>${basedir}/target/${project.artifactId}-${project.version}/WEB-INF/web.xml</webXml>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integraion-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
, 난 C의 출력을 볼 수 있습니다 여기 (받는다는 - 부두 - 플러그인)을하다 ommand 창
[INFO] Configuring Jetty for project: DYI sample Console
[INFO] Webapp source directory = /Users/dyi/Documents/workspace/sample/console/target/sample-console-0.1-SNAPSHOT
[INFO] Reload Mechanic: automatic
[INFO] Classes = /Users/dyi/Documents/workspace/sample/console/target/classes
log4j:WARN No appenders could be found for logger (org.mortbay.log).
log4j:WARN Please initialize the log4j system properly.
[INFO] Context path = /sample-console
[INFO] Tmp directory = determined at runtime
[INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml
[INFO] Web overrides = none
[INFO] web.xml file = /Users/dyi/Documents/workspace/sample/console/target/sample-console-0.1-SNAPSHOT/WEB-INF/web.xml
[INFO] Webapp directory = /Users/dyi/Documents/workspace/sample/console/target/sample-console-0.1-SNAPSHOT
[INFO] Starting jetty 6.1.22 ...
[INFO] Started Jetty Server
[INFO] [selenium:start-server {execution: start}]
내 폴더 구조는 다음과 같습니다
--sample/
-- console/
-- src/
-- target/
-- classes/
-- sample-console-0.1-SNAPSHOT/
-- css/
-- images/
-- img/
-- index.html
-- js/
-- META-INF/
-- security/
-- test.html
-- WEB-INF/
-- classes/
-- lib/
-- web.xml
나는 내가 index.html 페이지를 볼 수 있습니다 이해하지 않는 일이 바로 거기에 폴더 '메가 샘플에 console-0.1-SNAPSHOT ', 왜 찾을 수 없습니까? 'contextPath'를 잘못 설정했기 때문입니까? 나는 그것을 '/'로 설정하려고 시도했다. 그런 다음 503 서비스를 사용할 수 없다는 오류가 발생했다. 누구든지 도울 수 있니? 많은 감사합니다 !!