thomas2004 wrote:
> 
> Surely when I use Java 1.5. It is OK. But I do want to use Java 1.4 since I
> will deploy my web-application to WebLogic 8 which is just compatible with
> Java 1.4.
> 
> Has someone idea?

The plugin you use is for JAXB 2.x which requires you to use at least
java 1.5. For java 1.4 you need JAXB 1.x. You may want to use this JAXB
1.0 plugin.

      <plugin>
        <groupId>org.jvnet.jaxb1.maven2</groupId>
        <artifactId>maven-jaxb1-plugin</artifactId>
        <executions>
          <execution>
            <id>generate</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <extension>true</extension>
              <strict>true</strict>
              <bindingDirectory>src/main/jaxb</bindingDirectory>
              <schemaDirectory>src/main/jaxb</schemaDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

For this to work you need some additional repositories, since that
plugin is not available via the central repository.

  <repositories>
    <repository>
      <id>maven2-repository.dev.java.net</id>
      <name>Java.net Maven 2 Repository</name>
      <url>http://download.java.net/maven/2/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>maven-repository.dev.java.net</id>
      <name>Java.net Maven 1 Repository (legacy)</name>
      <url>http://download.java.net/maven/1/</url>
      <layout>legacy</layout>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>maven2-repository.dev.java.net</id>
      <name>Java.net Maven 2 Repository</name>
      <url>http://download.java.net/maven/2/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
    <pluginRepository>
      <id>maven-repository.dev.java.net</id>
      <name>Java.net Maven 1 Repository (legacy)</name>
      <url>http://download.java.net/maven/1/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <layout>legacy</layout>
    </pluginRepository>
  </pluginRepositories>

And you will need the corresponding JAXB dependencies for java 1.4.

      <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>1.0</version>
        <scope>compile</scope>
        <exclusions>
          <!--
          Excluded because of certificate problems.
          Classes must be provided by additional jaxp-api
          dependency when used.
          -->
          <exclusion>
            <groupId>javax.xml</groupId>
            <artifactId>namespace</artifactId>
          </exclusion>
          <exclusion>
            <groupId>javax.xml</groupId>
            <artifactId>jax-qname</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-impl</artifactId>
        <version>1.0.6</version>
        <scope>compile</scope>
      </dependency>

      <dependency>
        <groupId>javax.xml.parsers</groupId>
        <artifactId>jaxp-api</artifactId>
        <version>1.4</version>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>com.sun.xml.parsers</groupId>
        <artifactId>jaxp-ri</artifactId>
        <version>1.4</version>
        <scope>runtime</scope>
      </dependency>

Give it a try.

-- 
Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to