You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2007/01/21 22:19:41 UTC
svn commit: r498455 - in /webservices/axis2/branches/java/maven2/modules:
adb-codegen/ adb-codegen/test/org/apache/axis2/schema/compile/ adb/ jaxbri/
jibx/ parent/ xmlbeans/ xmlbeans/test/org/apache/axis2/xmlbeans/
Author: davidillsley
Date: Sun Jan 21 13:19:40 2007
New Revision: 498455
URL: http://svn.apache.org/viewvc?view=rev&rev=498455
Log:
Maven2 updates for the codegen related modules
Added:
webservices/axis2/branches/java/maven2/modules/jaxbri/pom.xml
webservices/axis2/branches/java/maven2/modules/jibx/pom.xml
webservices/axis2/branches/java/maven2/modules/xmlbeans/pom.xml
Removed:
webservices/axis2/branches/java/maven2/modules/adb-codegen/pom.xml
webservices/axis2/branches/java/maven2/modules/adb/pom.xml
webservices/axis2/branches/java/maven2/modules/parent/pom.xml
Modified:
webservices/axis2/branches/java/maven2/modules/adb-codegen/test/org/apache/axis2/schema/compile/AbstractSchemaCompilerTester.java
webservices/axis2/branches/java/maven2/modules/adb-codegen/test/org/apache/axis2/schema/compile/ImportTest.java
webservices/axis2/branches/java/maven2/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java
Modified: webservices/axis2/branches/java/maven2/modules/adb-codegen/test/org/apache/axis2/schema/compile/AbstractSchemaCompilerTester.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/maven2/modules/adb-codegen/test/org/apache/axis2/schema/compile/AbstractSchemaCompilerTester.java?view=diff&rev=498455&r1=498454&r2=498455
==============================================================================
--- webservices/axis2/branches/java/maven2/modules/adb-codegen/test/org/apache/axis2/schema/compile/AbstractSchemaCompilerTester.java (original)
+++ webservices/axis2/branches/java/maven2/modules/adb-codegen/test/org/apache/axis2/schema/compile/AbstractSchemaCompilerTester.java Sun Jan 21 13:19:40 2007
@@ -46,7 +46,7 @@
documentBuilderFactory.setNamespaceAware(true);
DocumentBuilder builder = documentBuilderFactory.newDocumentBuilder();
- Document doc = builder.parse(new File(fileName));
+ Document doc = builder.parse(new File(System.getProperty("basedir")+"/"+fileName));
//now read it to a schema
XmlSchemaCollection schemaCol = getSchemaReader();
Modified: webservices/axis2/branches/java/maven2/modules/adb-codegen/test/org/apache/axis2/schema/compile/ImportTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/maven2/modules/adb-codegen/test/org/apache/axis2/schema/compile/ImportTest.java?view=diff&rev=498455&r1=498454&r2=498455
==============================================================================
--- webservices/axis2/branches/java/maven2/modules/adb-codegen/test/org/apache/axis2/schema/compile/ImportTest.java (original)
+++ webservices/axis2/branches/java/maven2/modules/adb-codegen/test/org/apache/axis2/schema/compile/ImportTest.java Sun Jan 21 13:19:40 2007
@@ -25,7 +25,7 @@
protected XmlSchemaCollection getSchemaReader() {
XmlSchemaCollection reader = new XmlSchemaCollection();
- reader.setBaseUri("test-resources/xsd");
+ reader.setBaseUri(System.getProperty("basedir")+"/"+"test-resources/xsd");
return reader;
}
}
Added: webservices/axis2/branches/java/maven2/modules/jaxbri/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/maven2/modules/jaxbri/pom.xml?view=auto&rev=498455
==============================================================================
--- webservices/axis2/branches/java/maven2/modules/jaxbri/pom.xml (added)
+++ webservices/axis2/branches/java/maven2/modules/jaxbri/pom.xml Sun Jan 21 13:19:40 2007
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ !
+ ! Copyright 2006 The Apache Software Foundation.
+ !
+ ! Licensed under the Apache License, Version 2.0 (the "License");
+ ! you may not use this file except in compliance with the License.
+ ! You may obtain a copy of the License at
+ !
+ ! http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing, software
+ ! distributed under the License is distributed on an "AS IS" BASIS,
+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ! See the License for the specific language governing permissions and
+ ! limitations under the License.
+ !-->
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-parent</artifactId>
+ <version>SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>axis2-jaxbri</artifactId>
+ <name>Apache Axis 2.0 - JAXB-RI Data Binding</name>
+ <description>JAXB-RI data binding support for Axis 2.0</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axis2-codegen</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ <version>2.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-xjc</artifactId>
+ <version>2.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ </build>
+</project>
Added: webservices/axis2/branches/java/maven2/modules/jibx/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/maven2/modules/jibx/pom.xml?view=auto&rev=498455
==============================================================================
--- webservices/axis2/branches/java/maven2/modules/jibx/pom.xml (added)
+++ webservices/axis2/branches/java/maven2/modules/jibx/pom.xml Sun Jan 21 13:19:40 2007
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ !
+ ! Copyright 2006 The Apache Software Foundation.
+ !
+ ! Licensed under the Apache License, Version 2.0 (the "License");
+ ! you may not use this file except in compliance with the License.
+ ! You may obtain a copy of the License at
+ !
+ ! http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing, software
+ ! distributed under the License is distributed on an "AS IS" BASIS,
+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ! See the License for the specific language governing permissions and
+ ! limitations under the License.
+ !-->
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-parent</artifactId>
+ <version>SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>axis2-jibx</artifactId>
+ <name>Apache Axis 2.0 - JiBX Data Binding</name>
+ <description>JiBX data binding support for Axis 2.0</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axis2-codegen</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jibx</groupId>
+ <artifactId>jibx-bind</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>jibx</groupId>
+ <artifactId>jibx-run</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.bcel</groupId>
+ <artifactId>bcel</artifactId>
+ <version>5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-launcher</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>jibx</id>
+ <name>Jibx Repository</name>
+ <url>http://jibx.sourceforge.net/maven</url>
+ <layout>legacy</layout>
+ </repository>
+ </repositories>
+ <build>
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <sourceDirectory>src</sourceDirectory>
+ <testSourceDirectory>test</testSourceDirectory>
+ <testResources>
+ <testResource>
+ <targetPath>../test-resources</targetPath>
+ <directory>test-resources</directory>
+ <includes>
+ <include>**/**</include>
+ </includes>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <id>compile</id>
+ <phase>test-compile</phase>
+ <configuration>
+ <tasks>
+ <java classname="org.jibx.binding.Compile" fork="true">
+ <classpath refid="maven.runtime.classpath"/>
+ <classpath location="target/test-classes"/>
+ <arg value="-v"/>
+ <arg value="test-resources/binding/customer-binding.xml"/>
+ <arg value="test-resources/binding/library-binding.xml"/>
+ </java>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>gen-cp</id>
+ <phase>generate-test-sources</phase>
+ <configuration>
+ <tasks>
+ <property name="cp" refid="maven.runtime.classpath" />
+ <echo message="${cp}" file="target/cp.txt" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-antlr</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <dependency>
+ <groupId>antlr</groupId>
+ <artifactId>antlrall</artifactId>
+ <version>2.7.4</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: webservices/axis2/branches/java/maven2/modules/xmlbeans/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/maven2/modules/xmlbeans/pom.xml?view=auto&rev=498455
==============================================================================
--- webservices/axis2/branches/java/maven2/modules/xmlbeans/pom.xml (added)
+++ webservices/axis2/branches/java/maven2/modules/xmlbeans/pom.xml Sun Jan 21 13:19:40 2007
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ !
+ ! Copyright 2006 The Apache Software Foundation.
+ !
+ ! Licensed under the Apache License, Version 2.0 (the "License");
+ ! you may not use this file except in compliance with the License.
+ ! You may obtain a copy of the License at
+ !
+ ! http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing, software
+ ! distributed under the License is distributed on an "AS IS" BASIS,
+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ! See the License for the specific language governing permissions and
+ ! limitations under the License.
+ !-->
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-parent</artifactId>
+ <version>SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>axis2-xmlbeans</artifactId>
+ <name>Apache Axis 2.0 - XMLBeans Data Binding</name>
+ <description>XMLBeans data binding support for Axis2</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axis2-codegen</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xmlbeans</groupId>
+ <artifactId>xbean</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-launcher</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <sourceDirectory>src</sourceDirectory>
+ <testSourceDirectory>test</testSourceDirectory>
+ <testResources>
+ <testResource>
+ <targetPath>../test-resources</targetPath>
+ <directory>test-resources</directory>
+ <includes>
+ <include>**/**</include>
+ </includes>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <id>gen-cp</id>
+ <phase>generate-test-sources</phase>
+ <configuration>
+ <tasks>
+ <property name="cp" refid="maven.runtime.classpath" />
+ <echo message="${cp}" file="target/cp.txt" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-antlr</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <dependency>
+ <groupId>antlr</groupId>
+ <artifactId>antlrall</artifactId>
+ <version>2.7.4</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Modified: webservices/axis2/branches/java/maven2/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/maven2/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java?view=diff&rev=498455&r1=498454&r2=498455
==============================================================================
--- webservices/axis2/branches/java/maven2/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java (original)
+++ webservices/axis2/branches/java/maven2/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java Sun Jan 21 13:19:40 2007
@@ -28,17 +28,19 @@
import org.apache.tools.ant.taskdefs.Javac;
import org.apache.tools.ant.types.Path;
+import java.io.BufferedReader;
import java.io.File;
+import java.io.FileReader;
import java.util.HashMap;
import java.util.Map;
public abstract class WSDL2JavaSuccessTestBase extends TestCase{
- public static final String OUTPUT_LOCATION_BASE = "./out_put_classes";
+ public static final String OUTPUT_LOCATION_BASE = System.getProperty("basedir")+"/out_put_classes";
public static final String OUTPUT_LOCATION_PREFIX = "/test";
protected static int folderCount = 0;
- public static final String WSDL_BASE_DIR = "test-resources/";
- public static final String CLASSES_DIR = "/target/classes/";
+ public static final String WSDL_BASE_DIR = System.getProperty("basedir")+"/test-resources/";
+ public static final String CLASSES_DIR = System.getProperty("basedir")+"/target/classes/";
private String[] moduleNames={"xml","common","core"};
private static final String MODULE_PATH_PREFIX = "../modules/";
private static final String COMPILE_TARGET_NAME = "compile";
@@ -172,6 +174,17 @@
* @param outputLocation
*/
private void compile(String outputLocation){
+ String cp = null;
+ try{
+ BufferedReader br = new BufferedReader(new FileReader(System.getProperty("basedir")+"/target/cp.txt"));
+ cp = br.readLine();
+ }catch(Exception e){
+ // Don't care
+ }
+ if(cp == null){
+ cp = "";
+ }
+
//using the ant javac task for compilation
Javac javaCompiler = new Javac();
Project codeGenProject = new Project();
@@ -200,6 +213,9 @@
for (int i = 0; i < moduleNames.length; i++) {
classPath.add(new Path(codeGenProject,MODULE_PATH_PREFIX +moduleNames[i]+CLASSES_DIR));
}
+
+ classPath.add(new Path(codeGenProject, cp));
+
javaCompiler.setClasspath(classPath);
//set sourcePath - The generated output directories also become part of the sourcepath
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org