Allow for PU jar-file entries as relative file paths (intended for testing)
This commit is contained in:
parent
dd6efa509b
commit
60e97bcfca
|
@ -185,7 +185,7 @@ task copyBundleResources (type: Copy) {
|
|||
ext {
|
||||
bundlesTargetDir = file( "${buildDir}/bundles" )
|
||||
bundleTokens = dbBundle[db]
|
||||
ext.bundleTokens['buildDirName'] = buildDir.absolutePath
|
||||
ext.bundleTokens['buildDirName'] = project.relativePath( buildDir )
|
||||
}
|
||||
|
||||
from file('src/test/bundles/templates')
|
||||
|
|
|
@ -106,6 +106,12 @@ public class StandardArchiveDescriptorFactory implements ArchiveDescriptorFactor
|
|||
return url;
|
||||
}
|
||||
else {
|
||||
// see if the URL exists as a File (used for tests)
|
||||
final File urlAsFile = new File( url.getFile() );
|
||||
if ( urlAsFile.exists() && urlAsFile.isFile() ) {
|
||||
return url;
|
||||
}
|
||||
|
||||
// prefer to resolve the relative URL relative to the root PU URL per
|
||||
// JPA 2.0 clarification.
|
||||
final File rootUrlFile = new File( extractLocalFilePath( rootUrl ) );
|
||||
|
|
Loading…
Reference in New Issue