Skip to content

Commit

Permalink
Merge pull request #1334 from wolfgangmm/pkg-manager-semver
Browse files Browse the repository at this point in the history
Fix package manager to work with semver
  • Loading branch information
shabanovd authored Mar 7, 2017
2 parents b0e5d35 + 409dde7 commit f7a3862
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public RepoPackageLoader(final String repoURL) {

public Path load(final String name, final Version version) throws IOException {
String pkgURL = repoURL + "?name=" + URLEncoder.encode(name, "UTF-8") +
"&processor=" + SystemProperties.getInstance().getSystemProperty("product-semver", "2.2.0");
"&processor=" + SystemProperties.getInstance().getSystemProperty("product-version", "2.2.0");
if (version != null) {
if (version.getMin() != null) {
pkgURL += "&semver-min=" + version.getMin();
Expand Down
Binary file modified lib/core/pkg-java-fork.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/org/exist/repo/ClasspathHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private static void scanPackages(BrokerPool pool, Classpath classpath) {
private static boolean isCompatible(Package pkg) throws PackageException {
// determine the eXistdb version this package is compatible with
final Collection<ProcessorDependency> processorDeps = pkg.getProcessorDeps();
final String procVersion = SystemProperties.getInstance().getSystemProperty("product-semver", "1.0");
final String procVersion = SystemProperties.getInstance().getSystemProperty("product-version", "1.0");
PackageLoader.Version processorVersion = DEFAULT_VERSION;
for (ProcessorDependency dependency: processorDeps) {
if (Deployment.PROCESSOR_NAME.equals(dependency.getProcessor())) {
Expand Down
3 changes: 2 additions & 1 deletion src/org/exist/repo/Deployment.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ public Optional<String> installAndDeploy(final Path xar, final PackageLoader loa
}

private void checkProcessorVersion(final PackageLoader.Version version) throws PackageException {
final String procVersion = SystemProperties.getInstance().getSystemProperty("product-semver", "1.0");
final String procVersion = SystemProperties.getInstance().getSystemProperty("product-version", "1.0");

final DependencyVersion depVersion = version.getDependencyVersion();
if (!depVersion.isCompatible(procVersion)) {
throw new PackageException("Package requires eXistdb version " + version.toString() + ". " +
Expand Down

0 comments on commit f7a3862

Please sign in to comment.