working with it).
BUNDLE_SYMBOLICNAME("Bundle-SymbolicName"), //
BUNDLE_VERSION("Bundle-Version"), //
BUNDLE_LICENSE("Bundle-License"), //
+ EXPORT_PACKAGE("Export-Package"), //
+ IMPORT_PACKAGE("Import-Package"), //
// SLC
SLC_CATEGORY("SLC-Category"), //
SLC_ORIGIN_M2("SLC-Origin-M2"), //
URL url = MavenConventionsUtils.mavenCentralUrl(artifact);
Path downloaded = download(url, originBase, artifact.toM2Coordinates() + ".jar");
- Path targetBundleDir = processBndJar(downloaded, targetCategoryBase, fileProps);
+ Path targetBundleDir = processBndJar(downloaded, targetCategoryBase, fileProps, artifact);
downloadAndProcessM2Sources(artifact, targetBundleDir);
}
}
mergeProps.put(ManifestConstants.SLC_ORIGIN_M2.toString(), artifact.toM2Coordinates());
- Path targetBundleDir = processBndJar(downloaded, targetCategoryBase, mergeProps);
+ Path targetBundleDir = processBndJar(downloaded, targetCategoryBase, mergeProps, artifact);
// logger.log(Level.DEBUG, () -> "Processed " + downloaded);
// sources
}
- protected Path processBndJar(Path downloaded, Path targetCategoryBase, Properties fileProps) {
+ protected Path processBndJar(Path downloaded, Path targetCategoryBase, Properties fileProps,
+ DefaultArtifact artifact) {
try {
Map<String, String> additionalEntries = new TreeMap<>();
additionalEntries.put(key.toString(), value);
}
} else {
+ if (artifact != null) {
+ if (!fileProps.containsKey(BUNDLE_SYMBOLICNAME.toString())) {
+ fileProps.put(BUNDLE_SYMBOLICNAME.toString(), artifact.getName());
+ }
+ if (!fileProps.containsKey(BUNDLE_VERSION.toString())) {
+ fileProps.put(BUNDLE_VERSION.toString(), artifact.getVersion());
+ }
+ }
+
+// if (!fileProps.contains(EXPORT_PACKAGE.toString())) {
+// fileProps.put(EXPORT_PACKAGE.toString(), "*");
+// }
+// if (!fileProps.contains(IMPORT_PACKAGE.toString())) {
+// fileProps.put(IMPORT_PACKAGE.toString(), "*");
+// }
try (Analyzer bndAnalyzer = new Analyzer()) {
bndAnalyzer.setProperties(fileProps);
Manifest manifest = new Manifest(jarIn.getManifest());
// remove problematic entries in MANIFEST
+ manifest.getEntries().clear();
// Set<String> entriesToDelete = new HashSet<>();
// for (String key : manifest.getEntries().keySet()) {
//// logger.log(DEBUG, "## " + key);
entries: while ((entry = jarIn.getNextJarEntry()) != null) {
if (entry.isDirectory())
continue entries;
+ if (entry.getName().endsWith(".RSA") || entry.getName().endsWith(".SF"))
+ continue entries;
Path target = targetBundleDir.resolve(entry.getName());
Files.createDirectories(target.getParent());
Files.copy(jarIn, target);
factory.processEclipseArchive(descriptorsBase.resolve("org.argeo.tp.eclipse.rcp").resolve("eclipse-rcp"));
// Maven
+ factory.processCategory(descriptorsBase.resolve("org.argeo.tp.javax"));
factory.processCategory(descriptorsBase.resolve("org.argeo.tp"));
factory.processCategory(descriptorsBase.resolve("org.argeo.tp.apache"));
factory.processCategory(descriptorsBase.resolve("org.argeo.tp.jetty"));
factory.processCategory(descriptorsBase.resolve("org.argeo.tp.sdk"));
+ factory.processCategory(descriptorsBase.resolve("org.argeo.tp.jcr"));
}
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
-<target name="tp-rap">
+<target name="argeo-tp-rap">
<locations>
<location path="${project_loc:argeo-slc-unstable}/output/a2/org.argeo.tp" type="Directory"/>
<location path="${project_loc:argeo-slc-unstable}/output/a2/org.argeo.tp.apache" type="Directory"/>
<location path="${project_loc:argeo-slc-unstable}/output/a2/org.argeo.tp.eclipse.rap" type="Directory"/>
<location path="${project_loc:argeo-slc-unstable}/output/a2/org.argeo.tp.jetty" type="Directory"/>
<location path="${project_loc:argeo-slc-unstable}/output/a2/org.argeo.tp.sdk" type="Directory"/>
+ <location path="${project_loc:argeo-slc-unstable}/output/a2/org.argeo.tp.jcr" type="Directory"/>
+ <location path="${project_loc:argeo-slc-unstable}/output/a2/org.argeo.tp.javax" type="Directory"/>
</locations>
</target>
\ No newline at end of file
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.commons.collections
+SLC-Origin-M2: commons-collections:commons-collections:3.2.2
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.commons.dbcp
+Bundle-Version: 1.4.0
+SLC-Origin-M2: commons-dbcp:commons-dbcp:1.4
+Import-Package: javax.transaction.*; resolution:="optional",\
+*
Bundle-License: Apache-2.0
Bundle-SymbolicName: org.apache.commons.fileupload
Bundle-Version: 1.4.0
-Import-Package: javax.portlet;resolution:=optional,
- *
+Import-Package: javax.portlet;resolution:=optional,\
+*
SLC-Origin-M2: commons-fileupload:commons-fileupload:1.4
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.commons.pool
+SLC-Origin-M2: commons-pool:commons-pool:1.5.7
+Export-Package: org.apache.*
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.httpcomponents.httpclient
+SLC-Origin-M2: org.apache.httpcomponents:httpclient:4.5.9
+Export-Package: org.apache.http.*;version="4.5.9"
\ No newline at end of file
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.httpcomponents.httpcore
+SLC-Origin-M2: org.apache.httpcomponents:httpcore:4.4.10
+Export-Package: org.apache.http.*;version="4.4.10"
\ No newline at end of file
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.httpcomponents.httpmime
+SLC-Origin-M2: org.apache.httpcomponents:httpmime:4.5.9
+Export-Package: org.apache.http.*;version="4.5.9"
\ No newline at end of file
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.lucene
+SLC-Origin-M2: org.apache.lucene:lucene-core:3.6.2
+Export-Package: org.apache.lucene.*
\ No newline at end of file
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.tika.core
+Bundle-Version: 1.22.0
+SLC-Origin-M2: org.apache.tika:tika-core:1.22
+SLC-Origin-ManifestNotModified: true
--- /dev/null
+Bundle-Activator: org.apache.tika.parser.internal.Activator
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.tika.parsers
+Bundle-Version: 1.22.0
+Import-Package: *;resolution:=optional
+SLC-Origin-M2: org.apache.tika:tika-parsers:1.22
+Export-Package: org.apache.tika.*
\ No newline at end of file
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.xalan
+SLC-Origin-M2: xalan:xalan:2.7.2
+Export-Package: org.apache.*
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.xalan.serializer
+SLC-Origin-M2: xalan:serializer:2.7.2
+Export-Package: org.apache.*
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.xerces
+Import-Package: sun.*;resolution:=optional,
+ *
+SLC-Origin-M2: xerces:xercesImpl:2.12.0
+Export-Package: org.apache.*
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.xml.resolver
+SLC-Origin-M2: xml-resolver:xml-resolver:1.2
+Export-Package: org.apache.*
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.xml.security
+SLC-Origin-M2: org.apache.santuario:xmlsec:2.1.2
+Export-Package: org.apache.*
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: org.apache.xmlbeans
+DynamicImport-Package: *
+Import-Package: org.apache.tools.ant.*;resolution:=optional,
+ net.sf.saxon.*;resolution:=optional,
+ com.sun.*;resolution:=optional,
+ *
+SLC-Origin-M2: org.apache.xmlbeans:xmlbeans:3.1.0
+Export-Package: org.apache.*
--- /dev/null
+Bundle-SymbolicName: javax.websocket
+SLC-Origin-M2: javax.websocket:javax.websocket-api:1.1
+SLC-Origin-ManifestNotModified: true
--- /dev/null
+Bundle-SymbolicName: javax.xml.bind
+Bundle-Version: 2.4.0
+SLC-Origin-M2: javax.xml.bind:jaxb-api:2.4.0-b180830.0359
+Export-Package: javax.*
\ No newline at end of file
--- /dev/null
+Bundle-License: Public Domain
+Bundle-SymbolicName: EDU.oswego.cs.dl.util.concurrent
+SLC-Origin-M2: concurrent:concurrent:1.3.4
+Export-Package: EDU.oswego.*
\ No newline at end of file
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: com.google.guava
+Bundle-Version: 27.1.0.jre
+SLC-Origin-M2: com.google.guava:guava:27.1-jre
+SLC-Origin-ManifestNotModified: true
--- /dev/null
+Bundle-License: Apache-2.0
+Bundle-SymbolicName: com.google.guava.failureaccess
+SLC-Origin-M2: com.google.guava:failureaccess:1.0.1
+SLC-Origin-ManifestNotModified: true
--- /dev/null
+Bundle-License: Apache-2.0
+SLC-Origin-M2: :2.18.3
+Export-Package: org.apache.jackrabbit.*;version="2.18.3"
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-api
+Bundle-SymbolicName: org.apache.jackrabbit.api
+Export-Package: org.apache.jackrabbit.*
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-core
+Bundle-SymbolicName: org.apache.jackrabbit.core
+Import-Package: org.apache.jackrabbit.test;resolution:=optional,\
+org.apache.derby.*;resolution:=optional,\
+org.h2;resolution:=optional,\
+org.postgresql;resolution:=optional,\
+oracle.jdbc;resolution:=optional,\
+org.gjt.mm.mysql;resolution:=optional,\
+com.mysql.jdbc;resolution:=optional,\
+com.microsoft.sqlserver.jdbc;resolution:=optional,\
+net.sourceforge.jtds.jdbc;resolution:=optional,\
+org.hsqldb;resolution:=optional,\
+*
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-data
+Bundle-SymbolicName: org.apache.jackrabbit.data
+Fragment-Host: org.apache.jackrabbit.core
+Import-Package: org.apache.jackrabbit.test;resolution:=optional,\
+org.apache.derby.*;resolution:=optional,\
+org.h2;resolution:=optional,\
+org.postgresql;resolution:=optional,\
+oracle.jdbc;resolution:=optional,\
+org.gjt.mm.mysql;resolution:=optional,\
+com.mysql.jdbc;resolution:=optional,\
+com.microsoft.sqlserver.jdbc;resolution:=optional,\
+net.sourceforge.jtds.jdbc;resolution:=optional,\
+org.hsqldb;resolution:=optional,\
+*
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-jcr-client
+Bundle-SymbolicName: org.apache.jackrabbit.jcr.client
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-jcr-commons
+Bundle-SymbolicName: org.apache.jackrabbit.jcr.commons
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-jcr2dav
+Bundle-SymbolicName: org.apache.jackrabbit.jcr2dav
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-jcr2spi
+Bundle-SymbolicName: org.apache.jackrabbit.jcr2spi
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-jcr-server
+Bundle-SymbolicName: org.apache.jackrabbit.server
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-jcr-servlet
+Bundle-SymbolicName: org.apache.jackrabbit.servlet
+Fragment-Host: org.apache.jackrabbit.core
+Import-Package: org.apache.jackrabbit.rmi.*;resolution:=optional,*
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-spi
+Bundle-SymbolicName: org.apache.jackrabbit.spi
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-spi-commons
+Bundle-SymbolicName: org.apache.jackrabbit.spi.commons
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-spi2dav
+Bundle-SymbolicName: org.apache.jackrabbit.spi2dav
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-spi2jcr
+Bundle-SymbolicName: org.apache.jackrabbit.spi2jcr
--- /dev/null
+SLC-Origin-M2: org.apache.jackrabbit:jackrabbit-webdav
+Bundle-SymbolicName: org.apache.jackrabbit.webdav
--- /dev/null
+Bundle-License: https://www.adobe.io/experience-manager/reference-materials/spec/jcr/2.0/license.html
+Bundle-SymbolicName: javax.jcr
+Bundle-Version: 2.0.0
+SLC-Origin-M2: javax.jcr:jcr:2.0
+SLC-Origin-ManifestNotModified: true
--- /dev/null
+Bundle-License: BSD-3-Clause
+Bundle-SymbolicName: org.hamcrest
+Bundle-Version: 2.1.0
+SLC-Origin-M2: org.hamcrest:hamcrest:2.1
+SLC-Origin-ManifestNotModified: true
--- /dev/null
+Bundle-License: EPL-1.0
+Bundle-SymbolicName: org.junit
+Bundle-Version: 4.12.0
+Import-Package: org.hamcrest;resolution:=optional,\
+org.hamcrest.core;resolution:=optional,\
+*
+SLC-Origin-M2: junit:junit:4.12
+Export-Package: junit.*;version="4.12.0"
\ No newline at end of file
--- /dev/null
+Bundle-License: MPL-2.0
+Bundle-SymbolicName: org.h2
+SLC-Origin-M2: com.h2database:h2:1.4.199
+SLC-Origin-ManifestNotModified: true