Author: sergeyb
Date: Thu May 19 17:13:28 2011
New Revision: 1125003

URL: http://svn.apache.org/viewvc?rev=1125003&view=rev
Log:
[CXF-3948] Adding wadl2java batch files

Added:
    cxf/trunk/distribution/src/main/release/bin/wadl2java   (with props)
    cxf/trunk/distribution/src/main/release/bin/wadl2java.bat   (with props)
Modified:
    cxf/trunk/distribution/bundle/all/pom.xml
    cxf/trunk/distribution/pom.xml
    
cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/jaxrs-toolspec.xml

Modified: cxf/trunk/distribution/bundle/all/pom.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/bundle/all/pom.xml?rev=1125003&r1=1125002&r2=1125003&view=diff
==============================================================================
--- cxf/trunk/distribution/bundle/all/pom.xml (original)
+++ cxf/trunk/distribution/bundle/all/pom.xml Thu May 19 17:13:28 2011
@@ -121,7 +121,11 @@
             <artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>
             <version>${project.version}</version>
         </dependency>
-
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>cxf-tools-wadlto-jaxrs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>cxf-tools-wsdlto-frontend-javascript</artifactId>

Modified: cxf/trunk/distribution/pom.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/pom.xml?rev=1125003&r1=1125002&r2=1125003&view=diff
==============================================================================
--- cxf/trunk/distribution/pom.xml (original)
+++ cxf/trunk/distribution/pom.xml Thu May 19 17:13:28 2011
@@ -80,7 +80,6 @@
             <artifactId>cxf-tools-wsdlto-frontend-javascript</artifactId>
             <version>${project.version}</version>
         </dependency>
-
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>cxf-tools-misctools</artifactId>
@@ -101,7 +100,11 @@
             <artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>
             <version>${project.version}</version>
         </dependency>
-
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>cxf-tools-wadlto-jaxrs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>cxf-tools-java2ws</artifactId>

Added: cxf/trunk/distribution/src/main/release/bin/wadl2java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/bin/wadl2java?rev=1125003&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/bin/wadl2java (added)
+++ cxf/trunk/distribution/src/main/release/bin/wadl2java Thu May 19 17:13:28 
2011
@@ -0,0 +1,82 @@
+#!/bin/sh
+#
+#
+#    Licensed to the Apache Software Foundation (ASF) under one
+#    or more contributor license agreements. See the NOTICE file
+#    distributed with this work for additional information
+#    regarding copyright ownership. The ASF licenses this file
+#    to you 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.
+#
+#
+# run the Apache CXF wadl2java tool 
+#
+# Check for irritating 'operating systems'.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  Darwin*) darwin=true
+           if [ -z "$JAVA_HOME" ] ; then
+             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+           fi
+           ;;
+esac
+
+me=`basename $0`
+cxf_home=$CXF_HOME
+if [ ! -f  $cxf_home/lib/cxf-manifest.jar ]; then
+    cxf_home=`dirname $0`/..
+fi
+
+cxf_jar=$cxf_home/lib/cxf-manifest.jar
+
+if [ ! -f $cxf_jar ]; then 
+    if [ ! -f ${cxf_home}/../../../target/srcbuild_env ]; then
+        echo "ERROR: Unable to find cxf-manifest.jar in $cxf_home/lib"
+        exit 1
+    else
+        . ${cxf_home}/../../../target/srcbuild_env
+        cxf_jar=${CXF_CLASSPATH}
+    fi
+fi 
+
+#
+# add the jdk's tools.jar to the classpath
+#
+
+log_config=$cxf_home/etc/logging.properties 
+if $cygwin; then
+  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+    format=mixed
+  else
+    format=windows
+  fi
+  cxf_classpath=`cygpath --$format "${cxf_jar}"`
+  if [ ! -z "${CLASSPATH}" ]; then
+    cxf_classpath=${cxf_classpath}\;`cygpath --$format --path "${CLASSPATH}"`
+  fi
+  if [ ! -z "${sun_tool_path}" ] ; then
+    cxf_classpath=${cxf_classpath}\;`cygpath --$format "${sun_tool_path}"`
+  fi
+  log_config=`cygpath --$format "$log_config"`
+else
+   cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+fi
+
+$JAVA_HOME/bin/java -Xmx128M -Djava.endorsed.dirs="${cxf_home}/lib/endorsed" 
-cp "${cxf_classpath}" -Djava.util.logging.config.file=$log_config 
org.apache.cxf.tools.wadlto.WADLToJava "$@"
+
+
+
+
+

Propchange: cxf/trunk/distribution/src/main/release/bin/wadl2java
------------------------------------------------------------------------------
    svn:executable = *

Added: cxf/trunk/distribution/src/main/release/bin/wadl2java.bat
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/bin/wadl2java.bat?rev=1125003&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/bin/wadl2java.bat (added)
+++ cxf/trunk/distribution/src/main/release/bin/wadl2java.bat Thu May 19 
17:13:28 2011
@@ -0,0 +1,58 @@
+@echo off
+rem
+rem
+rem    Licensed to the Apache Software Foundation (ASF) under one
+rem    or more contributor license agreements. See the NOTICE file
+rem    distributed with this work for additional information
+rem    regarding copyright ownership. The ASF licenses this file
+rem    to you under the Apache License, Version 2.0 (the
+rem    "License"); you may not use this file except in compliance
+rem    with the License. You may obtain a copy of the License at
+rem
+rem    http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem    Unless required by applicable law or agreed to in writing,
+rem    software distributed under the License is distributed on an
+rem    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+rem    KIND, either express or implied. See the License for the
+rem    specific language governing permissions and limitations
+rem    under the License.
+rem
+rem
+
+rem 
+rem  invoke the Apache CXF wadl2java tool
+rem 
+@setlocal
+
+if not defined CXF_HOME goto set_cxf_home
+                                                                               
                                                                              
+:cont
+if not defined JAVA_HOME goto no_java_home
+
+set TOOLS_JAR=%JAVA_HOME%\lib\tools.jar;
+
+if not exist "%CXF_HOME%\lib\cxf-manifest.jar" goto no_cxf_jar
+
+set CXF_JAR=%CXF_HOME%\lib\cxf-manifest.jar
+
+
+"%JAVA_HOME%\bin\java" -Xmx128M -Djava.endorsed.dirs="%CXF_HOME%\lib\endorsed" 
-cp "%CXF_JAR%;%TOOLS_JAR%;%CLASSPATH%" 
-Djava.util.logging.config.file="%CXF_HOME%\etc\logging.properties" 
org.apache.cxf.tools.wadlto.WADLToJava %*
+
+@endlocal
+
+goto end
+
+:no_cxf_jar
+echo ERROR: Unable to find cxf-manifest.jar in %cxf_home/lib
+goto end
+
+:no_java_home
+echo ERROR: Set JAVA_HOME to the path where the JDK (5.0 or higher) is 
installed
+goto end 
+
+:set_cxf_home
+set CXF_HOME=%~dp0..
+goto cont
+
+:end

Propchange: cxf/trunk/distribution/src/main/release/bin/wadl2java.bat
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 
cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/jaxrs-toolspec.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/jaxrs-toolspec.xml?rev=1125003&r1=1125002&r2=1125003&view=diff
==============================================================================
--- 
cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/jaxrs-toolspec.xml
 (original)
+++ 
cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/jaxrs-toolspec.xml
 Thu May 19 17:13:28 2011
@@ -114,9 +114,17 @@ Examples:
                 </associatedArgument>
             </option>
 
+            <option id="interface" maxOccurs="1">
+                <annotation>
+                    Specifies that interface is generated.
+                </annotation>
+                <switch>interface</switch>
+            </option>
+
             <option id="impl" maxOccurs="1">
                 <annotation>
                     Specifies that a dummy service implementation is generated.
+                    
                 </annotation>
                 <switch>impl</switch>
             </option>


Reply via email to