aQute.bnd.osgi.Jar.setManifest()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中aQute.bnd.osgi.Jar.setManifest()方法的一些代码示例,展示了Jar.setManifest()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jar.setManifest()方法的具体详情如下:
包路径:aQute.bnd.osgi.Jar
类名称:Jar
方法名:setManifest

Jar.setManifest介绍

暂无

代码示例

代码示例来源:origin: biz.aQute.bnd/bndlib

public void setManifest(File file) throws IOException {
  check();
  FileInputStream fin = new FileInputStream(file);
  try {
    Manifest m = new Manifest(fin);
    setManifest(m);
  }
  finally {
    fin.close();
  }
}

代码示例来源:origin: biz.aQute/bndlib

public void setManifest(File file) throws IOException {
  check();
  FileInputStream fin = new FileInputStream(file);
  try {
    Manifest m = new Manifest(fin);
    setManifest(m);
  }
  finally {
    fin.close();
  }
}

代码示例来源:origin: biz.aQute.bnd/bnd

public void setManifest(File file) throws IOException {
  check();
  FileInputStream fin = new FileInputStream(file);
  try {
    Manifest m = new Manifest(fin);
    setManifest(m);
  }
  finally {
    fin.close();
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public void setManifest(File file) throws IOException {
  check();
  try (InputStream fin = IO.stream(file)) {
    Manifest m = new Manifest(fin);
    setManifest(m);
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public void setManifest(File file) throws IOException {
  check();
  try (InputStream fin = IO.stream(file)) {
    Manifest m = new Manifest(fin);
    setManifest(m);
  }
}

代码示例来源:origin: com.athaydes.osgiaas/osgiaas-jar-wrap

private static File updateManifest( Jar newJar, File bundle, Manifest manifest )
    throws Exception {
  verifyDestinationFileCanBeWritten( bundle );
  newJar.setManifest( manifest );
  newJar.write( bundle );
  return bundle;
}

代码示例来源:origin: reficio/p2-maven-plugin

private static Jar getInputJarWithBlankManifest(ArtifactBundlerRequest request) throws Exception {
  File parentFolder = request.getBinaryInputFile().getParentFile();
  File jarBlankManifest = new File(parentFolder, request.getBinaryInputFile().getName() + "." + UUID.randomUUID());
  Jar jar = new Jar(request.getBinaryInputFile());
  try {
    jar.setManifest(new Manifest());
    jar.write(jarBlankManifest);
    return new Jar(jarBlankManifest);
  } finally {
    FileUtils.deleteQuietly(jarBlankManifest);
    // do not close the newly created jar, analyzer will do it
  }
}

代码示例来源:origin: biz.aQute/bndlib

if (m == null) {
  m = new Manifest();
  setManifest(m);

代码示例来源:origin: biz.aQute.bnd/bndlib

if (m == null) {
  m = new Manifest();
  setManifest(m);

代码示例来源:origin: biz.aQute.bnd/bndlib

jar.setManifest(m);
jar.calcChecksums(new String[] {
    "SHA1", "MD5"

代码示例来源:origin: biz.aQute.bnd/bnd

if (m == null) {
  m = new Manifest();
  setManifest(m);

代码示例来源:origin: reficio/p2-maven-plugin

private void populateJar(Analyzer analyzer, File outputFile) throws Exception {
  Jar jar = analyzer.getJar();
  jar.setManifest(analyzer.calcManifest());
  try {
    jar.write(outputFile);
  } finally {
    jar.close();
  }
}

代码示例来源:origin: biz.aQute.bnd/bnd

jar.setManifest(m);
jar.calcChecksums(new String[] {
    "SHA1", "MD5"

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

if (m == null) {
  m = new Manifest();
  setManifest(m);

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

if (m == null) {
  m = new Manifest();
  setManifest(m);

代码示例来源:origin: biz.aQute.bnd/bnd

jar.setManifest(last.getManifest());

代码示例来源:origin: org.ops4j.pax.tinybundles/tinybundles

jar.setManifest( manifest );

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

Jar outputDirJar = new Jar(project.getName(), project.getOutput());
outputDirJar.setReproducible(is(REPRODUCIBLE));
outputDirJar.setManifest(new Manifest());
builder.setJar(outputDirJar);

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

Jar outputDirJar = new Jar(project.getName(), project.getOutput());
outputDirJar.setReproducible(is(REPRODUCIBLE));
outputDirJar.setManifest(new Manifest());
builder.setJar(outputDirJar);

代码示例来源:origin: reficio/p2-maven-plugin

private void doSourceWrap(ArtifactBundlerRequest request, ArtifactBundlerInstructions instructions) throws Exception {
  if (request.getSourceInputFile() == null) {
    return;
  }
  log().info("\t [EXEC] " + request.getSourceInputFile().getName());
  String symbolicName = instructions.getSourceSymbolicName();
  String referencedBundleSymbolicName = instructions.getSymbolicName();
  String version;
  if (request.isShouldBundleBinaryFile()) {
    // take user-defined or proposed version
    version = instructions.getVersion();
  } else {
    // do not take user-defined and take proposed version
    // there is no bundling -> so cannot take version from instructions
    version = instructions.getProposedVersion();
  }
  String name = instructions.getSourceName();
  Jar jar = new Jar(request.getSourceInputFile());
  try {
    Manifest manifest = getManifest(jar);
    decorateSourceManifest(manifest, name, referencedBundleSymbolicName, symbolicName, version);
    jar.setManifest(manifest);
    jar.write(request.getSourceOutputFile());
  } finally {
    jar.close();
  }
}

相关文章

微信公众号

最新文章

更多