From e0aade3c62d2e74583b149c721051486382ef2c2 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Mon, 18 Mar 2013 15:49:58 +0000 Subject: [PATCH] Add org.argeo.slc.repo.RepoUtils.relatedPdeSourcePath(String, Node) git-svn-id: https://svn.argeo.org/slc/trunk@6156 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- .../main/java/org/argeo/slc/repo/RepoUtils.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/RepoUtils.java b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/RepoUtils.java index 3d7d5920d..f00c910a4 100644 --- a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/RepoUtils.java +++ b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/RepoUtils.java @@ -311,6 +311,22 @@ public class RepoUtils implements ArgeoNames, SlcNames { } } + /** + * The path to the PDE source related to this artifact (or artifact version + * base). There may or there may not be a node at this location (the + * returned path will typically be used to test whether PDE sources are + * attached to this artifact). + */ + public static String relatedPdeSourcePath(String artifactBasePath, + Node artifactNode) throws RepositoryException { + Artifact artifact = asArtifact(artifactNode); + Artifact pdeSourceArtifact = new DefaultArtifact(artifact.getGroupId(), + artifact.getArtifactId() + ".source", artifact.getExtension(), + artifact.getVersion()); + return MavenConventionsUtils.artifactPath(artifactBasePath, + pdeSourceArtifact); + } + /** * Copy this bytes array as an artifact, relative to the root of the * repository (typically the workspace root node) -- 2.39.2