diff --git a/bin/start_codeserver.sh b/bin/start_codeserver.sh index f48b6df4f452ee081220e40fb0f2b61c0c884126..25eaaca09196ec1031b79e3da6165929e4dda717 100755 --- a/bin/start_codeserver.sh +++ b/bin/start_codeserver.sh @@ -1,5 +1,6 @@ #!/bin/bash DIR=$(dirname $0) +VERSION=$(xml_grep --nb_results 1 --text_only version $POM) cd $DIR/.. mvn clean install --projects=.,www-shared if [ "$1" == "" ]; then @@ -9,5 +10,8 @@ else echo "Directory $1 does not exist!" exit 1 fi + (cd www-client/; mvn gwt:compile) + rm -fr $1/app + cp -r target/www-client-$version/app $1/ mvn gwt:codeserver -pl *-client -am -Dgwt.codeServer.launcherDir=$1 fi diff --git a/src/site/markdown/development.md b/src/site/markdown/development.md index 29141c612cec2d64ce0f6e01f9e3aaa792f2b4a6..6fcdf9efb798836c2d72e3080e253ed32e79ff01 100644 --- a/src/site/markdown/development.md +++ b/src/site/markdown/development.md @@ -69,13 +69,16 @@ Ensure JVM args contains in the server launch configuration: --add-opens=java.sql/java.sql=ALL-UNNAMED ``` -If CodeServer fails to launch in Eclipse, use the script +### If CodeServer fails to launch in Eclipse + +1. use the script ``` bin/start_codeserver.sh /path/to/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp*/wtpwebapps/agrometinfo-www-server/ ``` -Then browse <http://localhost:8080/www-server/>. +2. launch the Tomcat server in Eclipse +3. browse <http://localhost:8080/www-server/>. You can edit Java files, CodeServer will recompile on page reloading (`F5` key). @@ -97,4 +100,5 @@ To reflect on Tomcat, run `mvn package -DskipTests`. To run static analyses: `mvn checkstyle:checkstyle pmd:pmd pmd:cpd`. -To run one test class: `mvn test -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -Dtest=fr.agrometinfo.www.server.rs.IndicatorResourceTest`. \ No newline at end of file +To run one test class: `mvn test -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -Dtest=fr.agrometinfo.www.server.rs.IndicatorResourceTest`. +