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 :

[MVN2] Copier un artéfact sur un serveur distant (et non un repo)


Sujet :

Maven Java

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    23
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 23
    Points : 12
    Points
    12
    Par défaut [MVN2] Copier un artéfact sur un serveur distant (et non un repo)
    Bonjour, je souhaiterais pouvoir copier l'artéfact générer sur un serveur à un endroit indiqué et portant une fois déployé le nom indiqué, en sachant que je ne souhaite pas avoir l'arborescence de repository que crée le plugin deploy.
    Comment faire ?

    Exemple :
    "monprojet-version.war" à deployer sur "monserveur:monport" ainsi "mon/chemin/dacces/toto.war"

    Merci pour vos réponses.

  2. #2
    Membre habitué Avatar de DanielW33
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    327
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Mai 2006
    Messages : 327
    Points : 164
    Points
    164
    Par défaut
    pourquoi pas utiliser le plugin antrun est y mettre une tache ant de transfert ftp !!!!

  3. #3
    Membre à l'essai
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    23
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 23
    Points : 12
    Points
    12
    Par défaut
    Citation Envoyé par DanielW33
    pourquoi pas utiliser le plugin antrun est y mettre une tache ant de transfert ftp !!!!
    Exact, mais comment cela fonctionne-t-il ? Suis-je obligé de disposer d'une install ant locale afin de pouvoir utiliser la tache FTP qui est une tache optionnelle d'ant ? Comment j'attache les dépendances nécessaires (commons-net, jakarta-oro) ?

    Voila ce que j'ai essayé :
    ___________________________________
    <build>
    ...
    <extensions>
    <extension>
    <groupId>ant</groupId>
    <artifactId>ant-commons-net</artifactId>
    <version>1.6.5</version>
    </extension>
    <extension>
    <groupId>ant</groupId>
    <artifactId>ant-jakarta-oro</artifactId>
    <version>1.6.1</version>
    </extension>
    </extensions>
    <plugins>
    <plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <executions>
    <execution>
    <phase>deploy</phase>
    <configuration>
    <tasks>

    <ftp server="monserver" port="2121" remotedir="/monchemin/maDestination"
    userid="user" password="mdp" passive="yes" depends="yes" binary="no">
    <fileset dir="tocopy" />
    </ftp>

    </tasks>
    </configuration>
    <goals>
    <goal>run</goal>
    </goals>
    </execution>
    </executions>
    </plugin>
    ...
    </build>
    ___________________________________________
    Voila ce qui est retourné :
    -----------------
    [ERROR] BUILD ERROR
    [INFO]
    [INFO] Error executing ant tasks

    Embedded error: Could not create task or type of type: ftp.

    Ant could not find the task or a class this task relies upon.

    This is common and has a number of causes; the usual
    solutions are to read the manual pages then download and
    install needed JAR files, or fix the build file:
    - You have misspelt 'ftp'.
    Fix: check your spelling.
    - The task needs an external JAR file to execute
    and this is not found at the right place in the classpath.
    Fix: check the documentation for dependencies.
    Fix: declare the task.
    - The task is an Ant optional task and the JAR file and/or libraries
    implementing the functionality were not found at the time you
    yourself built your installation of Ant from the Ant sources.
    Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
    task and make sure it contains more than merely a META-INF/MANIFEST.MF.
    If all it contains is the manifest, then rebuild Ant with the needed
    libraries present in ${ant.home}/lib/optional/ , or alternatively,
    download a pre-built release version from apache.org
    - The build file was written for a later version of Ant
    Fix: upgrade to at least the latest release version of Ant
    - The task is not an Ant core or optional task
    and needs to be declared using <taskdef>.
    - You are attempting to use a task defined using
    <presetdef> or <macrodef> but have spelt wrong or not
    defined it at the point of use

    Remember that for JAR files to be visible to Ant tasks implemented
    in ANT_HOME/lib, the files must be in the same directory or on the
    classpath

    Please neither file bug reports on this problem, nor email the
    Ant mailing lists, until all of these causes have been explored,
    as this is not an Ant bug.

  4. #4
    Membre à l'essai
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    23
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 23
    Points : 12
    Points
    12
    Par défaut
    Autant pour moi je n'avais point fais attention à la config d'antrun pour l'utilisation des optional tasks(http://maven.apache.org/plugins/mave...lasspaths.html).

    Merci bcp.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Débutant] Copier un fichier sur un serveur distant (SMB/CIFS)
    Par jacko842 dans le forum VB.NET
    Réponses: 1
    Dernier message: 16/01/2012, 16h20
  2. Réponses: 6
    Dernier message: 07/10/2011, 17h19
  3. copier un fichier d'un serveur distant sur son pc
    Par lefty01500 dans le forum VBScript
    Réponses: 0
    Dernier message: 18/02/2010, 12h35
  4. Copier un fichier sur un serveur distant par ftp
    Par islyoung2 dans le forum Shell et commandes GNU
    Réponses: 2
    Dernier message: 19/08/2009, 10h13
  5. sauvegarde sur un serveur distant
    Par nic_moq dans le forum MS SQL Server
    Réponses: 3
    Dernier message: 04/06/2004, 16h27

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