Skip to content

Conversation

@joewiz
Copy link
Member

@joewiz joewiz commented Apr 13, 2019

DO NOT MERGE until issue below is resolved.

Update (2019-04-22): Thanks to @duncdrum, this PR is ok to merge now.

As proposed in #73 (comment), this PR establishes a new "monex-1.x" branch targeting eXist 4.x by reverting the change that assumed the eXist 5.x JMX format. This will allow us to publish at least one more release of monex, containing valuable fixes submitted since monex 0.9.17, for users of eXist 4.x.

While the result builds, it has a problem: the expath-pkg.xml produced by the build routine needs to have a semver-max=4.99.0 declaration in order to prevent installation of this package on eXist 5.x, i.e., to limit installation to eXist 4.x systems. However, maven produces the following:

<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://expath.org/ns/pkg"
         xmlns:xs="http://www.w3.org/2001/XMLSchema"
         name="http://exist-db.org/apps/monex"
         abbrev="monex"
         version="1.0.0-SNAPSHOT"
         spec="1.0">
   <title>Monex</title>
   <home>https://www.github.com/eXist-db/monex</home>
   <dependency processor="http://exist-db.org" semver-min="4.6.0"/>
   <dependency package="http://exist-db.org/apps/shared"/>
</package>

So this PR should not be merged until we find some way to get maven to output semver-max=4.99.0 for the eXist dependency.

Really, of course, we should specify both semver-max=4.99.0 AND a semver-min=3.7.0-SNAPSHOT (that was the last value before 0.9.17 when we bumped the requirement to 5.0.0, but, unfortunately, until the bug I reported that prevents concurrent use of semver-min and semver-max is solved (see also fgeorges/expath-pkg-java#8), we can only use one of these declarations, so we must choose the most important one, semver-max.

A side issue: I had expected to be able to specify eXist 4.6.1 in pom.xml, but I got this error during the mvn package, so I switched it to 4.6.0:

[INFO] ----------------------< org.exist-db.apps:monex >-----------------------
[INFO] Building Monex 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.exist-db:exist-core:jar:4.6.1 is missing, no dependency information available
[WARNING] The POM for org.exist-db:exist-testkit:jar:4.6.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.644 s
[INFO] Finished at: 2019-04-13T19:17:01-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project monex: Could not resolve dependencies for project org.exist-db.apps:monex:jar:1.0.0-SNAPSHOT: The following artifacts could not be resolved: org.exist-db:exist-core:jar:4.6.1, org.exist-db:exist-testkit:jar:4.6.1: Failure to find org.exist-db:exist-core:jar:4.6.1 in http://repo.evolvedbinary.com/repository/exist-db/ was cached in the local repository, resolution will not be reattempted until the update interval of exist-db has elapsed or updates are forced -> [Help 1]

This suggests the eXist 4.6.1 artifacts aren't in the maven repository used by the monex pom.

But again, ultimately, we need to be able to produce semver-max=4.99.0.

This reverts commit a2c7227.

# Conflicts:
#	expath-pkg.xml.tmpl
@adamretter
Copy link
Contributor

adamretter commented Apr 16, 2019

I have now added 4.6.1 to the Nexus repo.

@adamretter
Copy link
Contributor

adamretter commented Apr 16, 2019

@joewiz If you want to change semver-min and semver-max around, see the xar-assembly.xml file, which is the template that produces the various EXPath Pkg config files.

@duncdrum
Copy link
Contributor

@joewiz exist should now properly treat max-min ranges as inclusive on both 4.x and 5.x

Copy link
Contributor

@duncdrum duncdrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this line

to :

    <dependency processor="http://exist-db.org" semver-min="${min.version}" semver-max="${max.version}"/>

@joewiz joewiz changed the title WIP: Prepare monex 1.0.0 release and new monex-1.x branch Prepare monex 1.0.0 release and new monex-1.x branch Apr 23, 2019
@duncdrum
Copy link
Contributor

duncdrum commented Apr 23, 2019

@joewiz without changing the xar-assembly.xml file as per my earlier suggestion the new min.version, max.version variables in the pom.xml have no effect. For monex 1.0.0 this also means specifying a max version, to prevent users from being able to install a version on monex on exist 5.x which cannot run properly.

@joewiz
Copy link
Member Author

joewiz commented Apr 24, 2019

@duncdrum Got it! I've now changed xar-assembly.xml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants