I don't know if jaxb supports java 1.4, but if it does, try setting your source to 1.5 and target to 1.4.
Hth, Nick Stolwijk ~Java Developer~ Iprofs BV. Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl On Wed, Oct 29, 2008 at 3:51 PM, thomas2004 <[EMAIL PROTECTED]> wrote: > > I do use the version of 1.4 as follow. But it doesn't help. The created java > files by "maven-jaxb-plugin" contains annotation which is not supported by > Java 1.4. > > <plugin> > <artifactId>maven-war-plugin</artifactId> > <configuration> > <archive> > <manifest> > > <addClasspath>true</addClasspath> > </manifest> > </archive> > </configuration> > </plugin> > <plugin> > <groupId>com.sun.tools.xjc.maven2</groupId> > <artifactId>maven-jaxb-plugin</artifactId> > <executions> > <execution> > <phase>generate-sources</phase> > <goals> > <goal>generate</goal> > </goals> > </execution> > </executions> > <configuration> > > <generatePackage>de.proactiv.pbv.dsl</generatePackage> > > <schemaDirectory>src/main/webapp/WEB-INF/xsd</schemaDirectory> > </configuration> > </plugin> > <plugin> > <artifactId>maven-compiler-plugin</artifactId> > <configuration> > <source>1.4</source> > <target>1.4</target> > </configuration> > </plugin> > > > > > Nick Stolwijk-4 wrote: >> >> Use Java 1.5 to run maven, but configure the compiler plugin to output >> Java 1.4 code. [1] >> >> [1] >> http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#source >> >> Hth, >> >> Nick Stolwijk >> ~Java Developer~ >> >> Iprofs BV. >> Claus Sluterweg 125 >> 2012 WS Haarlem >> www.iprofs.nl >> >> >> >> On Wed, Oct 29, 2008 at 1:39 PM, thomas2004 <[EMAIL PROTECTED]> wrote: >>> >>> Hi all, >>> >>> I use following plugin in my pom.xml to convert XSD to java: >>> ... >>> <plugin> >>> >>> <groupId>com.sun.tools.xjc.maven2</groupId> >>> <artifactId>maven-jaxb-plugin</artifactId> >>> <executions> >>> <execution> >>> >>> <phase>generate-sources</phase> >>> <goals> >>> >>> <goal>generate</goal> >>> </goals> >>> </execution> >>> </executions> >>> <configuration> >>> >>> <generatePackage>com.mycompany</generatePackage> >>> >>> <schemaDirectory>src/main/webapp/WEB-INF/xsd</schemaDirectory> >>> </configuration> >>> </plugin> >>> ... >>> >>> I use Java 1.4. As I run mvn install, I got error as follow: >>> ... >>> [ERROR] BUILD ERROR >>> [INFO] >>> ------------------------------------------------------------------------ >>> [INFO] Internal error in the plugin manager executing goal >>> 'com.sun.tools.xjc.ma >>> ven2:maven-jaxb-plugin:1.1:generate': Unable to find the mojo >>> 'com.sun.tools.xjc >>> .maven2:maven-jaxb-plugin:1.1:generate' in the plugin >>> 'com.sun.tools.xjc.maven2: >>> maven-jaxb-plugin' >>> com/sun/tools/xjc/maven2/XJCMojo (Unsupported major.minor version 49.0) >>> [INFO] >>> ------------------------------------------------------------------------ >>> [INFO] For more information, run Maven with the -e switch >>> [INFO] >>> ------------------------------------------------------------------------ >>> [INFO] Total time: 2 seconds >>> [INFO] Finished at: Wed Oct 29 13:38:08 CET 2008 >>> [INFO] Final Memory: 8M/15M >>> [INFO] >>> ------------------------------------------------------------------------ >>> ... >>> >>> 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? >>> -- >>> View this message in context: >>> http://www.nabble.com/Does-Java-1.4-support-%22maven-jaxb-plugin%22--tp20226200p20226200.html >>> Sent from the Maven - Users mailing list archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- > View this message in context: > http://www.nabble.com/Does-Java-1.4-support-%22maven-jaxb-plugin%22--tp20226200p20228733.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
