RE: Maven and XMLBeans, not best friends??

2009-08-14 Thread hannehomuth

Did you look at using the maven-plugin that's in XMLBeans tree?
http://svn.apache.org/viewvc/xmlbeans/trunk/maven-plugin/

No not yet, I only tried the plugin which lies in the central maven
repository. 
But this didn't work, as I said already. We are using an ant task now, which
will be executed by maven. Because this works now and we are going to
release soon, I will try the new version of the xmlbeans plugin after the
release.

Thx to all

 
-- 
View this message in context: 
http://www.nabble.com/Maven-and-XMLBeans%2C-not-best-friends---tp24603611p24967490.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



RE: Maven and XMLBeans, not best friends??

2009-08-06 Thread Cezar Andrei
Did you look at using the maven-plugin that's in XMLBeans tree?
http://svn.apache.org/viewvc/xmlbeans/trunk/maven-plugin/

Cezar

 -Original Message-
 From: hannehomuth [mailto:hannehomu...@gmx.de]
 Sent: Wednesday, July 22, 2009 5:22 AM
 To: user@xmlbeans.apache.org
 Subject: Maven and XMLBeans, not best friends??
 
 
 Hi to everyone,
 
 I've trying and searching a lot of hours but could not find any solution
 which worked for me.
 
 I want to use xmlbeans in an project which uses maven as build tool. I've
 configured the plugin in the pom.xml in this way
 
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdxmlbeans-maven-plugin/artifactId
 version2.1.0/version
 executions
 execution
 idBuild-XMLBeans/id
 goals
 goalxmlbeans/goal
 /goals
 /execution
 /executions
 configuration
 
 schemaDirectorysrc/main/java/com/vw/ais/jobengine/propertytypes/schemaD
 irectory
 
 schemaDirectorysrc/main/java/com/vw/ais/jobengine/configurations/schema
 Directory
 
 classGenerationDirectory${project.build.directory}/generated-
 classes/xmlbeans/classGenerationDirectory
 
 sourceGenerationDirectory${project.build.directory}/generated-
 sources/xmlbeans/sourceGenerationDirectory
 verbosetrue/verbose
 /configuration
 /plugin
 
 Furthermore I have declared some dependencies for xmlbeans
 
  dependencies
 dependency
 groupIdxmlbeans/groupId
 artifactIdxmlbeans/artifactId
 version2.2.0/version
 /dependency
 dependency
 groupIdxmlbeans/groupId
 artifactIdxbean/artifactId
 version2.1.0/version
 /dependency
 /dependencies
 
 The project build will run successful, but when I try to run the app, I
 get
 the good old
 
 Exception in thread main java.lang.ExceptionInInitializerError
 at
 com.vw.ais.jobengine.validation.ConfigurationValidator.schematicValidation
 (ConfigurationValidator.java:98)
 at
 com.vw.ais.jobengine.validation.ConfigurationValidator.validate(Configurat
 ionValidator.java:58)
 at com.vw.ais.jobengine.JobEngine.initialize(JobEngine.java:54)
 at com.vw.ais.jobengine.Test.main(Test.java:34)
 Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem.
 Unable
 to load class with name
 schemaorg_apache_xmlbeans.system.s09447651F54C8102642F6478AB9428E3.TypeSys
 temHolder.
 Make sure the generated binary files are on the classpath.
 at
 org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:783)
 at
 com.vw.ais.jobengine.configurations.JobEngineDocument.clinit(JobEngineDo
 cument.java:19)
 ... 4 more
 Caused by: java.lang.ClassNotFoundException:
 schemaorg_apache_xmlbeans.system.s09447651F54C8102642F6478AB9428E3.TypeSys
 temHolder
 ...
 ...
 
 The Class
 schemaorg_apache_xmlbeans.system.s09447651F54C8102642F6478AB9428E3.TypeSys
 temHolder
 lies in the jar.
 
 What the hell is wrong here. Does anyone see what I'm doing wrong here.
 Thx for suggestions
 --
 View this message in context: http://www.nabble.com/Maven-and-XMLBeans%2C-
 not-best-friends---tp24603611p24603611.html
 Sent from the Xml Beans - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
 For additional commands, e-mail: user-h...@xmlbeans.apache.org
 

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Maven and XMLBeans, not best friends??

2009-08-05 Thread Jacob Barde

hannehomuth,

Might want to try a more recent version of the mojo xmlbeans plugin.  
It's currently up to version 2.3.2, and it supports XMLBeans 2.4.0, 
located on http://repository.codehaus.org/.


I use the following to generate source and compiled jars with success.  
One thing though, if you don't clean after a previous package command, 
the -sources.jar file won't be generated correctly.


Good luck,

Jay


//pom.xml BEGIN
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;

   ...
   build
   plugins
   plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-source-plugin/artifactId
   version2.3.2/version
   executions
   execution
   id /
   phasegenerate-sources/phase
   goals
   goaljar/goal
   /goals
   /execution
   /executions
   /plugin
   plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdxmlbeans-maven-plugin/artifactId
   version2.3.2/version
   executions
   execution
   id /
   phasegenerate-sources/phase
   goals
   goalxmlbeans/goal
   /goals
   /execution
   /executions
   configuration
   schemaDirectorysrc/main/xsd/schemaDirectory
   
staleFile${project.build.directory}/generated-sources/xmlbeans/.staleFlag/staleFile

   verbosefalse/verbose
   quietfalse/quiet
   javaSource1.5/javaSource
   !-- use this only if your schemata are nested in 
child folders, or are in a folder other than `src/main/xsd'

   sourceSchemas
   sourceSchemabar/foo.xsd/sourceSchema
   sourceSchemafoo/bar.xsd/sourceSchema
   /sourceSchemas
   --
   !-- again, use this only if your xsdconfig files 
are nested in child folders, or are in a folder other than 
`src/main/xsdconfig'

   xmlConfigs
   xmlConfig 
implementation=java.io.Filesrc/main/xsd/bar/foo.xsdconfig/xmlConfig
   xmlConfig 
implementation=java.io.Filesrc/main/xsd/foo/bar.xsdconfig/xmlConfig

   /xmlConfigs
   --
   /configuration
   /plugin
   plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdxmlbeans-maven-plugin/artifactId
   executions
   execution
   id /
   phasegenerate-sources/phase
   goals
   goalxmlbeans-test/goal
   /goals
   /execution
   /executions
   inheritedtrue/inherited
   configuration
   schemaDirectorysrc/test/xsd/schemaDirectory
   /configuration
   /plugin
   /plugins
   /build
   dependencies
   dependency
   groupIdorg.apache.xmlbeans/groupId
   artifactIdxmlbeans/artifactId
   version2.4.0/version
   /dependency
   dependency
   groupIdorg.apache.xmlbeans/groupId
   artifactIdxmlbeans-qname/artifactId
   version2.4.0/version
   typejar/type
   scopecompile/scope
   /dependency
   dependency
   groupIdorg.apache.xmlbeans/groupId
   artifactIdxmlbeans-xmlpublic/artifactId
   version2.4.0/version
   typejar/type
   scopecompile/scope
   /dependency
   dependency
   groupIdjavax.xml.bind/groupId
   artifactIdjsr173_api/artifactId
   version1.0/version
   typejar/type
   scopecompile/scope
   /dependency
   dependency
   groupIdxml-resolver/groupId
   artifactIdxml-resolver/artifactId
   version1.2/version
   typejar/type
   scopecompile/scope
   /dependency
   dependency
   groupIdorg.apache.commons/groupId
   artifactIdcommons-io/artifactId
   version1.3.2/version
   typejar/type
   scopecompile/scope
   /dependency
   /dependencies
/project
//pom.xml END


hannehomuth wrote:

Hi to everyone,

I've trying and searching a lot of hours but could not find any solution
which worked for me.

I want to use xmlbeans in an project which uses maven as build tool. I've
configured the plugin in the pom.xml in this way

plugin
groupIdorg.codehaus.mojo/groupId

Re: Maven and XMLBeans, not best friends??

2009-08-05 Thread Andreas Loew

Jacob Barde schrieb:

Might want to try a more recent version of the mojo xmlbeans plugin.  
It's currently up to version 2.3.2, and it supports XMLBeans 2.4.0, 
located on http://repository.codehaus.org/.


... and - just in case - please be aware of the fact that you still have 
the full freedom/flexibility to fall back to using the 
maven-antrun-plugin and good old XMLBeans Ant tasks... ;-)


--
Andreas Loew
Senior Java Architect
Sun Microsystems (Germany)

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org