You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by gm...@apache.org on 2011/11/19 17:21:44 UTC
svn commit: r1204014 - in
/cxf/trunk/distribution/src/main/release/samples/groovy_spring_support: ./
src/demo/ src/main/java/demo/spring/ src/main/java/demo/spring/client/
src/main/java/demo/spring/servlet/ src/main/resources/ src/main/webapp/
src/main...
Author: gmazza
Date: Sat Nov 19 16:21:43 2011
New Revision: 1204014
URL: http://svn.apache.org/viewvc?rev=1204014&view=rev
Log:
Better Mavenized the groovy sample; switched to the sample's parent-level web.xml
Added:
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/HelloWorld.groovy
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/HelloWorldImpl.groovy
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/client-beans.xml
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/webapp/
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/webapp/WEB-INF/
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/webapp/WEB-INF/cxf-servlet.xml
Removed:
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/demo/
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/java/demo/spring/HelloWorld.groovy
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/java/demo/spring/HelloWorldImpl.groovy
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/java/demo/spring/client/client-beans.xml
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/webapp/
Modified:
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/pom.xml
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/java/demo/spring/client/Client.java
cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/java/demo/spring/servlet/Server.java
Modified: cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/pom.xml?rev=1204014&r1=1204013&r2=1204014&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/pom.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/pom.xml Sat Nov 19 16:21:43 2011
@@ -55,26 +55,8 @@
<target>1.5</target>
</configuration>
</plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>prepare-transform</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <copy file="${basedir}/src/main/java/demo/spring/HelloWorldImpl.groovy" todir="${basedir}/target/classes/demo/spring" />
- <copy file="${basedir}/src/main/java/demo/spring/HelloWorld.groovy" todir="${basedir}/target/classes/demo/spring" />
- <copy file="${basedir}/src/main/java/demo/spring/client/client-beans.xml" todir="${basedir}/target/classes/demo/spring/client" />
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
+ <finalName>GroovySpringSupport</finalName>
</build>
<profiles>
<profile>
Modified: cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/java/demo/spring/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/java/demo/spring/client/Client.java?rev=1204014&r1=1204013&r2=1204014&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/java/demo/spring/client/Client.java (original)
+++ cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/java/demo/spring/client/Client.java Sat Nov 19 16:21:43 2011
@@ -32,7 +32,7 @@ public final class Client {
public static void main(String args[]) throws Exception {
// START SNIPPET: client
ClassPathXmlApplicationContext context
- = new ClassPathXmlApplicationContext(new String[] {"demo/spring/client/client-beans.xml"});
+ = new ClassPathXmlApplicationContext(new String[] {"client-beans.xml"});
HelloWorld client = (HelloWorld)context.getBean("client");
Modified: cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/java/demo/spring/servlet/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/java/demo/spring/servlet/Server.java?rev=1204014&r1=1204013&r2=1204014&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/java/demo/spring/servlet/Server.java (original)
+++ cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/java/demo/spring/servlet/Server.java Sat Nov 19 16:21:43 2011
@@ -46,7 +46,8 @@ public class Server {
WebAppContext webappcontext = new WebAppContext();
webappcontext.setContextPath("/");
- webappcontext.setWar("webapp");
+// webappcontext.setWar("src/main/webapp");
+ webappcontext.setWar("target/GroovySpringSupport.war");
HandlerCollection handlers = new HandlerCollection();
handlers.setHandlers(new Handler[] {webappcontext, new DefaultHandler()});
Added: cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/HelloWorld.groovy
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/HelloWorld.groovy?rev=1204014&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/HelloWorld.groovy (added)
+++ cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/HelloWorld.groovy Sat Nov 19 16:21:43 2011
@@ -0,0 +1,23 @@
+/**
+ * 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.
+ */
+package demo.spring;
+
+public interface HelloWorld {
+ String sayHi(String text)
+}
Added: cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/HelloWorldImpl.groovy
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/HelloWorldImpl.groovy?rev=1204014&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/HelloWorldImpl.groovy (added)
+++ cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/HelloWorldImpl.groovy Sat Nov 19 16:21:43 2011
@@ -0,0 +1,26 @@
+/**
+ * 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.
+ */
+package demo.spring;
+
+public class HelloWorldImpl implements HelloWorld {
+
+ public String sayHi(String text) {
+ return "Hello " + text
+ }
+}
Added: cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/client-beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/client-beans.xml?rev=1204014&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/client-beans.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/resources/client-beans.xml Sat Nov 19 16:21:43 2011
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!-- START SNIPPET: beans -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:simple="http://cxf.apache.org/simple"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd">
+
+ <bean id="client" class="demo.spring.HelloWorld"
+ factory-bean="clientFactory" factory-method="create"/>
+
+ <bean id="clientFactory" class="org.apache.cxf.frontend.ClientProxyFactoryBean">
+ <property name="serviceClass" value="demo.spring.HelloWorld"/>
+ <property name="address" value="http://localhost:9002/services/HelloWorld"/>
+ </bean>
+
+</beans>
+<!-- END SNIPPET: beans -->
Added: cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/webapp/WEB-INF/cxf-servlet.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/webapp/WEB-INF/cxf-servlet.xml?rev=1204014&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/webapp/WEB-INF/cxf-servlet.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/groovy_spring_support/src/main/webapp/WEB-INF/cxf-servlet.xml Sat Nov 19 16:21:43 2011
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!-- START SNIPPET: beans -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:simple="http://cxf.apache.org/simple"
+ xmlns:lang="http://www.springframework.org/schema/lang"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd
+http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd">
+
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
+
+<lang:groovy id="helloworld" script-source="classpath:HelloWorld.groovy" scope="prototype">
+</lang:groovy>
+<lang:groovy id="helloworldImpl" script-source="classpath:HelloWorldImpl.groovy" scope="prototype">
+</lang:groovy>
+
+ <simple:server serviceClass="demo.spring.HelloWorld" address="/HelloWorld">
+
+ <simple:serviceBean>
+ <ref bean="helloworldImpl" />
+ </simple:serviceBean>
+ </simple:server>
+
+</beans>
+<!-- END SNIPPET: beans -->