public boolean addSubsystemFileSourceFromModule ( String subsystem , FeaturePack . Module module , ArtifactFileResolver artifactFileResolver ) throws IOException { // the subsystem templates are included in module artifacts files for ( ModuleParseResult . ArtifactName artifactName : module . getModuleParseResult ( ) . getArtifacts ( ) ) { // resolve the artifact Artifact artifact = module . getFeaturePack ( ) . getArtifactResolver ( ) . getArtifact ( artifactName . getArtifact ( ) ) ; if ( artifact == null ) { throw new RuntimeException ( "Could not resolve module resource artifact " + artifactName . getArtifactCoords ( ) + " for feature pack " + module . getFeaturePack ( ) . getFeaturePackFile ( ) ) ; } // resolve the artifact file File artifactFile = artifactFileResolver . getArtifactFile ( artifact ) ; // get the subsystem template from the artifact file if ( addSubsystemFileSourceFromZipFile ( subsystem , artifactFile ) ) { return true ; } } return false ; }
Adds the file source for the specified subsystem from the specified module s artifacts .