- Revision
- 991
- Author
- mauro
- Date
- 2008-10-25 07:23:45 -0500 (Sat, 25 Oct 2008)
Log Message
Dropped container support in 2.1 branch, as it scheduled for 2.2.
Modified Paths
- branches/jbehave-2.1.x/build.xml
- branches/jbehave-2.1.x/examples/trader/pom.xml
- branches/jbehave-2.1.x/jbehave-core/pom.xml
- branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/scenario/ScenarioClassLoaderBehaviour.java
- branches/jbehave-2.1.x/pom.xml
Removed Paths
- branches/jbehave-2.1.x/examples/trader/src/main/java/org/jbehave/examples/trader/container/
- branches/jbehave-2.1.x/examples/trader/src/main/java/org/jbehave/examples/trader/scenarios/TraderContainerSteps.java
- branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/container/AComponent.java
- branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/container/AnotherComponent.java
- branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/container/pico/
- branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/container/spring/
- branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/ComponentNotFoundException.java
- branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/Container.java
- branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/ContainerSteps.java
- branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/InvalidContainerException.java
- branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/pico/
- branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/spring/
- branches/jbehave-2.1.x/lib/production/commons-logging-1.1.jar
- branches/jbehave-2.1.x/lib/production/picocontainer-2.6.jar
- branches/jbehave-2.1.x/lib/production/picocontainer-script-core-2.0.jar
- branches/jbehave-2.1.x/lib/production/spring-2.5.5.jar
Diff
Modified: branches/jbehave-2.1.x/build.xml (990 => 991)
--- branches/jbehave-2.1.x/build.xml 2008-10-25 12:17:51 UTC (rev 990) +++ branches/jbehave-2.1.x/build.xml 2008-10-25 12:23:45 UTC (rev 991) @@ -1,5 +1,5 @@ <project name="jbehave" default="good-distribution"> - <property name="version" value="2.0-SNAPSHOT" /> + <property name="version" value="2.1-SNAPSHOT" /> <echo message="Building version ${version}..." /> <!-- modules -->
Modified: branches/jbehave-2.1.x/examples/trader/pom.xml (990 => 991)
--- branches/jbehave-2.1.x/examples/trader/pom.xml 2008-10-25 12:17:51 UTC (rev 990) +++ branches/jbehave-2.1.x/examples/trader/pom.xml 2008-10-25 12:23:45 UTC (rev 991) @@ -9,20 +9,6 @@ <artifactId>jbehave-trader-example</artifactId> <name>JBehave Trader Example</name> - <dependencies> - <dependency> - <groupId>org.picocontainer.script</groupId> - <artifactId>picocontainer-script-core</artifactId> - <version>2.0</version> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>com.thoughtworks.xstream</groupId> - <artifactId>xstream</artifactId> - <version>1.3</version> - <scope>compile</scope> - </dependency> - </dependencies> <build> <sourceDirectory>src/main/java</sourceDirectory> <testSourceDirectory>src/behaviour/java</testSourceDirectory> @@ -48,7 +34,7 @@ <scenarioExcludes> <scenarioExclude>**/*Steps.java</scenarioExclude> </scenarioExcludes> - <skip>true</skip> + <skip>false</skip> </configuration> <goals> <goal>run-scenarios</goal> @@ -65,8 +51,6 @@ <phase>integration-test</phase> <configuration> <tasks> - <property name="runtime_classpath" refid="maven.runtime.classpath" /> - <echo message="Using runtime classpath: ${runtime_classpath}" /> <taskdef name="scenarioRunner" classname="org.jbehave.ant.ScenarioRunnerTask" classpathref="maven.runtime.classpath" /> <scenarioRunner scenarioIncludes="org/jbehave/examples/trader/scenarios/*.java" scenarioExcludes="**/*Steps.java" skip="false" />
Deleted: branches/jbehave-2.1.x/examples/trader/src/main/java/org/jbehave/examples/trader/scenarios/TraderContainerSteps.java (990 => 991)
--- branches/jbehave-2.1.x/examples/trader/src/main/java/org/jbehave/examples/trader/scenarios/TraderContainerSteps.java 2008-10-25 12:17:51 UTC (rev 990) +++ branches/jbehave-2.1.x/examples/trader/src/main/java/org/jbehave/examples/trader/scenarios/TraderContainerSteps.java 2008-10-25 12:23:45 UTC (rev 991) @@ -1,58 +0,0 @@ -package org.jbehave.examples.trader.scenarios; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.jbehave.util.JUnit4Ensure.ensureThat; - -import java.util.List; - -import org.jbehave.container.Container; -import org.jbehave.examples.trader.container.TraderContainer; -import org.jbehave.examples.trader.model.Stock; -import org.jbehave.examples.trader.model.Trader; -import org.jbehave.examples.trader.persistence.TraderPersister; -import org.jbehave.scenario.annotations.Given; -import org.jbehave.scenario.annotations.Then; -import org.jbehave.scenario.annotations.When; -import org.jbehave.scenario.steps.Steps; -import org.jbehave.scenario.steps.StepsConfiguration; - -public class TraderContainerSteps extends Steps { - - private double threshold; - private Stock stock; - private Trader trader; - private Container container; - - public TraderContainerSteps(double threshold, ClassLoader classLoader) { - super(new StepsConfiguration()); - this.threshold = threshold; - this.container = new TraderContainer(classLoader); - } - - @Given("a trader of name $name") - public void aTrader(String name) { - this.trader = container.getComponent(TraderPersister.class).retrieveTrader(name); - } - - @Given("a stock of prices $prices") - public void aStockOfPrice(List<Double> prices) { - stock = new Stock(prices, threshold); - } - - @When("the stock is traded at $price") - public void theStockIsTradedAt(double price) { - stock.tradeAt(price); - } - - @Then("the alert status should be $status") - public void theAlertStatusShouldBe(String status) { - ensureThat(stock.getStatus().name(), equalTo(status)); - } - - @Then("the trader sells all stocks") - public void theTraderSellsAllStocks() { - trader.sellAllStocks(); - ensureThat(trader.getStocks().size(), equalTo(0)); - } - -}
Modified: branches/jbehave-2.1.x/jbehave-core/pom.xml (990 => 991)
--- branches/jbehave-2.1.x/jbehave-core/pom.xml 2008-10-25 12:17:51 UTC (rev 990) +++ branches/jbehave-2.1.x/jbehave-core/pom.xml 2008-10-25 12:23:45 UTC (rev 991) @@ -16,14 +16,6 @@ <groupId>org.apache.ant</groupId> <artifactId>ant</artifactId> </dependency> - <dependency> - <groupId>org.picocontainer.script</groupId> - <artifactId>picocontainer-script-core</artifactId> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-beans</artifactId> - </dependency> </dependencies> </project>
Deleted: branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/container/AComponent.java (990 => 991)
--- branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/container/AComponent.java 2008-10-25 12:17:51 UTC (rev 990) +++ branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/container/AComponent.java 2008-10-25 12:23:45 UTC (rev 991) @@ -1,5 +0,0 @@ -package org.jbehave.container; - -public class AComponent { - -}
Deleted: branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/container/AnotherComponent.java (990 => 991)
--- branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/container/AnotherComponent.java 2008-10-25 12:17:51 UTC (rev 990) +++ branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/container/AnotherComponent.java 2008-10-25 12:23:45 UTC (rev 991) @@ -1,5 +0,0 @@ -package org.jbehave.container; - -public class AnotherComponent { - -}
Modified: branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/scenario/ScenarioClassLoaderBehaviour.java (990 => 991)
--- branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/scenario/ScenarioClassLoaderBehaviour.java 2008-10-25 12:17:51 UTC (rev 990) +++ branches/jbehave-2.1.x/jbehave-core/src/behaviour/org/jbehave/scenario/ScenarioClassLoaderBehaviour.java 2008-10-25 12:23:45 UTC (rev 991) @@ -7,7 +7,6 @@ import java.util.Arrays; import java.util.List; -import org.jbehave.container.pico.XMLPicoContainer; import org.junit.Test; public class ScenarioClassLoaderBehaviour { @@ -19,16 +18,6 @@ String scenarioClassName = MyScenario.class.getName(); assertScenarioIsInstantiated(classLoader, scenarioClassName); } - - @Test - public void canInstantiateNewContainerScenario() throws MalformedURLException { - List<String> elements = Arrays.asList(); - ClassLoader parent = Thread.currentThread().getContextClassLoader(); - ScenarioClassLoader classLoader = new ScenarioClassLoader(elements, parent); - String scenarioClassName = MyContainerScenario.class.getName(); - assertScenarioIsInstantiated(classLoader, scenarioClassName); - } - private void assertScenarioIsInstantiated(ScenarioClassLoader classLoader, String scenarioClassName) { RunnableScenario scenario = classLoader.newScenario(scenarioClassName); @@ -43,11 +32,4 @@ } } - private static class MyContainerScenario extends JUnitScenario { - - public MyContainerScenario(ClassLoader classLoader){ - new XMLPicoContainer("org/jbehave/scenario/container.xml"); - } - } - }
Deleted: branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/ComponentNotFoundException.java (990 => 991)
--- branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/ComponentNotFoundException.java 2008-10-25 12:17:51 UTC (rev 990) +++ branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/ComponentNotFoundException.java 2008-10-25 12:23:45 UTC (rev 991) @@ -1,20 +0,0 @@ -package org.jbehave.container; - - -/** - * Thrown when no component is found for a given key or type in the container - * - * @author Mauro Talevi - */ [EMAIL PROTECTED]("serial") -public class ComponentNotFoundException extends RuntimeException { - - public ComponentNotFoundException(String message) { - super(message); - } - - public ComponentNotFoundException(String message, Throwable cause) { - super(message, cause); - } - -}
Deleted: branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/Container.java (990 => 991)
--- branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/Container.java 2008-10-25 12:17:51 UTC (rev 990) +++ branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/Container.java 2008-10-25 12:23:45 UTC (rev 991) @@ -1,32 +0,0 @@ -package org.jbehave.container; - -/** - * Container represents a simple facade to access components from lightweight - * containers. Different implementations will provide adapters to different - * containers. - * - * @author Mauro Talevi - */ -public interface Container { - - /** - * Returns a component of a given type - * - * @param type the component Class type - * @return The component instance of type <T> - * @throws ComponentNotFoundException when component not found - */ - <T> T getComponent(Class<T> type); - - /** - * Returns a component for a given type and key. It first looks up the - * components by type and then from these the one with the provided key. - * - * @param type the component Class type - * @param key the component Object key - * @return The component instance of type <T> - * @throws ComponentNotFoundException when component not found - */ - <T> T getComponent(Class<T> type, Object key); - -}
Deleted: branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/ContainerSteps.java (990 => 991)
--- branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/ContainerSteps.java 2008-10-25 12:17:51 UTC (rev 990) +++ branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/ContainerSteps.java 2008-10-25 12:23:45 UTC (rev 991) @@ -1,45 +0,0 @@ -package org.jbehave.container; - -import org.jbehave.container.pico.XMLPicoContainerSteps; -import org.jbehave.scenario.steps.Steps; -import org.jbehave.scenario.steps.StepsConfiguration; - -/** - * <p> - * Abstract steps decorator which adds container support. Users need to extend - * this class and provide a concrete implementation of Container. - * </p> - * <p> - * Concrete implementations provided are [EMAIL PROTECTED] XMLPicoContainerSteps}. - * </p> - * - * @author Mauro Talevi - */ -public abstract class ContainerSteps extends Steps { - - private Container container; - - public ContainerSteps(String containerResource) { - this(containerResource, Thread.currentThread().getContextClassLoader()); - } - - public ContainerSteps(String containerResource, ClassLoader classLoader) { - this(containerResource, classLoader, new StepsConfiguration()); - } - - public ContainerSteps(String containerResource, ClassLoader classLoader, StepsConfiguration configuration) { - super(configuration); - container = createContainer(containerResource, classLoader); - } - - public <T> T component(Class<T> type) { - return container.getComponent(type); - } - - public <T> T getComponent(Class<T> type, Object key) { - return container.getComponent(type, key); - } - - protected abstract Container createContainer(String containerResource, ClassLoader classLoader); - -}
Deleted: branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/InvalidContainerException.java (990 => 991)
--- branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/InvalidContainerException.java 2008-10-25 12:17:51 UTC (rev 990) +++ branches/jbehave-2.1.x/jbehave-core/src/java/org/jbehave/container/InvalidContainerException.java 2008-10-25 12:23:45 UTC (rev 991) @@ -1,20 +0,0 @@ -package org.jbehave.container; - - -/** - * Thrown when a container cannot be created - * - * @author Mauro Talevi - */ [EMAIL PROTECTED]("serial") -public class InvalidContainerException extends RuntimeException { - - public InvalidContainerException(String message) { - super(message); - } - - public InvalidContainerException(String message, Throwable cause) { - super(message, cause); - } - -}
Deleted: branches/jbehave-2.1.x/lib/production/commons-logging-1.1.jar
(Binary files differ)
Deleted: branches/jbehave-2.1.x/lib/production/picocontainer-2.6.jar
(Binary files differ)
Deleted: branches/jbehave-2.1.x/lib/production/picocontainer-script-core-2.0.jar
(Binary files differ)
Deleted: branches/jbehave-2.1.x/lib/production/spring-2.5.5.jar
(Binary files differ)
Modified: branches/jbehave-2.1.x/pom.xml (990 => 991)
--- branches/jbehave-2.1.x/pom.xml 2008-10-25 12:17:51 UTC (rev 990) +++ branches/jbehave-2.1.x/pom.xml 2008-10-25 12:23:45 UTC (rev 991) @@ -41,19 +41,6 @@ <version>1.7.0</version> <scope>provided</scope> </dependency> - <dependency> - <!-- Optional as only used by ContainerSteps --> - <groupId>org.picocontainer.script</groupId> - <artifactId>picocontainer-script-core</artifactId> - <version>2.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-beans</artifactId> - <version>2.5.5</version> - <scope>provided</scope> - </dependency> <!-- Only used for tests --> <dependency> <groupId>org.mockito</groupId>
To unsubscribe from this list please visit:
