==== ref ====
* http://fr.wikibooks.org/wiki/D%C3%A9velopper_en_Java/Introduction_%C3%A0_Apache_Maven
* http://dcabasson.developpez.com/articles/java/maven/introduction-maven2/
* http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
* http://www.tutorialspoint.com/servlets/servlets-first-example.htm
TP http://dcabasson.developpez.com/articles/java/maven/introduction-maven2/
==== create ====
9. Création d'un nouveau projet avec le plug-in archetype
[disi@cas4 ~]$ mvn archetype:create -DgroupId=com.javaworld.hotels -DartifactId=HotelDatabase -Dpackagename=com.javaworld.hotels
[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom (5 KB at 8.9 KB/sec)
...
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/2.2/maven-archetype-plugin-2.2.jar (86 KB at 843.0 KB/sec)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-archetype-plugin:2.2:create (default-cli) @ standalone-pom ---
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-catalog/2.2/archetype-catalog-2.2.pom
...
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar (5394 KB at 5749.5 KB/sec)
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead
[INFO] Defaulting package to group ID: com.javaworld.hotels
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/maven-metadata.xml (531 B at 14.8 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/1.1/maven-archetype-quickstart-1.1.jar
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/1.1/maven-archetype-quickstart-1.1.jar (7 KB at 137.7 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/1.1/maven-archetype-quickstart-1.1.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/1.1/maven-archetype-quickstart-1.1.pom (2 KB at 59.5 KB/sec)
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-quickstart:RELEASE
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.javaworld.hotels
[INFO] Parameter: packageName, Value: com.javaworld.hotels
[INFO] Parameter: package, Value: com.javaworld.hotels
[INFO] Parameter: artifactId, Value: HotelDatabase
[INFO] Parameter: basedir, Value: /home/disi
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: /home/disi/HotelDatabase
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.536s
[INFO] Finished at: Tue Dec 16 17:15:08 CET 2014
[INFO] Final Memory: 11M/27M
[INFO] ------------------------------------------------------------------------
==== reprise sous debian generate ====
apres execution de ce create sous centos, une reprise de l'arborescence sous debian donne ceci au "create"
$ mvn -e archetype:create -DgroupId=com.javaworld.hotels -DartifactId=HotelDatabase -Dpackagename=com.javaworld.hotels
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Hotel Database tutorial application
[INFO] Hotel webapp tutorial application
[INFO] Unnamed - com.javaworld.hotels:Hotel:pom:1.0-SNAPSHOT
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - com.javaworld.hotels:Hotel:pom:1.0-SNAPSHOT
[INFO] task-segment: [archetype:create] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to configure plugin parameters for: org.apache.maven.plugins:maven-archetype-plugin:2.4
...
Cause: Cannot assign configuration entry 'pomRemoteRepositories' to 'interface java.util.List' from 'null', which is of type class java.lang.String
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: org.apache.maven.plugins:maven-archetype-plugin. Reason: Unable to parse the created DOM for plugin configuration
solution : faire un generate plutot qu'un create qui est devenu deprecated en maven 3
http://stackoverflow.com/questions/29147329/unable-to-create-a-new-maven-hello-world-project
esuite si pb de ce type
$ mvn -e archetype:generate -DgroupId=com.javaworld.hotels -DartifactId=HotelDatabase -Dpackagename=com.javaworld.hotels
....
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] : org.apache.maven.archetype.old.ArchetypeTemplateProcessingException: Directory HotelDatabase already exists - please run from a clean directory
Directory HotelDatabase already exists - please run from a clean directory
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Directory HotelDatabase already exists - please run from a clean directory
c'est qu'on est pas dans le bon niveau d'arborescence
il faut remonter d'un cran
$ cd ..
$ ls
application application.tgz
$ mvn archetype:generate -DgroupId=com.javaworld.hotels -DartifactId=HotelDatabase -Dpackagename=com.javaworld.hotels
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
...
[INFO] project created from Old (1.x) Archetype in dir: /home/xib/HotelDatabase
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
==== clean ====
$ mvn clean
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Hotel Database tutorial application
[INFO] Hotel webapp tutorial application
[INFO] Unnamed - com.javaworld.hotels:Hotel:pom:1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Building Hotel Database tutorial application
[INFO] task-segment: [clean]
[INFO] ------------------------------------------------------------------------
Downloading: https://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
3K downloaded (maven-clean-plugin-2.5.pom)
Vous avez maintenant une structure de projet Maven 2 toute neuve. Allez dans le répertoire HotelDatabase pour continuer ce tutoriel.
[disi@cas4 ~]$ ls
HotelDatabase
[disi@cas4 ~]$ cd HotelDatabase/
[disi@cas4 HotelDatabase]$ ls
pom.xml src
recopie des sources
[disi@cas4 HotelDatabase]$ cp /tmp/application/HotelDatabase/src/main/java/com/javaworld/hotels/model/HotelModel.java src/main/java/com/javaworld/hotels/
[disi@cas4 HotelDatabase]$ cp -a /tmp/application/HotelDatabase/src/main/java/com/javaworld/hotels/businessobjects src/main/java/com/javaworld/hotels/
[disi@cas4 HotelDatabase]$ cp -a /tmp/application/HotelDatabase/src/main/java/com/javaworld/hotels/dao src/main/java/com/javaworld/hotels/
[disi@cas4 HotelDatabase]$ cp -a /tmp/application/HotelDatabase/src/main/java/com/javaworld/hotels/model src/main/java/com/javaworld/hotels/
[disi@cas4 src]$ rm -rf test
[disi@cas4 src]$ cp -a /tmp/application/HotelDatabase/src/test .
[disi@cas4 src]$ ls
main test
[disi@cas4 src]$ ls -l test/java/com/javaworld/hotels/
total 0
drwxr-xr-x 2 disi disi 32 9 févr. 2006 model
[disi@cas4 src]$ ls -l test/java/com/javaworld/hotels/model/
total 4
-rw-r--r-- 1 disi disi 1605 9 févr. 2006 HotelModelTest.java
[disi@cas4 HotelDatabase]$ cp /tmp/application/HotelDatabase/pom.xml .
test unitaires
[disi@cas4 HotelDatabase]$ mvn test
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.javaworld.hotels:HotelDatabase:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 22, column 17
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Hotel Database tutorial application 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ HotelDatabase ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/disi/HotelDatabase/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ HotelDatabase ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ HotelDatabase ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ HotelDatabase ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /home/disi/HotelDatabase/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ HotelDatabase ---
[INFO] Surefire report directory: /home/disi/HotelDatabase/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.javaworld.hotels.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.023 sec
Running com.javaworld.hotels.model.HotelModelTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Results :
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.012s
[INFO] Finished at: Tue Dec 16 17:53:55 CET 2014
[INFO] Final Memory: 8M/21M
[INFO] ------------------------------------------------------------------------
or
[disi@cas4 HotelDatabase]$ mvn test -Dtest=HotelModelTest
...
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.javaworld.hotels.model.HotelModelTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 sec
Results :
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.345s
...
install
[disi@cas4 HotelDatabase]$ mvn install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.javaworld.hotels:HotelDatabase:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 22, column 17
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Hotel Database tutorial application 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ HotelDatabase ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/disi/HotelDatabase/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ HotelDatabase ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ HotelDatabase ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ HotelDatabase ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ HotelDatabase ---
[INFO] Surefire report directory: /home/disi/HotelDatabase/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.javaworld.hotels.model.HotelModelTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.025 sec
Results :
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ HotelDatabase ---
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ HotelDatabase ---
[INFO] Installing /home/disi/HotelDatabase/target/HotelDatabase.jar to /home/disi/.m2/repository/com/javaworld/hotels/HotelDatabase/1.0-SNAPSHOT/HotelDatabase-1.0-SNAPSHOT.jar
[INFO] Installing /home/disi/HotelDatabase/pom.xml to /home/disi/.m2/repository/com/javaworld/hotels/HotelDatabase/1.0-SNAPSHOT/HotelDatabase-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.624s
[INFO] Finished at: Sat Dec 20 22:31:05 CET 2014
[INFO] Final Memory: 7M/16M
[INFO] ------------------------------------------------------------------------
Creation de la WebApp sous form d'une simple page JSP qui appelra notre class jar ci-dessus
[disi@cas4 ~]$ mvn archetype:create -DgroupId=com.javaworld.hotels -DartifactId=HotelWebapp -Dpackagename=com.javaworld.hotels -DarchetypeArtifactId=maven-archetype-webapp
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-archetype-plugin:2.2:create (default-cli) @ standalone-pom ---
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead
[INFO] Defaulting package to group ID: com.javaworld.hotels
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-webapp:RELEASE
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.javaworld.hotels
[INFO] Parameter: packageName, Value: com.javaworld.hotels
[INFO] Parameter: package, Value: com.javaworld.hotels
[INFO] Parameter: artifactId, Value: HotelWebapp
[INFO] Parameter: basedir, Value: /home/disi
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: /home/disi/HotelWebapp
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.723s
[INFO] Finished at: Sat Dec 20 22:37:44 CET 2014
[INFO] Final Memory: 9M/21M
[INFO] ------------------------------------------------------------------------
[disi@cas4 ~]$ cd HotelWebapp/
[disi@cas4 HotelWebapp]$
[disi@cas4 HotelWebapp]$ ls
pom.xml src
recopie du jsp depuis les sources (à la place du default "hello world" )
[disi@cas4 HotelWebapp]$ cp /tmp/application/HotelWebapp/src/main/webapp/index.jsp src/main/webapp/index.jsp
ajout de la dependance dans ce projet WebApp sur le jar de l'etape precedente
[disi@cas4 HotelWebapp]$ diff -ur pom.xml pom.xml.orig
--- pom.xml 2014-12-20 22:43:53.000000000 +0100
+++ pom.xml.orig 2014-12-20 22:45:34.657721908 +0100
@@ -14,11 +14,6 @@
3.8.1
test
-
- com.javaworld.hotels
- HotelDatabase
- 1.0-SNAPSHOT
-
HotelWebapp
install
[disi@cas4 HotelWebapp]$ mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building HotelWebapp Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.1.1/maven-war-plugin-2.1.1.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.1.1/maven-war-plugin-2.1.1.pom (7 KB at 26.3 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.1.1/maven-war-plugin-2.1.1.jar
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.1.1/maven-war-plugin-2.1.1.jar (76 KB at 382.0 KB/sec)
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ HotelWebapp ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ HotelWebapp ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ HotelWebapp ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/disi/HotelWebapp/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ HotelWebapp ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ HotelWebapp ---
[INFO] No tests to run.
[INFO] Surefire report directory: /home/disi/HotelWebapp/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ HotelWebapp ---
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/2.4.1/maven-archiver-2.4.1.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/2.4.1/maven-archiver-2.4.1.pom (4 KB at 75.7 KB/sec)
...
Downloaded: http://repo.maven.apache.org/maven2/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar (422 KB at 1094.3 KB/sec)
[INFO] Packaging webapp
[INFO] Assembling webapp [HotelWebapp] in [/home/disi/HotelWebapp/target/HotelWebapp]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/disi/HotelWebapp/src/main/webapp]
[INFO] Webapp assembled in [81 msecs]
[INFO] Building war: /home/disi/HotelWebapp/target/HotelWebapp.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ HotelWebapp ---
[INFO] Installing /home/disi/HotelWebapp/target/HotelWebapp.war to /home/disi/.m2/repository/com/javaworld/hotels/HotelWebapp/1.0-SNAPSHOT/HotelWebapp-1.0-SNAPSHOT.war
[INFO] Installing /home/disi/HotelWebapp/pom.xml to /home/disi/.m2/repository/com/javaworld/hotels/HotelWebapp/1.0-SNAPSHOT/HotelWebapp-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.688s
[INFO] Finished at: Sat Dec 20 22:44:02 CET 2014
[INFO] Final Memory: 8M/20M
[INFO] ------------------------------------------------------------------------
contenu du war
[disi@cas4 HotelWebapp]$ jar tvf ./target/HotelWebapp.war
0 Sat Dec 20 22:44:04 CET 2014 META-INF/
123 Sat Dec 20 22:44:02 CET 2014 META-INF/MANIFEST.MF
0 Sat Dec 20 22:44:02 CET 2014 WEB-INF/
0 Sat Dec 20 22:44:02 CET 2014 WEB-INF/classes/
0 Sat Dec 20 22:44:02 CET 2014 WEB-INF/lib/
215 Sat Dec 20 22:37:44 CET 2014 WEB-INF/web.xml
4153 Tue Dec 16 18:04:22 CET 2014 WEB-INF/lib/HotelDatabase-1.0-SNAPSHOT.jar
1571 Sat Dec 20 22:41:22 CET 2014 index.jsp
0 Sat Dec 20 22:44:04 CET 2014 META-INF/maven/
0 Sat Dec 20 22:44:04 CET 2014 META-INF/maven/com.javaworld.hotels/
0 Sat Dec 20 22:44:04 CET 2014 META-INF/maven/com.javaworld.hotels/HotelWebapp/
892 Sat Dec 20 22:43:54 CET 2014 META-INF/maven/com.javaworld.hotels/HotelWebapp/pom.xml
123 Sat Dec 20 22:44:02 CET 2014 META-INF/maven/com.javaworld.hotels/HotelWebapp/pom.properties
deployement dynamique du war dans tomcat
[root@cas4 ~]# ls -l /var/lib/tomcat/webapps/
total 0
drwxr-xr-x 5 root tomcat 82 10 déc. 16:25 host-manager
drwxr-xr-x 5 root tomcat 97 10 déc. 16:25 manager
[root@cas4 ~]# cp /home/disi/HotelWebapp/target/HotelWebapp.war /var/lib/tomcat/webapps/
[root@cas4 ~]# ls -l /var/lib/tomcat/webapps/
total 8
drwxr-xr-x 5 root tomcat 82 10 déc. 16:25 host-manager
drwxr-xr-x 4 tomcat tomcat 51 20 déc. 23:06 HotelWebapp
-rw-r--r-- 1 root root 5843 20 déc. 23:05 HotelWebapp.war
drwxr-xr-x 5 root tomcat 97 10 déc. 16:25 manager
log tomcat au meme moment
[root@cas4 ~]# tail -f /var/log/tomcat/catalina.out
déc. 20, 2014 11:06:01 PM org.apache.catalina.startup.HostConfig deployWAR
INFOS: Déploiement de l'archive /var/lib/tomcat/webapps/HotelWebapp.war de l'application web
http://cas4.itsudparis.eu:8080/HotelWebapp/
Application Tutoriel pour la base de données des hotels
Choisissez une destination
Merci de choisir une ville :  Chercher
Hôtels disponibles à Londres
Nom Adresse Ville Catégorie
Hotel Hilton Trafalgar Square Londres 4 étoiles
Hotel Ibis The City Londres 3 étoiles