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 :

plugin XDoclet Maven2


Sujet :

Maven Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé 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
    Par défaut plugin XDoclet Maven2
    j'ai toujours un pb avec mon plugin XDoclet :

    le build de mon pom.xml :
    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
     
    <build>
    <plugins>
    	<plugin>
    		<artifactId>xdoclet-maven-plugin</artifactId>
    		<groupId>org.codehaus.mojo</groupId>
    		<executions>
    			<execution>
    				<id>xdoclet-0</id>
    				<phase>generate-sources</phase>
    				<goals>
    					<goal>xdoclet</goal>
    				</goals>
    				<configuration>
                                             <sourceDirectory>
                                                   /src/java
                                            </sourceDirectory>
    					<generatedSourcesDirectory>
                                                  ../generated/java
                                            </generatedSourcesDirectory>
    					<tasks>
    					   <ejbdoclet
                                                   destdir="${project.build.outputDirectory}">
    						  <fileset dir="/src/java" includes="**/*Bean.java" />
    						<entitycmp destDir=
                                                        "${project.build.outputDirectory}" />
    						<deploymentdescriptor destDir=
                                                         "${project.build.outputDirectory}                          
                                                              /META-INF" />
    					   </ejbdoclet>
    					</tasks>
    				</configuration>
    			</execution>
    		</executions>
    	</plugin>
    </plugins>
    </build>
    le message debug lors du lancement :


    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
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    D:\eclipse-maestro\workspace\dra.proto.business>mvn -U -X xdoclet:xdoclet
    + Error stacktraces are turned on.
    Maven version: 2.0.4
    [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settings\dweltz\.m2\plugin-registry.xml'
    [DEBUG] Building Maven global-level plugin registry from: 'D:\maven-2.0.4\bin\..\conf\plugin-registry.xml'
    [INFO] Scanning for projects...
    [INFO] Searching repository for plugin with prefix: 'xdoclet'.
    [INFO] org.apache.maven.plugins: checking for updates from central
    [INFO] org.codehaus.mojo: checking for updates from central
    [INFO] artifact org.codehaus.mojo:xdoclet-maven-plugin: checking for updates from central
    [DEBUG] xdoclet-maven-plugin: resolved to version 1.0-alpha-2 from repository central
    [DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo::3 for project: null:xdoclet-maven-plugin:maven-plugin:1.0-alpha-2 from the repository.
    [INFO] ----------------------------------------------------------------------------
    [INFO] Building Unnamed - dra.proto.business:dra.proto.business:jar:0.0.1
    [INFO]    task-segment: [xdoclet:xdoclet]
    [INFO] ----------------------------------------------------------------------------
    [DEBUG] dra.proto.business:dra.proto.business:jar:0.0.1 (selected for null)
    [DEBUG] Trying repository central
    Downloading: http://repo1.maven.org/maven2/j2ee/j2ee/1.0/j2ee-1.0.pom
    [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
    [DEBUG] Artifact not found - using stub model: Unable to download the artifact from any repository
     
      j2ee:j2ee:pom:1.0
     
    from the specified remote repositories:
      central (http://repo1.maven.org/maven2)
     
    [DEBUG] Using defaults for missing POM j2ee:j2ee:pom:1.0:compile
    [DEBUG]   j2ee:j2ee:jar:1.0:compile (selected for compile)
    [DEBUG]   commons-logging:commons-logging:jar:1.0.4:compile (selected for compile)
    [DEBUG]   junit:junit:jar:3.8.2:compile (selected for compile)
    [DEBUG] org.codehaus.mojo:xdoclet-maven-plugin:maven-plugin:1.0-alpha-2:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-wsee-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]     xdoclet:xdoclet:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]       commons-logging:commons-logging:jar:1.0.4:runtime (selected for runtime)
    [DEBUG]       commons-collections:commons-collections:jar:2.1:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-jboss-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-model:jar:2.0 from the repository.
    [DEBUG]   org.apache.maven:maven-model:jar:2.0:runtime (selected for runtime)
    [DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-xdoclet-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-orion-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-ibm-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-jmx-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   commons-logging:commons-logging:jar:1.0.4:runtime (selected for runtime)
    [DEBUG]   commons-collections:commons-collections:jar:2.1:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-apache-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-objectweb-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-fr_FR-locale:jar:1.2.3:runtime (selected for runtime)
    [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugin-parent::2.0 for project: null:maven-antrun-plugin:maven-plugin:1.0 from the repository.
    [DEBUG]   org.apache.maven.plugins:maven-antrun-plugin:jar:1.0:runtime (selected for runtime)
    [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: null:maven-project:jar:2.0 from the repository.
    [DEBUG]     org.apache.maven:maven-project:jar:2.0:runtime (selected for runtime)
    [DEBUG]       org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime (selected for runtime)
    [DEBUG]         classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runtime)
    [DEBUG]         junit:junit:jar:3.8.1:runtime (selected for runtime)
    [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-artifact:jar:2.0 from the repository.
    [DEBUG]       org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime)
    [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-artifact-manager:jar:2.0 from the repository.
    [DEBUG]       org.apache.maven:maven-artifact-manager:jar:2.0:runtime (selected for runtime)
    [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-repository-metadata:jar:2.0 from the repository.
    [DEBUG]         org.apache.maven:maven-repository-metadata:jar:2.0:runtime (selected for runtime)
    [DEBUG]         org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:runtime (selected for runtime)
    [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: null:maven-profile:jar:2.0 from the repository.
    [DEBUG]       org.apache.maven:maven-profile:jar:2.0:runtime (selected for runtime)
    [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-plugin-api:jar:2.0 from the repository.
    [DEBUG]     org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for runtime)
    [DEBUG]     ant:ant-launcher:jar:1.6.5:runtime (selected for runtime)
    [DEBUG]     ant:ant:jar:1.6.5:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-java-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-exolab-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-bea-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]     xdoclet:xdoclet-ejb-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-mvcsoft-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-sun-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-spring-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-de-locale:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   jboss:jboss-j2ee:jar:3.2.1:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-web-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-caucho-module:jar:1.2.3:runtime (selected for runtime)
    [WARNING] While downloading servletapi:servletapi:2.3
      This artifact has been relocated to javax.servlet:servlet-api:2.3.
     
     
    [DEBUG]   javax.servlet:servlet-api:jar:2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-jdo-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-tjdo-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-openejb-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-oracle-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0-beta-1 for project: org.apache.maven:maven-plugin-api:jar:2.0-beta-1 from the repository.
    [DEBUG]   org.apache.maven:maven-plugin-api:jar:2.0:runtime (removed - nearer found: 2.0-beta-1)
    [DEBUG]   org.apache.maven:maven-plugin-api:jar:2.0-beta-1:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-hp-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-webwork-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-mx4j-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-solarmetric-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-jsf-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-pramati-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-pt_BR-locale:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-ejb-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-borland-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-hibernate-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   org.apache.maven:maven-project:jar:2.0:runtime (selected for runtime)
    [DEBUG]     org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime (selected for runtime)
    [DEBUG]       classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runtime)
    [DEBUG]       junit:junit:jar:3.8.1:runtime (selected for runtime)
    [DEBUG]     org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime)
    [DEBUG]     org.apache.maven:maven-artifact-manager:jar:2.0:runtime (selected for runtime)
    [DEBUG]       org.apache.maven:maven-repository-metadata:jar:2.0:runtime (selected for runtime)
    [DEBUG]       org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:runtime (selected for runtime)
    [DEBUG]     org.apache.maven:maven-profile:jar:2.0:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-sybase-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-mockobjects-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-libelis-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-portlet-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG]   xdoclet:xjavadoc:jar:1.1:runtime (selected for runtime)
    [DEBUG]     ant:ant:jar:1.5.2:runtime (removed - nearer found: 1.6.5)
    [DEBUG]     junit:junit:jar:3.8.1:runtime (selected for runtime)
    [DEBUG]   xdoclet:xdoclet-macromedia-module:jar:1.2.3:runtime (selected for runtime)
    [DEBUG] Configuring mojo 'org.codehaus.mojo:xdoclet-maven-plugin:1.0-alpha-2:xdoclet' -->
    [DEBUG]   (f) classRealm = org.codehaus.classworlds.DefaultClassRealm@166afb3
    [DEBUG]   (f) generatedSourcesDirectory = D:\eclipse-maestro\workspace\dra.proto.business\target/generated-sources/xdoclet
    [DEBUG]   (f) project = org.apache.maven.project.MavenProject@2c8145b6
    [DEBUG]   (f) sourceDirectory = D:\eclipse-maestro\workspace\dra.proto.business/src/main/java
    [DEBUG]   (f) tasks =
    [DEBUG] -- end configuration --
    [INFO] [xdoclet:xdoclet]
    [INFO] Initializing DocletTasks!!!
    [INFO] Executing tasks
    [INFO] Executed tasks
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESSFUL
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 9 seconds
    [INFO] Finished at: Mon Jul 31 18:31:49 CEST 2006
    [INFO] Final Memory: 3M/6M
    [INFO] ------------------------------------------------------------------------
    - petites remarques : - ici generatedSourcesDirectory = D:\eclipse-maestro\workspace\dra.proto.business\target/generated-sources/xdoclet
    alors que dans mon pom.xml :
    <generatedSourcesDirectory>
    ../generated/java
    </generatedSourcesDirectory>
    i.e D:\eclipse-maestro\workspace\dra.proto.business/generated/java

    egalement pb avec sourceDirectory

    quel en est la raison ( car meme avec mvn -U -X clean xdoclet: xdoclet pas de changement de directory )

    ensuite pourquoi build successful alors que je n'est aucune classes generée
    D'autan plus qu'apparement il ne prend pas mon <tasks> en compte :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    [DEBUG]   (f) project = org.apache.maven.project.MavenProject@2c8145b6
    [DEBUG]   (f) sourceDirectory = D:\eclipse-maestro\workspace\dra.proto.business/src/main/java
    [DEBUG]   (f) tasks =
    [DEBUG] -- end configuration --

    please HELP ( )

  2. #2
    Membre confirmé Avatar de morice.ju
    Inscrit en
    Avril 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Âge : 43

    Informations forums :
    Inscription : Avril 2006
    Messages : 79
    Par défaut
    il faut absolument garder le repertoire generated-sources/xdoclet dans les parametrages ou laisser par defaut. Le plugin xdcolet ne reconnait que ce repertoire, sinon ca bug dans la génération et la compilation des sources

  3. #3
    Expert confirmé

    Avatar de denisC
    Profil pro
    Développeur Java
    Inscrit en
    Février 2005
    Messages
    4 050
    Détails du profil
    Informations personnelles :
    Âge : 45
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Service public

    Informations forums :
    Inscription : Février 2005
    Messages : 4 050
    Par défaut
    Citation Envoyé par DanielW33
    <sourceDirectory>
    /src/java
    </sourceDirectory>
    =>
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
                                             <sourceDirectory>
                                                   src/java
                                            </sourceDirectory>

    Citation Envoyé par DanielW33

    <generatedSourcesDirectory>
    ../generated/java
    </generatedSourcesDirectory>
    =>

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    					<generatedSourcesDirectory>
                                                  ${project.build.directory}/generated/java
                                            </generatedSourcesDirectory>
    Citation Envoyé par DanielW33
    <fileset dir="${basedir}/src/java" includes="**/*Bean.java" />
    Citation Envoyé par DanielW33
    ensuite pourquoi build successful alors que je n'est aucune classes generée
    D'autan plus qu'apparement il ne prend pas mon <tasks> en compte :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    [DEBUG]   (f) project = org.apache.maven.project.MavenProject@2c8145b6
    [DEBUG]   (f) sourceDirectory = D:\eclipse-maestro\workspace\dra.proto.business/src/main/java
    [DEBUG]   (f) tasks =
    [DEBUG] -- end configuration --

    please HELP ( )
    Maintenant que tu as bindé le plugin à la phase, je pense qu'il vaut mieux appeller la phase directement:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    mvn generate-sources
    Si tu appelles le plugin directement, ça m'etonnerait qu'il prenne en compte la configuration spécifique à une phase...

  4. #4
    Membre éclairé 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
    Par défaut
    Merci apres un petit nettoyage de mon fichier pom.xml et apres avoir suivi tes conseils denisC , j'ai enfin reussi a generer mes classes avec xdoclet ( a savoir qu'il me prend bien mes sources dans /src/java , et qu'il me depose bien mes sources generés dans /generated/java, donc on a la possibilite de passer outre le outputDirectory obligatoire du plugin).


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

Discussions similaires

  1. [Maven2] Problème sur récupération d'un plugin
    Par romaintaz dans le forum Maven
    Réponses: 6
    Dernier message: 07/11/2006, 16h36
  2. [Eclipse Maven2 Plugin] Erreur de config?
    Par zaoueche dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 23/10/2006, 14h00
  3. Plugins Hibernate Tools sous Maven2
    Par xixi31 dans le forum Eclipse Java
    Réponses: 1
    Dernier message: 16/10/2006, 09h23
  4. Réponses: 4
    Dernier message: 10/07/2006, 11h17
  5. [Maven2][WAR-Plugin] Import intempestif de .jar
    Par Cpt.FLAM dans le forum Maven
    Réponses: 3
    Dernier message: 26/06/2006, 15h18

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