Lexi (and others)
Maven 1 and Maven 2 are very different, so different that it would take
us a good couple of weeks of research and migration if we ever had to
upgrade to Maven 2.x in our build environment, so you can imagine that
the architectur is very different. To just port a Maven 2 plugin to a
Maven 1 plugin is virtually impossible because of the huge differences
in the way they work.
I did, however, attempt to port the Maven 1.x JAXB1 plugin to JAXB2. I
am using JAXB 2.1.6. I did the following:
- removed all jar files within the plugin
- Added the following jars under the
<jaxb-plugin-folder>\repository\jaxb\jars\
- jsr173_1.0_api-1.0.jar
- jaxb-xjc-2.1.jar
- jaxb-impl-2.1.jar
- jaxb-api-2.1.jar
- I did not add activation since it is already part of Java6. (I
did, however, test with and without activation-1.1.jar)
- I modified the porject.xml file to reflect the dependencies above.
- I opened plugin.jelly and modified the <xjc> element by changing the
"target" attribute to the "destdir" attribute since the target attribute
changed its meaning in JAXB 2.
Rolled it into my maven-1.0.1/plugins folder and compiled the artifact
using maven.
I got the following erorr:
BUILD FAILED
File...... C:\Documents and
Settings\glen.verran.TRADEROOT\.maven\cache\maven-jaxb-plugin-1.0\plugin
.jelly
Element... xjc
Line...... 35
Column.... 92
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar([
Lcom/sun/org/apache/xerces/internal/xni/parser/XMLInputSource;)V
Total time: 2 seconds
Finished at: Wed Feb 13 17:17:25 CAT 2008
I really hope anybody can help me here?
Thanks
~Glen
-----Original Message-----
From: aleksei.valikov_at_gmail.com [mailto:aleksei.valikov_at_gmail.com] On
Behalf Of Aleksei Valikov
Sent: 13 February 2008 17:09
To: users_at_jaxb.dev.java.net
Subject: Re: Jaxb2 - Maven 1.x plugin?
Hi.
> We have just decided to migrate our codebase to Java 6 using Java
> 6_02. We are currently using Maven 1.0.1 in our build environment.
>
> With moving to Java 6, we are now finally able to upgrade to JAXB 2.
> Of course, using the current JAXB1 plugin in Maven will not work. Can
> anybody please help me in finding or even creating a Maven 1.x plugin
for JAXB 2?
> I can only find Maven 2.x plugins for JAXB 1/2 and I need a Maven 1.x
> plugin.
>
> I have attemped in modifying the current JAXB 1 plugin for Maven 1.x,
> but with no success. :(
>
> Upgrading to Maven 2 or even upgrading to Maven 1.0.2 is not an
option!
>
> Please can you help me with this little problem? Much appreciated a
lot.
I never wrote a Maven1 Plugin, but I don't see big problems porting
maven-jaxb2-plugin.dev.java.net onto Maven1. What exactly your problem
was?
Bye.
/lexi
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net