Hi,

I'd like to generate java class from an xsd file using castor plugin.
But maven fails as you can see below. Thank's for help.

D:\users\marc\dev\chouette\chouette-noyau>mvn -U compile:generate
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'compile'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-compiler-plugin: checking for updates from central [INFO] artifact org.apache.maven.plugins:maven-surefire-plugin: checking for updates from central [INFO] artifact org.apache.maven.plugins:maven-compile-plugin: checking for updates from central [INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------ [INFO] The plugin 'org.apache.maven.plugins:maven-compile-plugin' does not exist or no valid version could be found [INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Thu Dec 07 10:25:19 CET 2006
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------

Here's the pom file

<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";>
   <modelVersion>4.0.0</modelVersion>
   <groupId>fr.certu.chouette</groupId>
   <artifactId>chouette-noyau</artifactId>
   <packaging>war</packaging>
   <version>1.0-SNAPSHOT</version>
   <name>chouette-noyau</name>
   <url>http://maven.apache.org</url>
   <dependencies>
       <dependency>
           <groupId>junit</groupId>
           <artifactId>junit</artifactId>
           <version>3.8.1</version>
           <scope>compile</scope>
       </dependency>
       <dependency>
           <groupId>javax.servlet</groupId>
           <artifactId>servlet-api</artifactId>
           <version>2.4</version>
           <scope>provided</scope>
       </dependency>
       <dependency>
           <groupId>struts</groupId>
           <artifactId>struts</artifactId>
           <version>1.2.9</version>
           <scope>compile</scope>
       </dependency>
       <dependency>
           <groupId>hibernate</groupId>
           <artifactId>hibernate</artifactId>
           <version>3.1rc2</version>
           <scope>compile</scope>
       </dependency>
       <dependency>
           <groupId>castor</groupId>
           <artifactId>castor</artifactId>
           <version>0.9.7</version>
           <scope>compile</scope>
       </dependency>
       <dependency>
           <groupId>commons-logging</groupId>
           <artifactId>commons-logging</artifactId>
           <version>1.1</version>
           <scope>compile</scope>
       </dependency>
       <dependency>
           <groupId>commons-logging</groupId>
           <artifactId>commons-logging</artifactId>
           <version>1.1</version>
           <scope>compile</scope>
       </dependency>
       <dependency>
           <groupId>log4j</groupId>
           <artifactId>log4j</artifactId>
           <version>1.2.9</version>
           <scope>compile</scope>
       </dependency>
       <dependency>
           <groupId>commons-configuration</groupId>
           <artifactId>commons-configuration</artifactId>
           <version>1.2</version>
           <scope>compile</scope>
       </dependency>
       <dependency>
           <groupId>postgresql</groupId>
           <artifactId>postgresql</artifactId>
           <version>8.1-407.jdbc3</version>
           <scope>runtime</scope>
       </dependency>
   </dependencies>
   <build>
       <resources>
           <resource>
               <targetPath>fr/certu/chouette/bean</targetPath>
               <filtering>false</filtering>
               <directory>${basedir}/src/mapping</directory>
               <includes>
                   <include>*.hbm.xml</include>
               </includes>
           </resource>
           <resource>
               <directory>${basedir}/src/main/resources</directory>
           </resource>
       </resources>

     <plugins>
       <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>castor-maven-plugin</artifactId>
          <version>1.0</version>
          <executions>
           <execution>
               <id>1</id>
             <phase>compile</phase>
               <goals><goal>generate</goal></goals>
             <configuration>
<schema>${basedir}/src/main/resources/xsd/Application.xsd</schema>
                   <packaging>fr.certu.chouette.common</packaging>
             </configuration>
           </execution>
           <execution>
               <id>2</id>
             <phase>compile</phase>
               <goals><goal>generate</goal></goals>
             <configuration>
<schema>${basedir}/src/main/resources/xsd/chouette/Chouette.xsd</schema>
                   <packaging>fr.certu.chouette.schema</packaging>
             </configuration>
           </execution>
          </executions>
       </plugin>
     <plugin>
       <artifactId>maven-surefire-plugin</artifactId>
       <configuration>
           <includes>
               <include>SuiteTest.java</include>
           </includes>
       </configuration>
     </plugin>
   </plugins>
   </build>
<reporting>
   <plugins>
     <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-surefire-report-plugin</artifactId>
     </plugin>
   </plugins>
 </reporting>
</project>


--

Marc FLORISSON
[EMAIL PROTECTED]
www.dryade.net <http://www.dryade.net>

Reply via email to