From 4f8063e9b8bcd1a2831453bed6c5ff17c75e4046 Mon Sep 17 00:00:00 2001 From: Mic Date: Sat, 8 Jun 2013 21:15:34 +0800 Subject: [PATCH] #18 fixing 2 errors related to ValidatorTests - test didn't have the suffix "Tests" so it was not taken into account when running Maven in the comand line - the POM was not configured so it can find Spring config files placed inside src/test/java --- pom.xml | 68 +++---------------- ...t-config.xml => ValidatorTests-config.xml} | 0 ...ValidatorTest.java => ValidatorTests.java} | 4 +- 3 files changed, 13 insertions(+), 59 deletions(-) rename src/test/java/org/springframework/samples/petclinic/model/{ValidatorTest-config.xml => ValidatorTests-config.xml} (100%) rename src/test/java/org/springframework/samples/petclinic/model/{ValidatorTest.java => ValidatorTests.java} (93%) diff --git a/pom.xml b/pom.xml index ddeaeacd7..1cf8cca0b 100644 --- a/pom.xml +++ b/pom.xml @@ -318,9 +318,19 @@ - + install + + + + ${project.basedir}/src/test/java + + + ${project.basedir}/src/test/resources + + org.apache.maven.plugins @@ -380,20 +390,6 @@ - - org.apache.maven.plugins - maven-dependency-plugin - 2.6 - - - install - install - - sources - - - - org.apache.maven.plugins maven-assembly-plugin @@ -415,48 +411,6 @@ - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - [1.0.0,) - - enforce - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [2.4,) - - unpack - sources - - - - - - - - - - - - diff --git a/src/test/java/org/springframework/samples/petclinic/model/ValidatorTest-config.xml b/src/test/java/org/springframework/samples/petclinic/model/ValidatorTests-config.xml similarity index 100% rename from src/test/java/org/springframework/samples/petclinic/model/ValidatorTest-config.xml rename to src/test/java/org/springframework/samples/petclinic/model/ValidatorTests-config.xml diff --git a/src/test/java/org/springframework/samples/petclinic/model/ValidatorTest.java b/src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java similarity index 93% rename from src/test/java/org/springframework/samples/petclinic/model/ValidatorTest.java rename to src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java index c3877282e..e15a84907 100644 --- a/src/test/java/org/springframework/samples/petclinic/model/ValidatorTest.java +++ b/src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java @@ -20,9 +20,9 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; * (useful when upgrading to a new version of Hibernate Validator/ Bean Validation) * */ -@ContextConfiguration(locations = {"ValidatorTest-config.xml"}) +@ContextConfiguration(locations = {"ValidatorTests-config.xml"}) @RunWith(SpringJUnit4ClassRunner.class) -public class ValidatorTest { +public class ValidatorTests { @Autowired private Validator validator;