spring.security.strategy=MODE_INHERITABLETHREADLOCAL
eclipse.application=org.argeo.slc.client.rcp.application
-#org.argeo.security.ui.initialPerspective=org.argeo.slc.client.ui.slcExecutionPerspective
-org.argeo.security.ui.initialPerspective=org.argeo.slc.client.ui.dist.distributionPerspective
+org.argeo.security.ui.initialPerspective=org.argeo.slc.client.ui.slcExecutionPerspective
+#org.argeo.security.ui.initialPerspective=org.argeo.slc.client.ui.dist.distributionPerspective
log4j.configuration=file:../../log4j.properties
public Object execute(ExecutionEvent event) throws ExecutionException {
File targetDirectory = new File(
- "/home/mbaudier/dev/work/120517-ArgeoTP/lib");
+ "/home/mbaudier/dev/work/120517-ArgeoTP/" + workspace);
InputStream jarStream = null;
OutputStream out = null;
if (symbolicName.startsWith("org.eclipse")
&& !symbolicName.equals("org.eclipse.osgi"))
continue bundles;
+ if(symbolicName.equals("org.polymap.openlayers.rap.widget"))
+ continue bundles;
File targetFile = new File(targetDirectory,
bundleNode.getName());
package org.argeo.slc.repo.maven;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.jar.Attributes.Name;
private String sourceWorkspace;
private String targetWorkspace;
+ private List<String> excludedBundles = new ArrayList<String>();
+
private Session origSession;
private Session targetSession;
public void run() {
try {
- NodeIterator origArtifacts = listArtifactVersions(origSession);
-
// clear target
NodeIterator nit = targetSession.getNode(artifactBasePath)
.getNodes();
while (nit.hasNext()) {
Node node = nit.nextNode();
if (node.isNodeType(NodeType.NT_FOLDER)
- || node.isNodeType(NodeType.NT_UNSTRUCTURED))
+ || node.isNodeType(NodeType.NT_UNSTRUCTURED)) {
node.remove();
+ node.getSession().save();
+ if (log.isDebugEnabled())
+ log.debug("Cleared " + node);
+ }
}
- targetSession.save();
+ NodeIterator origArtifacts = listArtifactVersions(origSession);
// process
while (origArtifacts.hasNext()) {
Node origArtifactNode = origArtifacts.nextNode();
targetSymbolicName = origSymbolicName;
}
+ // skip excluded bundles
+ if (excludedBundles.contains(targetSymbolicName))
+ return;
+
// check fragment host
if (origManifest.getMainAttributes().containsKey(
new Name(Constants.FRAGMENT_HOST))) {
if (systemPackages.contains(pkg)) {
if (!(sourceVersion.trim().equals("0") || sourceVersion
.trim().equals("0.0.0"))) {
- targetVersion = "0";
+ targetVersion = null;
importPackagesModified = true;
if (log.isDebugEnabled())
log.debug(origSymbolicName
+ sourceVersion);
}
}
- targetImportPackages.append(";version=\"")
- .append(targetVersion).append("\"");
+ if (targetVersion != null)
+ targetImportPackages.append(";version=\"")
+ .append(targetVersion).append("\"");
}
if (importPackage.hasProperty(SLC_OPTIONAL)) {
Boolean optional = importPackage.getProperty(SLC_OPTIONAL)
public void setTargetWorkspace(String targetWorkspace) {
this.targetWorkspace = targetWorkspace;
}
+
+ public void setExcludedBundles(List<String> excludedBundles) {
+ this.excludedBundles = excludedBundles;
+ }
+
}