Bonjour,
Je viens juste de commencer avec Maven.
En fait je veux créer un projet maven qui permet de générer un War, le déployer dans son serveur tomcat6 et lancer les tests selenium.
je veux commencer par la génération de war et le déployer dans tomcat6.
Aprés beaucoup de recherche, jai adpaté ce bout de code.
Il ne m'indique pas des erreurs mais il ne donne rien en résultat.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>deploy_war</groupId> <artifactId>DeplyWarTomcat</artifactId> <version>1.0-SNAPSHOT</version> <packaging>war</packaging> <name>DeplyWarTomcat</name> <url>http://maven.apache.org</url> <!-- properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties--> <properties> <catalina.home>/home/user/tomcat-6/apache-tomcat-6.0.29</catalina.home> </properties> <!--dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.5</version> <scope>test</scope> </dependency> </dependencies--> <!-- Configuration for the Maven build --> <build> <!-- The plugins tag as mandated by maven --> <plugins> <!-- Start's the plugin tag for Cargo! --> <plugin> <!-- Cargo Group Id --> <groupId>org.codehaus.cargo</groupId> <!-- Cargo's Artifact Id --> <artifactId>cargo-maven2-plugin</artifactId> <!-- This the most important part of the setup --> <configuration> <wait>true</wait> <container> <containerId>tomcat6x</containerId> <type>installed</type> <!-- The home folder for your local Tomcat --> <home>${catalina.home}</home> </container> <configuration> <type>existing</type> <home>${catalina.home}</home> </configuration> <deployer> <!-- You have to again specify that the type for the deployer --> <type>installed</type> <deployables> <deployable> <groupId>com.dpillay.oworld</groupId> <artifactId>oworld-webapp</artifactId> <type>war</type> </deployable> </deployables> </deployer> </configuration> <executions> <execution> <id>verify-deploy</id> <phase>install</phase> <goals> <goal>deployer-deploy</goal> <goal>start</goal> </goals> </execution> <execution> <id>clean-undeploy</id> <phase>pre-clean</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>
J'ai des questions des débuatants
- Je ne vois pas comment lui donner le path de war à déployer
- Je n'ai pas compris cette partie:
Comment définir le goupeId et artifactId à passer en paramètres.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 <deployables> <deployable> <groupId>com.dpillay.oworld</groupId> <artifactId>oworld-webapp</artifactId> <type>war</type> </deployable> </deployables>
Pour être claire, voici ce que je veux faire en exact:
- J'ai un dossier qui contient le code source de mon projet.
- Créer un projet maven2 qui génère le war de ce projet et le déployer dans un tomcat installé.
Merci infiniment pour votre aide
Partager