{"action":"created","issue":{"url":"https://api.github.com/repos/ceylon/ceylon-herd/issues/262","repository_url":"https://api.github.com/repos/ceylon/ceylon-herd","labels_url":"https://api.github.com/repos/ceylon/ceylon-herd/issues/262/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon-herd/issues/262/comments","events_url":"https://api.github.com/repos/ceylon/ceylon-herd/issues/262/events","html_url":"https://github.com/ceylon/ceylon-herd/issues/262","id":138831156,"number":262,"title":"Interoperability with Ivy and Maven dependency resolvers","user":{"login":"ckulenkampff","id":923197,"avatar_url":"https://avatars.githubusercontent.com/u/923197?v=3","gravatar_id":"","url":"https://api.github.com/users/ckulenkampff","html_url":"https://github.com/ckulenkampff","followers_url":"https://api.github.com/users/ckulenkampff/followers","following_url":"https://api.github.com/users/ckulenkampff/following{/other_user}","gists_url":"https://api.github.com/users/ckulenkampff/gists{/gist_id}","starred_url":"https://api.github.com/users/ckulenkampff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckulenkampff/subscriptions","organizations_url":"https://api.github.com/users/ckulenkampff/orgs","repos_url":"https://api.github.com/users/ckulenkampff/repos","events_url":"https://api.github.com/users/ckulenkampff/events{/privacy}","received_events_url":"https://api.github.com/users/ckulenkampff/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceylon/ceylon-herd/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ceylon/ceylon-herd/milestones/21","html_url":"https://github.com/ceylon/ceylon-herd/milestones/1.23","labels_url":"https://api.github.com/repos/ceylon/ceylon-herd/milestones/21/labels","id":1506975,"number":21,"title":"1.23","description":"","creator":{"login":"FroMage","id":179265,"avatar_url":"https://avatars.githubusercontent.com/u/179265?v=3","gravatar_id":"","url":"https://api.github.com/users/FroMage","html_url":"https://github.com/FroMage","followers_url":"https://api.github.com/users/FroMage/followers","following_url":"https://api.github.com/users/FroMage/following{/other_user}","gists_url":"https://api.github.com/users/FroMage/gists{/gist_id}","starred_url":"https://api.github.com/users/FroMage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FroMage/subscriptions","organizations_url":"https://api.github.com/users/FroMage/orgs","repos_url":"https://api.github.com/users/FroMage/repos","events_url":"https://api.github.com/users/FroMage/events{/privacy}","received_events_url":"https://api.github.com/users/FroMage/received_events","type":"User","site_admin":false},"open_issues":44,"closed_issues":2,"state":"open","created_at":"2016-01-14T14:30:45Z","updated_at":"2016-03-07T08:48:57Z","due_on":null,"closed_at":null},"comments":27,"created_at":"2016-03-06T20:07:40Z","updated_at":"2016-03-08T09:58:58Z","closed_at":null,"body":"This enhancement would allow to create a flat classpath of Ceylon CARs for Java projects using Maven, Ivy or Gradle. This is possible by offering appropriate repository \"facades\" through the Herd repository server.\r\n\r\n**Maven repository structure**\r\nMaven expects the following layout (see [Maven Repository Layout - Final]) for primary artifacts:\r\n`/$groupId[0]/../${groupId[n]/$artifactId/$version/$artifactId-$version.$extension`\r\nand for secondary artifacts:\r\n`/$groupId[0]/../$groupId[n]/$artifactId/$version/$artifactId-$version-$classifier.$extension`\r\n\r\n**Ivy repository structure**\r\nIvy is more flexible and allows to specify custom patterns for artifact resolution (see [Ivy Documentation - Main Concepts]). The default patten that is used by Gradle is the following (see [Gradle DSL Reference - IvyArtifactRepository]):\r\nArtifacts: `$baseUri/[organisation]/[module]/[revision]/[type]s/[artifact](.[ext])`\r\nIvy module descriptors: `$baseUri/[organisation]/[module]/[revision]/[type]s/[artifact](.[ext])`\r\n\r\n**Meta information**\r\nTo resolve transitive dependencies both repository types require meta information. Maven uses `pom.xml`s. Ivy uses `ivy.xml`s, but can also process `pom.xml`s. Those files must be accessible via HTTP requests.\r\n\r\n**Meta information augmentation**\r\nWhen the repository server responds to a \"foreign\" meta data request for a Ceylon module, it should automatically add all implicit dependencies of the Ceylon language to the response. For interoperability these Ceylon language modules should be published to the Herd repository so that Java projects that depend on a Ceylon library do not have to provide them by themselves.\r\n\r\n**Artifact aliases**\r\nFor interoperability it would be very useful when CAR files are also available under the same name but with JAR file extension when accessed through a facade.\r\n\r\nMany IDEs automatically link source and javadoc JARs to the downloaded artifacts by searching in the module cache for files like `$artifactId-$version-$classifier-sources.$extension` (IDE dependent see [NetBeans DependencyNode]). Ceylon source artifacts should be made available in a way that this resolution works out of the box. This means that the artifacts are made available under another name than they are normally accessible in Herd.\r\n\r\n[Maven Repository Layout - Final]: https://cwiki.apache.org/confluence/display/MAVENOLD/Repository+Layout+-+Final\r\n[Ivy Documentation - Main Concepts]: http://ant.apache.org/ivy/history/latest-milestone/concept.html#patterns\r\n[Gradle DSL Reference - IvyArtifactRepository]: https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.repositories.IvyArtifactRepository.html#N217AD \r\n[NetBeans DependencyNode]: https://hg.netbeans.org/core-main/file/default/maven/src/org/netbeans/modules/maven/nodes/DependencyNode.java#l483"},"comment":{"url":"https://api.github.com/repos/ceylon/ceylon-herd/issues/comments/193697365","html_url":"https://github.com/ceylon/ceylon-herd/issues/262#issuecomment-193697365","issue_url":"https://api.github.com/repos/ceylon/ceylon-herd/issues/262","id":193697365,"user":{"login":"ckulenkampff","id":923197,"avatar_url":"https://avatars.githubusercontent.com/u/923197?v=3","gravatar_id":"","url":"https://api.github.com/users/ckulenkampff","html_url":"https://github.com/ckulenkampff","followers_url":"https://api.github.com/users/ckulenkampff/followers","following_url":"https://api.github.com/users/ckulenkampff/following{/other_user}","gists_url":"https://api.github.com/users/ckulenkampff/gists{/gist_id}","starred_url":"https://api.github.com/users/ckulenkampff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckulenkampff/subscriptions","organizations_url":"https://api.github.com/users/ckulenkampff/orgs","repos_url":"https://api.github.com/users/ckulenkampff/repos","events_url":"https://api.github.com/users/ckulenkampff/events{/privacy}","received_events_url":"https://api.github.com/users/ckulenkampff/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T09:58:58Z","updated_at":"2016-03-08T09:58:58Z","body":"But what is about other projects? Let's assume somebody wants to publish to Maven Central and Herd. In this situation it would be very important to be able to control artifactid and groupid. Otherwise the dependencies might be downloaded from the Maven repository and the Herd repository and both would get in the classpath.\r\n\r\nI begin to think that the best idea is to have an annotation that ensures compatibility. Ivy, Maven and many other tools use at least group id and artifact id for resolution. For Ceylon modules an annotation for group id might be enough, but when people want to upload JARs to Herd _and_ Maven they may want to use their existing groupid and artifact-id-scheme.\r\n\r\nSo maybe an annotation that can override group id and artifact id for repositories that support both coordinates would be the most interoperable way. The developer has to decide if she wants to use \"Herd-mode\" (Module-Version) or \"Maven-mode\" (Group-Module-Version) for module resolution."}}