axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron U'Ren (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-4547) Maven2 axis2-wsdl2code-maven-plugin Does Not Bundle generated-sources Resource Files Created By XMLBeans
Date Fri, 06 Nov 2009 23:58:32 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-4547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774499#action_12774499
] 

Aaron U'Ren commented on AXIS2-4547:
------------------------------------

An excerpt from the Axis documentation found at http://ws.apache.org/axis2/tools/1_4/CodegenToolReference.html
that describes this problem if these classes aren't bundled:

An important detail is that an XMLBean class file is also generated by WSDL2Java, TypeSystemHolder.class.
That file is placed into build/classes by the above ant task and will be needed to compile
the generated sources. A frequent problem is users get an error such as:

ClassNotFoundException : Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.s68C41DB812F52C975439BA10FE4FEE54.TypeSystemHolder.
Make sure the generated binary files are on the classpath.

The TypeSystemHolder.class generated by WSDL2Java must be placed in your classpath in order
to avoid this error.

> Maven2 axis2-wsdl2code-maven-plugin Does Not Bundle generated-sources Resource Files
Created By XMLBeans
> --------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4547
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4547
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: databinding, Tools
>    Affects Versions: 1.4.1
>         Environment: Windows XP SP3
> Apache Maven: 2.2.0
> Java Version: 1.6.0_10
> Axis WSDL2Code Plugin Version: 1.4.1
> XMLBeans Version: 2.4.0
> Axis Library Versions: 1.5.1
>            Reporter: Aaron U'Ren
>            Priority: Minor
>
> Currently, the Maven2 plugin "axis2-wsdl2code-maven-plugin", which generates Java source
code from a WSDL file, adds the source files (in directory "/target/generated-sources/axis2/wsdl2code/src")
created during the "generate-sources" lifecycle phase as a source root in the Maven2 project
allowing them to be compiled and included in the project's "/target/classes" directory for
bundling and/or running.
> I'm guessing that step happens in the "WSDL2CodeMojo" class here?
> {code}
>     private void fixCompileSourceRoots() {
>         File srcDir = new File(outputDirectory, "src");
> 	    project.addCompileSourceRoot();
>         project.addCompileSourceRoot(srcDir.getPath());
> 	}
> {code}
> However, it appears makes no comment on the equally needed "resources" directory that
is generated by XMLBeans and found at "/target/generated-sources/axis2/wsdl2code/resources".
This directory contains the class "TypeSystemHolder" and all of the *.xsb files that will
be needed to actually run any program that uses XMLBeans for data binding.
> Right now I've found a work around by defining that path as a resource in the pom.xml
file as shown below:
> {code}
>     <resources>
>       <resource>
>         <directory>${project.build.directory}/generated-sources/axis2/wsdl2code/resources</directory>
>         <includes>
>           <include>**/**</include>
>         </includes>
>       </resource>
>     </resources>
> {code}
> Maybe this is the correct way to handle this situation, but it would be nice if the Maven2
plugin would do this intuitively when it detects the XMLBeans data binding engine since it
seems to ALWAYS be needed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message