{"action":"created","issue":{"url":"https://api.github.com/repos/bndtools/bnd/issues/2315","repository_url":"https://api.github.com/repos/bndtools/bnd","labels_url":"https://api.github.com/repos/bndtools/bnd/issues/2315/labels{/name}","comments_url":"https://api.github.com/repos/bndtools/bnd/issues/2315/comments","events_url":"https://api.github.com/repos/bndtools/bnd/issues/2315/events","html_url":"https://github.com/bndtools/bnd/issues/2315","id":298586068,"number":2315,"title":"bnd-baseline-maven-plugin doesn't baseline against version ranges","user":{"login":"anselmov","id":13489563,"avatar_url":"https://avatars1.githubusercontent.com/u/13489563?v=4","gravatar_id":"","url":"https://api.github.com/users/anselmov","html_url":"https://github.com/anselmov","followers_url":"https://api.github.com/users/anselmov/followers","following_url":"https://api.github.com/users/anselmov/following{/other_user}","gists_url":"https://api.github.com/users/anselmov/gists{/gist_id}","starred_url":"https://api.github.com/users/anselmov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anselmov/subscriptions","organizations_url":"https://api.github.com/users/anselmov/orgs","repos_url":"https://api.github.com/users/anselmov/repos","events_url":"https://api.github.com/users/anselmov/events{/privacy}","received_events_url":"https://api.github.com/users/anselmov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-20T13:03:30Z","updated_at":"2018-02-20T15:51:54Z","closed_at":null,"author_association":"NONE","body":"As an eclipse bndtools user, I expect the bnd-baseline-maven-plugin to work similarly and baseline against the highest version (latest).\r\n\r\nMy test is based on [valid-no-previous integration-test](https://github.com/bndtools/bnd/tree/master/maven/bnd-baseline-maven-plugin/src/test/resources/integration-test/test/valid-no-previous). I did the following steps:\r\n\r\n1. change the project version to **1.0.0,** run **mvn install** (to local repository), build success\r\n2. same code, change the project version to **3.0.0**, run **mvn install**, build success\r\n3. same code, change the project version to **2.0.0**, run **mvn install**, build success\r\n\r\nThe step 3 should fail but it baselines against **1.0.0** because the default base search range is: \r\n\r\n> (,${project.version})\r\n\r\nI want to baseline against the highest version, so when I override the range in the plugin configuration:\r\n```\r\n<configuration>\r\n    <base>\r\n          <groupId>${project.groupId}</groupId>\r\n          <artifactId>${project.artifactId}</artifactId>\r\n          <version>(${project.version},)</version>\r\n    </base>\r\n</configuration>\r\n```\r\nI clean the .m2 repository, redo steps 1 and 2, then **mvn verify** and I get \r\n```\r\nFailed to execute goal biz.aQute.bnd:bnd-baseline-maven-plugin:4.0.0-SNAPSHOT:baseline (baseline) on project test: Unable to locate a previous version of the artifact: Could not find artifact org.example:test:jar:(2.0.0,) in central (file:///Users/anselmov/.m2/repository) \r\n```\r\n\r\nI'm not sure if my expectations are too high, but version ranges seem not handled properly. Any help is appreciated.\r\n\r\nmvn version: 3.3.3\r\njava version: 1.8.0_152-ea\r\nOSX 10.9.5\r\n"},"comment":{"url":"https://api.github.com/repos/bndtools/bnd/issues/comments/367021868","html_url":"https://github.com/bndtools/bnd/issues/2315#issuecomment-367021868","issue_url":"https://api.github.com/repos/bndtools/bnd/issues/2315","id":367021868,"user":{"login":"anselmov","id":13489563,"avatar_url":"https://avatars1.githubusercontent.com/u/13489563?v=4","gravatar_id":"","url":"https://api.github.com/users/anselmov","html_url":"https://github.com/anselmov","followers_url":"https://api.github.com/users/anselmov/followers","following_url":"https://api.github.com/users/anselmov/following{/other_user}","gists_url":"https://api.github.com/users/anselmov/gists{/gist_id}","starred_url":"https://api.github.com/users/anselmov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anselmov/subscriptions","organizations_url":"https://api.github.com/users/anselmov/orgs","repos_url":"https://api.github.com/users/anselmov/repos","events_url":"https://api.github.com/users/anselmov/events{/privacy}","received_events_url":"https://api.github.com/users/anselmov/received_events","type":"User","site_admin":false},"created_at":"2018-02-20T15:51:54Z","updated_at":"2018-02-20T15:51:54Z","author_association":"NONE","body":"`(2.0.0,)` means `> 2.0.0`, I did some tests with:\r\nhttps://github.com/bndtools/bnd/blob/f553787d0e339948b01085545e291f63d0e9175c/maven/bnd-baseline-maven-plugin/src/main/java/aQute/bnd/maven/baseline/plugin/BaselineMojo.java#L184\r\nThere is a workaround when the default range is \"any version\" like:\r\n`Artifact toCheck = toFind.setVersion(\"[0,)\");`\r\n\r\nbtw: do you know why this single change makes integration-tests fail? \r\n\r\n> Execution integration-test of goal org.apache.maven.plugins:maven-invoker-plugin:3.0.1:run failed: character 27 is not allowed in output\r\n\r\n"}}
{"actor":{"display_login":"anselmov"}}