{
processor.process( vendorInfo );
}
catch ( IllegalStateException e )
{
throw new PlatformUnsupportedException( "NPANDAY-066-010: Illegal State: Vendor Info = " + vendorInfo, e );
}
if ( vendorInfo.getVendor() == null || vendorInfo.getFrameworkVersion() == null )
{
throw new PlatformUnsupportedException( "NPANDAY-066-019: Missing Vendor Information: " + vendorInfo );
}
logger.debug( "NPANDAY-066-003: Found Vendor: " + vendorInfo );
ExecutableRequirement executableRequirement =
ExecutableRequirement.Factory.createDefaultExecutableRequirement();
executableRequirement.setVendor( vendorInfo.getVendor() );
executableRequirement.setFrameworkVersion( vendorInfo.getFrameworkVersion() );
executableRequirement.setVendorVersion( vendorInfo.getVendorVersion() );
executableRequirement.setProfile( profile );
ExecutableConfig executableConfig = ExecutableConfig.Factory.createDefaultExecutableConfig();
executableConfig.setCommands( commands );
List<String> executablePaths = ( executableConfig.getExecutionPaths() == null ) ? new ArrayList<String>()
: executableConfig.getExecutionPaths();
if ( netHome != null )
{
logger.info( "NPANDAY-066-014: Found executable path in pom: Path = " + netHome.getAbsolutePath() );
executablePaths.add( netHome.getAbsolutePath() );
}
// should not fallback, if there are explicit configures
if ( executablePaths.isEmpty() && vendorInfo.getExecutablePaths() != null )
{
for ( File path : vendorInfo.getExecutablePaths() )
{
executablePaths.add( path.getAbsolutePath() );
}
}
if (executablePaths.isEmpty())
{
logger.info( "NPANDAY-066-016: Did not find executable path, will try system path" );
}
executableConfig.setExecutionPaths( executablePaths );
executableContext.init( executableRequirement, executableConfig, capabilityMatcher );
try
{
return executableContext.getNetExecutable();
}
catch ( ExecutionException e )
{
throw new PlatformUnsupportedException( "NPANDAY-066-001: Unable to find net executable", e );
}
}