From 1683f8c891b265426d1e5b1863d759814fa7c2c4 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 7 Dec 2010 16:09:18 +0000 Subject: [PATCH] SWF-1435 Add top level pom.xml and Maven settings for verifying Maven configuration --- pom.xml | 23 ++++ settings.xml | 68 ++++++++++ spring-binding/ivy.xml | 2 +- spring-binding/pom.xml | 66 +++++++++ spring-faces/.classpath | 2 +- spring-faces/ivy.xml | 2 +- spring-faces/pom.xml | 126 +++++++++++++++--- .../webflow/FlowActionListenerTests.java | 15 +-- .../FlowViewResponseStateManagerTests.java | 3 +- .../webflow/JsfFinalResponseActionTests.java | 11 +- .../faces/webflow/JsfViewFactoryTests.java | 38 +++--- spring-js-resources/.classpath | 2 +- spring-js/.classpath | 2 +- spring-js/ivy.xml | 2 +- spring-js/pom.xml | 69 +++++++++- spring-webflow/.classpath | 2 +- spring-webflow/ivy.xml | 2 +- spring-webflow/pom.xml | 110 ++++++++++++++- 18 files changed, 482 insertions(+), 63 deletions(-) create mode 100644 pom.xml create mode 100644 settings.xml diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..f55958f6 --- /dev/null +++ b/pom.xml @@ -0,0 +1,23 @@ + + + 4.0.0 + org.springframework.webflow + spring-webflow-root + pom + Spring Web Flow + 2.3.0.BUILD-SNAPSHOT + + spring-binding + spring-js-resources + spring-js + spring-webflow + spring-faces + + + + Apache 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + diff --git a/settings.xml b/settings.xml new file mode 100644 index 00000000..15637135 --- /dev/null +++ b/settings.xml @@ -0,0 +1,68 @@ + + + + fast + + true + + + + default + + true + + + + + org.maven.central + Maven Central Repository + http://repo1.maven.org/maven2 + false + + + + org.springframework.maven.snapshot + Spring Maven Snapshot Repository + http://maven.springframework.org/snapshot + false + true + + + + org.springframework.maven.milestone + Spring Maven Milestone Repository + http://maven.springframework.org/milestone + false + + + + org.jboss.repository + JBoss Maven Repository + http://repository.jboss.org/maven2 + false + + + + java.net.release + Repository for Projects On Hosted on java.net + http://download.java.net/maven/2 + + + + maven1.java.net + http://download.java.net/maven/1 + legacy + + + + primefaces + Prime Technology Maven Repository + http://repository.prime.com.tr + default + + + + + diff --git a/spring-binding/ivy.xml b/spring-binding/ivy.xml index 046f1671..90bc3a43 100644 --- a/spring-binding/ivy.xml +++ b/spring-binding/ivy.xml @@ -30,7 +30,7 @@ - + diff --git a/spring-binding/pom.xml b/spring-binding/pom.xml index 276f4049..61c18e91 100644 --- a/spring-binding/pom.xml +++ b/spring-binding/pom.xml @@ -50,6 +50,31 @@ 1.6 true + + + org.easymock + easymock + 2.5.2 + test + + + junit + junit + 3.8.2 + test + + + org.springframework + spring-test + ${spring.version} + test + + + org.jboss.el + jboss-el + 2.0.1.GA + test + @@ -58,6 +83,47 @@ http://download.java.net/maven/2 + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + + + + org.apache.maven.plugins + maven-surefire-plugin + + junit:junit + + **/*Tests.java + + + + + maven-source-plugin + + + attach-sources + + jar + + + + + + + + src/test/java + + **/*.xml + + + + 3.0.4.RELEASE diff --git a/spring-faces/.classpath b/spring-faces/.classpath index 47086a1b..714a6147 100644 --- a/spring-faces/.classpath +++ b/spring-faces/.classpath @@ -19,7 +19,7 @@ - + diff --git a/spring-faces/ivy.xml b/spring-faces/ivy.xml index 1819ae00..d9e6993b 100644 --- a/spring-faces/ivy.xml +++ b/spring-faces/ivy.xml @@ -67,7 +67,7 @@ - + diff --git a/spring-faces/pom.xml b/spring-faces/pom.xml index c0224c29..400531f5 100644 --- a/spring-faces/pom.xml +++ b/spring-faces/pom.xml @@ -42,6 +42,12 @@ spring-webmvc ${spring.version} + + org.springframework + spring-webmvc-portlet + ${spring.version} + true + org.springframework.webflow spring-binding @@ -57,6 +63,18 @@ spring-webflow ${project.version} + + org.springframework.security + spring-security-core + 3.0.2.RELEASE + true + + + org.springframework.security + spring-security-web + 3.0.2.RELEASE + true + org.richfaces.framework richfaces-api @@ -81,6 +99,12 @@ 2.4 provided + + javax.portlet + portlet-api + 2.0 + provided + com.sun.faces jsf-api @@ -93,25 +117,91 @@ 2.0.3 provided + + com.sun.facelets + jsf-facelets + 1.1.14 + true + + + + org.easymock + easymock + 2.5.2 + test + + + junit + junit + 3.8.2 + test + + + org.springframework + spring-test + ${spring.version} + test + + + org.jboss.el + jboss-el + 2.0.1.GA + test + + + org.apache.myfaces.test + myfaces-test20 + 1.0.0-beta + test + - - - - maven2.java.net - http://download.java.net/maven/2 - - - - maven1.java.net - http://download.java.net/maven/1 - legacy - - - - maven2.jboss.org - http://repository.jboss.org/maven2 - - + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + + + + org.apache.maven.plugins + maven-surefire-plugin + + junit:junit + + **/*Tests.java + + + + + maven-source-plugin + + + attach-sources + + jar + + + + + + + + src/main/java + + **/*.xsd + + + + src/test/java + + **/*.xml + + + + 3.0.4.RELEASE diff --git a/spring-faces/src/test/java/org/springframework/faces/webflow/FlowActionListenerTests.java b/spring-faces/src/test/java/org/springframework/faces/webflow/FlowActionListenerTests.java index 98d3a3cf..c7ab1f78 100644 --- a/spring-faces/src/test/java/org/springframework/faces/webflow/FlowActionListenerTests.java +++ b/spring-faces/src/test/java/org/springframework/faces/webflow/FlowActionListenerTests.java @@ -10,7 +10,6 @@ import javax.faces.event.ActionEvent; import junit.framework.TestCase; import org.easymock.EasyMock; -import org.springframework.webflow.core.collection.AttributeMap; import org.springframework.webflow.core.collection.LocalAttributeMap; import org.springframework.webflow.engine.Flow; import org.springframework.webflow.engine.ViewState; @@ -32,7 +31,7 @@ public class FlowActionListenerTests extends TestCase { listener = new FlowActionListener(jsfMock.application().getActionListener()); RequestContextHolder.setRequestContext(context); - AttributeMap flash = new LocalAttributeMap(); + LocalAttributeMap flash = new LocalAttributeMap(); EasyMock.expect(context.getFlashScope()).andStubReturn(flash); EasyMock.expect(context.getCurrentState()).andStubReturn(new MockViewState()); EasyMock.replay(new Object[] { context }); @@ -52,10 +51,10 @@ public class FlowActionListenerTests extends TestCase { listener.processAction(event); - assertTrue("The event was not signaled", jsfMock.externalContext().getRequestMap().containsKey( - JsfView.EVENT_KEY)); - assertEquals("The event should be " + outcome, outcome, jsfMock.externalContext().getRequestMap().get( - JsfView.EVENT_KEY)); + assertTrue("The event was not signaled", + jsfMock.externalContext().getRequestMap().containsKey(JsfView.EVENT_KEY)); + assertEquals("The event should be " + outcome, outcome, + jsfMock.externalContext().getRequestMap().get(JsfView.EVENT_KEY)); } public final void testProcessAction_NullOutcome() { @@ -68,8 +67,8 @@ public class FlowActionListenerTests extends TestCase { listener.processAction(event); - assertFalse("An unexpected event was signaled", jsfMock.externalContext().getRequestMap().containsKey( - JsfView.EVENT_KEY)); + assertFalse("An unexpected event was signaled", + jsfMock.externalContext().getRequestMap().containsKey(JsfView.EVENT_KEY)); } private class MethodBindingStub extends MethodBinding { diff --git a/spring-faces/src/test/java/org/springframework/faces/webflow/FlowViewResponseStateManagerTests.java b/spring-faces/src/test/java/org/springframework/faces/webflow/FlowViewResponseStateManagerTests.java index 4ba74dc0..6ca1b5b4 100644 --- a/spring-faces/src/test/java/org/springframework/faces/webflow/FlowViewResponseStateManagerTests.java +++ b/spring-faces/src/test/java/org/springframework/faces/webflow/FlowViewResponseStateManagerTests.java @@ -4,7 +4,6 @@ import junit.framework.TestCase; import org.easymock.EasyMock; import org.springframework.web.context.support.StaticWebApplicationContext; -import org.springframework.webflow.core.collection.AttributeMap; import org.springframework.webflow.core.collection.LocalAttributeMap; import org.springframework.webflow.execution.FlowExecutionContext; import org.springframework.webflow.execution.RequestContext; @@ -38,7 +37,7 @@ public class FlowViewResponseStateManagerTests extends TestCase { public void testWriteFlowSerializedView() throws Exception { EasyMock.expect(flowExecutionContext.getKey()).andReturn(new MockFlowExecutionKey("e1s1")); - AttributeMap viewMap = new LocalAttributeMap(); + LocalAttributeMap viewMap = new LocalAttributeMap(); EasyMock.expect(requestContext.getViewScope()).andStubReturn(viewMap); EasyMock.expect(requestContext.getFlowExecutionContext()).andReturn(flowExecutionContext); EasyMock.replay(requestContext, flowExecutionContext); diff --git a/spring-faces/src/test/java/org/springframework/faces/webflow/JsfFinalResponseActionTests.java b/spring-faces/src/test/java/org/springframework/faces/webflow/JsfFinalResponseActionTests.java index ba590288..679a47b0 100644 --- a/spring-faces/src/test/java/org/springframework/faces/webflow/JsfFinalResponseActionTests.java +++ b/spring-faces/src/test/java/org/springframework/faces/webflow/JsfFinalResponseActionTests.java @@ -23,7 +23,6 @@ import org.springframework.binding.expression.support.FluentParserContext; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockServletContext; -import org.springframework.webflow.core.collection.AttributeMap; import org.springframework.webflow.core.collection.LocalAttributeMap; import org.springframework.webflow.core.collection.LocalParameterMap; import org.springframework.webflow.execution.RequestContext; @@ -75,7 +74,7 @@ public class JsfFinalResponseActionTests extends TestCase { ext.setNativeRequest(new MockHttpServletRequest()); ext.setNativeResponse(new MockHttpServletResponse()); EasyMock.expect(context.getExternalContext()).andStubReturn(ext); - AttributeMap requestMap = new LocalAttributeMap(); + LocalAttributeMap requestMap = new LocalAttributeMap(); EasyMock.expect(context.getFlashScope()).andStubReturn(requestMap); EasyMock.expect(context.getRequestParameters()).andStubReturn(new LocalParameterMap(new HashMap())); } @@ -121,15 +120,15 @@ public class JsfFinalResponseActionTests extends TestCase { public void afterPhase(PhaseEvent event) { String phaseCallback = "AFTER_" + event.getPhaseId(); - assertFalse("Phase callback " + phaseCallback + " already executed.", phaseCallbacks - .contains(phaseCallback)); + assertFalse("Phase callback " + phaseCallback + " already executed.", + phaseCallbacks.contains(phaseCallback)); phaseCallbacks.add(phaseCallback); } public void beforePhase(PhaseEvent event) { String phaseCallback = "BEFORE_" + event.getPhaseId(); - assertFalse("Phase callback " + phaseCallback + " already executed.", phaseCallbacks - .contains(phaseCallback)); + assertFalse("Phase callback " + phaseCallback + " already executed.", + phaseCallbacks.contains(phaseCallback)); phaseCallbacks.add(phaseCallback); } diff --git a/spring-faces/src/test/java/org/springframework/faces/webflow/JsfViewFactoryTests.java b/spring-faces/src/test/java/org/springframework/faces/webflow/JsfViewFactoryTests.java index e0c52ebe..fb3c9b4e 100644 --- a/spring-faces/src/test/java/org/springframework/faces/webflow/JsfViewFactoryTests.java +++ b/spring-faces/src/test/java/org/springframework/faces/webflow/JsfViewFactoryTests.java @@ -25,7 +25,6 @@ import org.springframework.binding.expression.support.FluentParserContext; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockServletContext; -import org.springframework.webflow.core.collection.AttributeMap; import org.springframework.webflow.core.collection.LocalAttributeMap; import org.springframework.webflow.core.collection.LocalParameterMap; import org.springframework.webflow.core.collection.MutableAttributeMap; @@ -46,9 +45,9 @@ public class JsfViewFactoryTests extends TestCase { private JSFMockHelper jsfMock = new JSFMockHelper(); - private RequestContext context = (RequestContext) EasyMock.createMock(RequestContext.class); + private RequestContext context = EasyMock.createMock(RequestContext.class); - private AttributeMap flashMap = new LocalAttributeMap(); + private LocalAttributeMap flashMap = new LocalAttributeMap(); private ViewHandler viewHandler = new MockViewHandler(); @@ -95,8 +94,9 @@ public class JsfViewFactoryTests extends TestCase { public final void testGetView_Create() { lifecycle = new NoExecutionLifecycle(jsfMock.lifecycle()); - factory = new JsfViewFactory(parser.parseExpression(VIEW_ID, new FluentParserContext().template().evaluate( - RequestContext.class).expectResult(String.class)), lifecycle); + factory = new JsfViewFactory(parser.parseExpression(VIEW_ID, + new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class)), + lifecycle); UIViewRoot newRoot = new UIViewRoot(); newRoot.setViewId(VIEW_ID); @@ -120,8 +120,9 @@ public class JsfViewFactoryTests extends TestCase { public final void testGetView_Restore() { lifecycle = new NoExecutionLifecycle(jsfMock.lifecycle()); - factory = new JsfViewFactory(parser.parseExpression(VIEW_ID, new FluentParserContext().template().evaluate( - RequestContext.class).expectResult(String.class)), lifecycle); + factory = new JsfViewFactory(parser.parseExpression(VIEW_ID, + new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class)), + lifecycle); UIViewRoot existingRoot = new UIViewRoot(); existingRoot.setViewId(VIEW_ID); @@ -151,8 +152,9 @@ public class JsfViewFactoryTests extends TestCase { public final void testGetView_RestoreWithBindings() { lifecycle = new NoExecutionLifecycle(jsfMock.lifecycle()); - factory = new JsfViewFactory(parser.parseExpression(VIEW_ID, new FluentParserContext().template().evaluate( - RequestContext.class).expectResult(String.class)), lifecycle); + factory = new JsfViewFactory(parser.parseExpression(VIEW_ID, + new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class)), + lifecycle); UIViewRoot existingRoot = new UIViewRoot(); existingRoot.setViewId(VIEW_ID); @@ -197,8 +199,9 @@ public class JsfViewFactoryTests extends TestCase { public final void testGetView_Restore_Ajax() { lifecycle = new NoExecutionLifecycle(jsfMock.lifecycle()); - factory = new JsfViewFactory(parser.parseExpression(VIEW_ID, new FluentParserContext().template().evaluate( - RequestContext.class).expectResult(String.class)), lifecycle); + factory = new JsfViewFactory(parser.parseExpression(VIEW_ID, + new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class)), + lifecycle); UIViewRoot existingRoot = new UIViewRoot(); existingRoot.setViewId(VIEW_ID); @@ -227,8 +230,9 @@ public class JsfViewFactoryTests extends TestCase { */ public final void testGetView_ExternalViewRoot() { lifecycle = new NoExecutionLifecycle(jsfMock.lifecycle()); - factory = new JsfViewFactory(parser.parseExpression(VIEW_ID, new FluentParserContext().template().evaluate( - RequestContext.class).expectResult(String.class)), lifecycle); + factory = new JsfViewFactory(parser.parseExpression(VIEW_ID, + new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class)), + lifecycle); UIViewRoot newRoot = new UIViewRoot(); newRoot.setViewId(VIEW_ID); @@ -263,15 +267,15 @@ public class JsfViewFactoryTests extends TestCase { public void afterPhase(PhaseEvent event) { String phaseCallback = "AFTER_" + event.getPhaseId(); - assertFalse("Phase callback " + phaseCallback + " already executed.", phaseCallbacks - .contains(phaseCallback)); + assertFalse("Phase callback " + phaseCallback + " already executed.", + phaseCallbacks.contains(phaseCallback)); phaseCallbacks.add(phaseCallback); } public void beforePhase(PhaseEvent event) { String phaseCallback = "BEFORE_" + event.getPhaseId(); - assertFalse("Phase callback " + phaseCallback + " already executed.", phaseCallbacks - .contains(phaseCallback)); + assertFalse("Phase callback " + phaseCallback + " already executed.", + phaseCallbacks.contains(phaseCallback)); phaseCallbacks.add(phaseCallback); } diff --git a/spring-js-resources/.classpath b/spring-js-resources/.classpath index 37ccae86..75627f07 100644 --- a/spring-js-resources/.classpath +++ b/spring-js-resources/.classpath @@ -12,7 +12,7 @@ - + diff --git a/spring-js/.classpath b/spring-js/.classpath index 37ccae86..75627f07 100644 --- a/spring-js/.classpath +++ b/spring-js/.classpath @@ -12,7 +12,7 @@ - + diff --git a/spring-js/ivy.xml b/spring-js/ivy.xml index 37a8847b..6091d32e 100644 --- a/spring-js/ivy.xml +++ b/spring-js/ivy.xml @@ -35,7 +35,7 @@ - + diff --git a/spring-js/pom.xml b/spring-js/pom.xml index 0b046620..a8ad7397 100644 --- a/spring-js/pom.xml +++ b/spring-js/pom.xml @@ -41,7 +41,7 @@ org.apache.tiles tiles-api - 2.1.2.osgi + 2.1.2 true @@ -74,7 +74,74 @@ ${spring.version} true + + javax.servlet + jstl + 1.2 + true + + + + org.easymock + easymock + 2.5.2 + test + + + junit + junit + 3.8.2 + test + + + org.springframework + spring-test + ${spring.version} + test + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + + + + org.apache.maven.plugins + maven-surefire-plugin + + junit:junit + + **/*Tests.java + + + + + maven-source-plugin + + + attach-sources + + jar + + + + + + + + src/test/java + + **/*.xml + **/*.js + + + + 3.0.4.RELEASE diff --git a/spring-webflow/.classpath b/spring-webflow/.classpath index e425df79..2fbbca86 100644 --- a/spring-webflow/.classpath +++ b/spring-webflow/.classpath @@ -28,7 +28,7 @@ - + diff --git a/spring-webflow/ivy.xml b/spring-webflow/ivy.xml index 6dc9805c..66fdd829 100644 --- a/spring-webflow/ivy.xml +++ b/spring-webflow/ivy.xml @@ -49,7 +49,7 @@ - + diff --git a/spring-webflow/pom.xml b/spring-webflow/pom.xml index 49423d26..43efb2f5 100644 --- a/spring-webflow/pom.xml +++ b/spring-webflow/pom.xml @@ -124,12 +124,67 @@ 3.0.2.RELEASE true + + javax.transaction + transaction-api + 1.1 + provided + + + + org.easymock + easymock + 2.5.2 + test + junit junit 3.8.2 - true - + provided + + + org.springframework + spring-test + ${spring.version} + test + + + org.jboss.el + jboss-el + 2.0.1.GA + test + + + org.hsqldb + hsqldb + 1.8.0.10 + test + + + org.apache.openjpa + openjpa-lib-5 + 1.0.2 + test + + + org.apache.openjpa + openjpa-persistence + 1.0.2 + test + + + org.apache.openjpa + openjpa-persistence-jdbc + 1.0.2 + test + + + commons-collections + commons-collections + 3.2 + test + @@ -137,7 +192,56 @@ maven2.java.net http://download.java.net/maven/2 - + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + + + + org.apache.maven.plugins + maven-surefire-plugin + + junit:junit + + **/*Tests.java + + + + + maven-source-plugin + + + attach-sources + + jar + + + + + + + + src/main/java + + **/*.xsd + + + + src/test/java + + **/*.xml + **/*.sql + **/*.properties + + + + 3.0.4.RELEASE