Skip to content
Snippets Groups Projects
Commit 4f8063e9 authored by Mic's avatar Mic
Browse files

#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
parent eb8ba79b
No related branches found
No related tags found
No related merge requests found
......@@ -318,9 +318,19 @@
</dependencies>
<!-- all Maven plugin versions are mentioned in order to guarantee the build reproducibility in the long term -->
<!-- Maven plugin versions are mentioned in order to guarantee the build reproducibility in the long term -->
<build>
<defaultGoal>install</defaultGoal>
<testResources>
<testResource>
<!-- declared explicitly so Spring config files can be placed next to their corresponding JUnit test class
(see example with ValidatorTests) -->
<directory>${project.basedir}/src/test/java</directory>
</testResource>
<testResource>
<directory>${project.basedir}/src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......@@ -380,20 +390,6 @@
</additionalProjectnatures>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>install</id>
<phase>install</phase>
<goals>
<goal>sources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
......@@ -415,48 +411,6 @@
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>enforce</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.4,)</versionRange>
<goals>
<goal>unpack</goal>
<goal>sources</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment