IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Maven Java Discussion :

déployer un war avec maven


Sujet :

Maven Java

  1. #1
    Nouveau membre du Club
    Inscrit en
    Mai 2007
    Messages
    34
    Détails du profil
    Informations forums :
    Inscription : Mai 2007
    Messages : 34
    Points : 29
    Points
    29
    Par défaut déployer un war avec maven
    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.
    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>
    Il ne m'indique pas des erreurs mais il ne donne rien en résultat.
    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:
    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>
    Comment définir le goupeId et artifactId à passer en paramètres.

    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

  2. #2
    Nouveau membre du Club
    Inscrit en
    Mai 2007
    Messages
    34
    Détails du profil
    Informations forums :
    Inscription : Mai 2007
    Messages : 34
    Points : 29
    Points
    29
    Par défaut
    comment deployer un non maven build War avec maven2 dans un serveur tomcat installé localement.

Discussions similaires

  1. Déployer un ear avec Maven sur un GlassFish distant
    Par JacNar6 dans le forum Glassfish et Payara
    Réponses: 3
    Dernier message: 09/09/2013, 19h26
  2. Réponses: 2
    Dernier message: 19/01/2009, 13h33
  3. déployer un war avec maven sur Tomcat
    Par publicStaticVoidMain dans le forum Maven
    Réponses: 3
    Dernier message: 20/12/2008, 22h08
  4. Déployer un war avec WebSphere 6
    Par Thewil dans le forum Websphere
    Réponses: 2
    Dernier message: 14/05/2007, 09h43
  5. [Maven] créer un WAR avec une applet
    Par hugo123 dans le forum Maven
    Réponses: 2
    Dernier message: 05/07/2006, 17h37

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo