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 :

création de sar


Sujet :

Maven Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Inscrit en
    Avril 2006
    Messages
    853
    Détails du profil
    Informations forums :
    Inscription : Avril 2006
    Messages : 853
    Par défaut création de sar
    salut

    je tente de créer un sar

    mon projet nécessaire une classe disponible dans une autre projet, d'ou le parent...

    j'ai mis jboss-packaging-maven-plugin dans le repository

    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
     
    <?xml version="1.0" encoding="UTF-8"?>
    <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/maven-v4_0_0.xsd">
     
      <parent>
        <artifactId>topaz</artifactId>
        <groupId>com.mchs.topaz</groupId>
        <version>0.5</version>
      </parent>
     
    	<modelVersion>4.0.0</modelVersion>
    	<groupId>com.mchs.Mbean</groupId>
    	<artifactId>mchs.core.Mbean</artifactId>
    	<packaging>jar</packaging>
    	<name>Module mchs.core.Mbean</name>
    	<version>0.1</version>
     
    	<scm>
        <developerConnection>scm:svn:file:///D:/subversion_data/repos/Mbean/trunk</developerConnection>
      </scm
     
     
    	<build>
    		<pluginManagement>
    			<plugins>
    				<plugin>
    					<groupId>org.jboss</groupId>
    					<artifactId>jboss-packaging-maven-plugin</artifactId>
    					<version>2.0</version>
    				</plugin>
    			</plugins>
    		</pluginManagement>
     
    		<plugins>
    			<plugin>
    				<groupId>org.jboss</groupId>
    				<artifactId>jboss-packaging-maven-plugin</artifactId>
    				<extensions>true</extensions>
    			</plugin>
    		</plugins>
    	</build>
     
     
    	<dependencies>	
     
     
        <dependency>
          <groupId>com.mchs.topaz</groupId>
          <artifactId>topaz.core.Metier</artifactId>
          <version>[1.0,1.1)</version>
        </dependency>
     
    		<dependency>
    			<groupId>org.jboss</groupId>
    			<artifactId>scheduler-plugin</artifactId>
    			<version>4.0.5.GA</version>
    		</dependency>
     
    	</dependencies>
     
    </project>

    en ligne de commande
    mvn install

    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
     
    java.lang.NullPointerException
            at org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:292)
            at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:198)
            at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:163)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1252)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findArtifactTypeHandlers(DefaultLifecycleExecutor.java:1171)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findExtensions(DefaultLifecycleExecutor.java:173)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:138)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
            at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
            at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
            at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

    si je fais dans eclipse: Update source folder

    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
     
    24/01/08 18:06:43 CET: Setting source compatibility: 1.5
    24/01/08 18:06:43 CET: Setting target compatibility: 1.5
    24/01/08 18:06:43 CET: Generating sources
     Error scanning for extensions: Cannot resolve pre-scanned extension artifact: org.apache.maven.wagon:wagon-webdav: Missing:
    ----------
    1) org.apache.maven.wagon:wagon-provider-test:jar:1.0-beta-2
     
      Try downloading the file manually from the project website.
     
      Then, install it using the command: 
          mvn install:install-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-provider-test \
              -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file
     
      Path to dependency: 
      	1) pom:1.4
      	2) org.apache.maven.wagon:wagon-webdav:jar:1.0-beta-2
      	3) org.apache.maven.wagon:wagon-provider-test:jar:1.0-beta-2
     
    2) it.could:webdav:jar:0.4
     
      Try downloading the file manually from the project website.
     
      Then, install it using the command: 
          mvn install:install-file -DgroupId=it.could -DartifactId=webdav \
              -Dversion=0.4 -Dpackaging=jar -Dfile=/path/to/file
     
      Path to dependency: 
      	1) pom:1.4
      	2) org.apache.maven.wagon:wagon-webdav:jar:1.0-beta-2
      	3) it.could:webdav:jar:0.4
     
    3) org.mortbay.jetty:jetty:jar:4.2.12
     
      Try downloading the file manually from the project website.
     
      Then, install it using the command: 
          mvn install:install-file -DgroupId=org.mortbay.jetty -DartifactId=jetty \
              -Dversion=4.2.12 -Dpackaging=jar -Dfile=/path/to/file
     
      Path to dependency: 
      	1) pom:1.4
      	2) org.apache.maven.wagon:wagon-webdav:jar:1.0-beta-2
      	3) org.mortbay.jetty:jetty:jar:4.2.12
     
    ----------
    3 required artifacts are missing.
    je galère un peu et je débute avec maven


    merci

  2. #2
    Membre Expert

    Profil pro
    Inscrit en
    Mai 2006
    Messages
    1 172
    Détails du profil
    Informations personnelles :
    Âge : 50
    Localisation : France, Yvelines (Île de France)

    Informations forums :
    Inscription : Mai 2006
    Messages : 1 172
    Par défaut
    je pense que tu utilise le mauvais groupId pour le plugin, à ma conaissance, il n'y en a pas encore chez JBoss.

    Il y en a un dans le projet MOJO.

    http://mojo.codehaus.org/jboss-packaging-maven-plugin/
    http://docs.codehaus.org/display/MAV...ive)+Artifacts

  3. #3
    Membre éclairé
    Inscrit en
    Avril 2006
    Messages
    853
    Détails du profil
    Informations forums :
    Inscription : Avril 2006
    Messages : 853
    Par défaut
    Citation Envoyé par evenisse Voir le message
    je pense que tu utilise le mauvais groupId pour le plugin, à ma conaissance, il n'y en a pas encore chez JBoss.

    Il y en a un dans le projet MOJO.

    http://mojo.codehaus.org/jboss-packaging-maven-plugin/
    http://docs.codehaus.org/display/MAV...ive)+Artifacts
    je crois pas...

    ça dépent de comment tu importes ça, il me semble...

    si je vais dans maven, dans le repository

    j'ai bien: org\jboss\jboss-packaging-maven-plugin\2.0

    avec un jar, pom...

  4. #4
    Membre Expert

    Profil pro
    Inscrit en
    Mai 2006
    Messages
    1 172
    Détails du profil
    Informations personnelles :
    Âge : 50
    Localisation : France, Yvelines (Île de France)

    Informations forums :
    Inscription : Mai 2006
    Messages : 1 172
    Par défaut
    JBoss n'a pas de tel plugin, sinon il serait dans le repository officiel de maven[1] ou dans le repository interne de JBoss[2]. Le seul existant à ma connaissance est celui du projet mojo. Est-ce celui-ci que tu as mis dans un repository interne? Dans ce cas, il serait préférable d'utiliser le bon groupId ainsi que la bonne version.

    [1] http://repo1.maven.org/maven/
    [2] http://repository.jboss.org/maven2/org/jboss/

  5. #5
    Membre éclairé
    Inscrit en
    Avril 2006
    Messages
    853
    Détails du profil
    Informations forums :
    Inscription : Avril 2006
    Messages : 853
    Par défaut
    Citation Envoyé par evenisse Voir le message
    JBoss n'a pas de tel plugin, sinon il serait dans le repository officiel de maven[1] ou dans le repository interne de JBoss[2]. Le seul existant à ma connaissance est celui du projet mojo. Est-ce celui-ci que tu as mis dans un repository interne? Dans ce cas, il serait préférable d'utiliser le bon groupId ainsi que la bonne version.

    [1] http://repo1.maven.org/maven/
    [2] http://repository.jboss.org/maven2/org/jboss/
    voici ce que j'ai tenté


    que je mette

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    <plugins>
    			<plugin>
    				<groupId>org.codehaus.mojo</groupId>
    				<artifactId>jboss-packaging-maven-plugin</artifactId>
    				<extensions>true</extensions>
    			</plugin>
    </plugins>
    dans le build

    ou bien
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
    dependency>
    			<groupId>org.codehaus.mojo</groupId>
    			<artifactId>jboss-packaging-maven-plugin</artifactId>
    			<version>2.0-SNAPSHOT</version>
    			<type>plugin</type>		
    </dependency>
    dans le dependencies

    du pom, le résultat est le même...

    voici la commande lancé
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    C:\>mvn install:install-file -DgroupId=org.codehaus.mojo -DartifactId=jboss-packaging-maven-plugin -Dversion=2.0-SNAPSHOT -Dpackaging=plugin -Dfile=c:\jboss-packaging-maven-plugin-2.0-20070420.093359-5.jar
    résultat lors du mvn clean install

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
     BUILD ERROR
     ------------------------------------------------------------------------
     The plugin 'org.codehaus.mojo:jboss-packaging-maven-plugin' does not exist or no valid version could be found

  6. #6
    Membre Expert

    Profil pro
    Inscrit en
    Mai 2006
    Messages
    1 172
    Détails du profil
    Informations personnelles :
    Âge : 50
    Localisation : France, Yvelines (Île de France)

    Informations forums :
    Inscription : Mai 2006
    Messages : 1 172
    Par défaut
    Sur le site du plugin, il est indiqué que c'est un plugin snapshot donc sans release officielle. Il faut donc le prendre dans le snapshot repository: http://mojo.codehaus.org/using-sandbox-plugins.html

Discussions similaires

  1. Classe pour la création d'un graphe xy
    Par Bob dans le forum MFC
    Réponses: 24
    Dernier message: 03/12/2009, 17h20
  2. Création dynamique de TImages
    Par Dric dans le forum C++Builder
    Réponses: 10
    Dernier message: 08/07/2002, 12h36
  3. [Kylix] Création d'un fichier lien
    Par DrQ dans le forum EDI
    Réponses: 2
    Dernier message: 14/05/2002, 21h30
  4. Création image BMP
    Par Anonymous dans le forum C
    Réponses: 2
    Dernier message: 25/04/2002, 16h04

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