{"id":18840292,"url":"https://github.com/ikvmnet/ikvm-maven","last_synced_at":"2025-04-04T12:06:23.201Z","repository":{"id":38271318,"uuid":"503524531","full_name":"ikvmnet/ikvm-maven","owner":"ikvmnet","description":"Support for adding dependencies on Maven artifacts to .NET projects, using IKVM.","archived":false,"fork":false,"pushed_at":"2025-03-15T16:08:23.000Z","size":617,"stargazers_count":57,"open_issues_count":9,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-28T11:08:35.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ikvmnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["NightOwl888","wasabii"],"custom":["https://www.paypal.me/ShadStorhaug"]}},"created_at":"2022-06-14T21:23:02.000Z","updated_at":"2025-03-15T16:08:26.000Z","dependencies_parsed_at":"2024-01-07T20:46:07.118Z","dependency_job_id":"1d82ed1c-edad-4995-94ca-f15d045f9efa","html_url":"https://github.com/ikvmnet/ikvm-maven","commit_stats":{"total_commits":402,"total_committers":3,"mean_commits":134.0,"dds":0.007462686567164201,"last_synced_commit":"94c60650f54d86b68cf2efe5055a08eec33addd6"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikvmnet%2Fikvm-maven","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikvmnet%2Fikvm-maven/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikvmnet%2Fikvm-maven/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikvmnet%2Fikvm-maven/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikvmnet","download_url":"https://codeload.github.com/ikvmnet/ikvm-maven/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174415,"owners_count":20896078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T02:47:05.152Z","updated_at":"2025-04-04T12:06:23.184Z","avatar_url":"https://github.com/ikvmnet.png","language":"C#","funding_links":["https://github.com/sponsors/NightOwl888","https://github.com/sponsors/wasabii","https://www.paypal.me/ShadStorhaug"],"categories":[],"sub_categories":[],"readme":"# IKVM.Maven.Sdk - IKVM support for Maven dependencies\n\n`IKVM.Maven.Sdk` is a set of MSBuild extensions for referencing Maven artifacts within .NET SDK projects.\n\nTo use, install the `IKVM.Maven.Sdk` package from NuGet, and add a `\u003cMavenReference /\u003e` element to your SDK-style project. Various Maven options are supported through item-metadata.\n\nThe simplest use case is to specify the group ID and artifact ID coordinates on the item specification, and use `Version` for the metadata.\n\n```\n\u003cItemGroup\u003e\n    \u003cMavenReference Include=\"org.foo.bar:foo-lib\" Version=\"1.2.3\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\nOptionally, use an arbitrary value for the item specification, and explicitely specify information through metadata:\n\n```\n\u003cItemGroup\u003e\n    \u003cMavenReference Include=\"foo-lib\"\u003e\n        \u003cGroupId\u003eorg.foo.bar\u003c/GroupId\u003e\n        \u003cArtifactId\u003efoo-lib\u003c/ArtifactId\u003e\n        \u003cClassifier\u003e\u003c/Classifier\u003e\n        \u003cVersion\u003e1.2.3\u003c/Version\u003e\n        \u003cScope\u003e\u003c/Scope\u003e\n        \u003cExclusions\u003e\u003c/Exclusions\u003e\n    \u003c/MavenReference\u003e\n\u003c/ItemGroup\u003e\n```\n\n## Underspecified Dependencies\n\nIt is fairly common for Java developers to underspecify dependencies within Maven. For instance, if their library is often used\nas a dependency of another aggregate package, or another library, at runtime, they can be reasonably certain classes they rely on will exist.\nAlso, if they do not exist, but the specific code path that requires dependent classes is never hit, users won't experience any issue.\n\nHowever, since IKVM is statically compiling assemblies, we need to be able to properly track dependencies between\neach assembly we might be building. We can't fully build Library A if it depends on missing classes from Library B.\nAs such, IKVM.Maven.Sdk requires that Maven dependencies be fully specified.\n\nBut, we aren't the authors of Maven artifacts. Nor can we provide local overrides for missing Maven dependencies, as the\nMaven artifacts need to be available to any user who might indirectly add a reference through a NuGet package. Therefor,\nif you encounter an underspecified or missing dependency in Maven, the proper place to fix it is in Maven. Report the missing\ndependency to the authors of the Maven library you are attempting to use.\n\n## Transitive Dependencies\n\nThe `\u003cMavenReference /\u003e` item group operates similar to a `dependency` in Maven. All transitive dependencies are\ncollected and resolved, and then the final output is produced. However, unlike `PackageReference`s, `MavenReference`s\nare collected by the final output project, and reassessed. That is, each dependent Project within your .NET\nSDK-style solution contributes its `MavenReference`s to project(s) which include it, and each project makes its own\ndependency graph. Projects do not contribute their final built assemblies up. They only contribute their dependencies.\nAllowing each project in a complicated solution to make its own local conflict resolution attempt.\n\n`PackageReference`s are supported in the same way. Projects which include `MavenReference`s do not pack the generated IKVM\nassemblies into their NuGet packages. Instead, they pack a partial POM file which only declares their dependencies. At \nbuild-time on the consumer's machine the final dependency graph is collected and generation happens. No generated\nassemblies are published to NuGet. This prevents possible conflicts between NuGet packages and incompatible base Java\ndependencies. For instance, if a package on nuget.org contained an actual copy of `commons-logging.dll`, there would be\nno guarentee that this assembly was generated with the correct options to support a different package on nuget.org that\nalso depended on commons-logging. Since the final build machine is responsible for gathering and generating the\ndependencies, these conflicts become simple Maven conflicts: multiple packages dependending on differnet versions of\nthe same thing, and Maven being unable to come up with a solution. Basically, not our problem.\n\n`MavenReference`s fully support TFMs. A `\u003cMavenReference /\u003e` element can be conditional based on TFM. As the partial\npackaged POM-file is indexed by TFM in the generated .nupkg.\n\n## Assembly Generation\n\nAssembly generation options are limited. Users are not allowed to customize the assembly name, version, or other\noptimization information that IKVM's compiler uses to produce the output. This is to ensure that NuGet packages that\ndepend on generated assemblies do so under a certain set of assumptions that can continue to be met. As non-Java\nassemblies published in NuGet packages are compiled against on certain assembly names and version, allowing different\npeople to rename or change assemblies away from their default would break the expectation that two NuGet packages that\ndepend on the same Maven artifact resolve to the same assembly name.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikvmnet%2Fikvm-maven","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikvmnet%2Fikvm-maven","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikvmnet%2Fikvm-maven/lists"}