final Attributes attributes = manifest.getMainAttributes(); final BundleDetails.Builder builder = new BundleDetails.Builder(); builder.workingDir(narDirectory); builder.coordinate(new BundleCoordinate(group, id, version)); final String dependencyVersion = attributes.getValue(NarManifestEntry.NAR_DEPENDENCY_VERSION.getManifestName()); if (!StringUtils.isBlank(dependencyId)) { builder.dependencyCoordinate(new BundleCoordinate(dependencyGroup, dependencyId, dependencyVersion)); builder.buildBranch(attributes.getValue(NarManifestEntry.BUILD_BRANCH.getManifestName())); builder.buildTag(attributes.getValue(NarManifestEntry.BUILD_TAG.getManifestName())); builder.buildRevision(attributes.getValue(NarManifestEntry.BUILD_REVISION.getManifestName())); builder.buildTimestamp(attributes.getValue(NarManifestEntry.BUILD_TIMESTAMP.getManifestName())); builder.buildJdk(attributes.getValue(NarManifestEntry.BUILD_JDK.getManifestName())); builder.builtBy(attributes.getValue(NarManifestEntry.BUILT_BY.getManifestName())); return builder.build();
final Attributes attributes = manifest.getMainAttributes(); final BundleDetails.Builder builder = new BundleDetails.Builder(); builder.workingDir(narDirectory); builder.coordinate(new BundleCoordinate(group, id, version)); final String dependencyVersion = attributes.getValue(NarManifestEntry.NAR_DEPENDENCY_VERSION.getManifestName()); if (!StringUtils.isBlank(dependencyId)) { builder.dependencyCoordinate(new BundleCoordinate(dependencyGroup, dependencyId, dependencyVersion)); builder.buildBranch(attributes.getValue(NarManifestEntry.BUILD_BRANCH.getManifestName())); builder.buildTag(attributes.getValue(NarManifestEntry.BUILD_TAG.getManifestName())); builder.buildRevision(attributes.getValue(NarManifestEntry.BUILD_REVISION.getManifestName())); builder.buildTimestamp(attributes.getValue(NarManifestEntry.BUILD_TIMESTAMP.getManifestName())); builder.buildJdk(attributes.getValue(NarManifestEntry.BUILD_JDK.getManifestName())); builder.builtBy(attributes.getValue(NarManifestEntry.BUILT_BY.getManifestName())); return builder.build();
final Attributes attributes = manifest.getMainAttributes(); final BundleDetails.Builder builder = new BundleDetails.Builder(); builder.workingDir(narDirectory); builder.coordinate(new BundleCoordinate(group, id, version)); final String dependencyVersion = attributes.getValue(NarManifestEntry.NAR_DEPENDENCY_VERSION.getManifestName()); if (!StringUtils.isBlank(dependencyId)) { builder.dependencyCoordinate(new BundleCoordinate(dependencyGroup, dependencyId, dependencyVersion)); builder.buildBranch(attributes.getValue(NarManifestEntry.BUILD_BRANCH.getManifestName())); builder.buildTag(attributes.getValue(NarManifestEntry.BUILD_TAG.getManifestName())); builder.buildRevision(attributes.getValue(NarManifestEntry.BUILD_REVISION.getManifestName())); builder.buildTimestamp(attributes.getValue(NarManifestEntry.BUILD_TIMESTAMP.getManifestName())); builder.buildJdk(attributes.getValue(NarManifestEntry.BUILD_JDK.getManifestName())); builder.builtBy(attributes.getValue(NarManifestEntry.BUILT_BY.getManifestName())); return builder.build();
/** * Returns a bundle representing the system class loader. * * @param niFiProperties a NiFiProperties instance which will be used to obtain the default NAR library path, * which will become the working directory of the returned bundle * @return a bundle for the system class loader */ public static Bundle create(final NiFiProperties niFiProperties) { final ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader(); final String narLibraryDirectory = niFiProperties.getProperty(NiFiProperties.NAR_LIBRARY_DIRECTORY); if (StringUtils.isBlank(narLibraryDirectory)) { throw new IllegalStateException("Unable to create system bundle because " + NiFiProperties.NAR_LIBRARY_DIRECTORY + " was null or empty"); } final BundleDetails systemBundleDetails = new BundleDetails.Builder() .workingDir(new File(narLibraryDirectory)) .coordinate(SYSTEM_BUNDLE_COORDINATE) .build(); return new Bundle(systemBundleDetails, systemClassLoader); } }
/** * Returns a bundle representing the system class loader. * * @param niFiProperties a NiFiProperties instance which will be used to obtain the default NAR library path, * which will become the working directory of the returned bundle * @return a bundle for the system class loader */ public static Bundle create(final NiFiProperties niFiProperties) { final ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader(); final String narLibraryDirectory = niFiProperties.getProperty(NiFiProperties.NAR_LIBRARY_DIRECTORY); if (StringUtils.isBlank(narLibraryDirectory)) { throw new IllegalStateException("Unable to create system bundle because " + NiFiProperties.NAR_LIBRARY_DIRECTORY + " was null or empty"); } final BundleDetails systemBundleDetails = new BundleDetails.Builder() .workingDir(new File(narLibraryDirectory)) .coordinate(SYSTEM_BUNDLE_COORDINATE) .build(); return new Bundle(systemBundleDetails, systemClassLoader); } }
/** * Returns a bundle representing the system class loader. * * @param niFiProperties a NiFiProperties instance which will be used to obtain the default NAR library path, * which will become the working directory of the returned bundle * @return a bundle for the system class loader */ public static Bundle create(final NiFiProperties niFiProperties) { final ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader(); final String narLibraryDirectory = niFiProperties.getProperty(NiFiProperties.NAR_LIBRARY_DIRECTORY); if (StringUtils.isBlank(narLibraryDirectory)) { throw new IllegalStateException("Unable to create system bundle because " + NiFiProperties.NAR_LIBRARY_DIRECTORY + " was null or empty"); } final BundleDetails systemBundleDetails = new BundleDetails.Builder() .workingDir(new File(narLibraryDirectory)) .coordinate(SYSTEM_BUNDLE_COORDINATE) .build(); return new Bundle(systemBundleDetails, systemClassLoader); } }