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:
epugh
2004-09-24 12:00:37 +00:00
parent 90df449c77
commit e2db19eaf4

View File

@@ -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>