MPHIBERNATE-9 plugin:test fails without a network connection Fixed by just checking
if maven.online.mode=true. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116066 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -47,19 +47,20 @@
|
||||
</goal>
|
||||
|
||||
<goal name="test-hibernate-aggregate-mappings">
|
||||
<j:set var="maven.hibernate.input.dir" value="${maven.build.dest},${basedir}/src/etc" />
|
||||
<attainGoal name="jar"/>
|
||||
<attainGoal name="hibernate:aggregate-mappings"/>
|
||||
|
||||
<assert:assertFileExists file="${maven.hibernate.aggregate.output.file}"/>
|
||||
|
||||
<!-- Verify that that files from both base directories are present -->
|
||||
<util:file var="rawFile" name="${maven.hibernate.aggregate.output.file}"/>
|
||||
<x:parse var="doc" xml="${rawFile}"/>
|
||||
|
||||
<x:set var="count" select="count($doc//hibernate-mapping//class)"/>
|
||||
<assert:assertEquals expected="2" value="${count.intValue().toString()}"/>
|
||||
|
||||
<j:if test="${maven.mode.online}">
|
||||
<j:set var="maven.hibernate.input.dir" value="${maven.build.dest},${basedir}/src/etc" />
|
||||
<attainGoal name="jar"/>
|
||||
<attainGoal name="hibernate:aggregate-mappings"/>
|
||||
|
||||
<assert:assertFileExists file="${maven.hibernate.aggregate.output.file}"/>
|
||||
|
||||
<!-- Verify that that files from both base directories are present -->
|
||||
<util:file var="rawFile" name="${maven.hibernate.aggregate.output.file}"/>
|
||||
<x:parse var="doc" xml="${rawFile}"/>
|
||||
|
||||
<x:set var="count" select="count($doc//hibernate-mapping//class)"/>
|
||||
<assert:assertEquals expected="2" value="${count.intValue().toString()}"/>
|
||||
</j:if>
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user