Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta-packages not supported (POM-only) #25

Open
genesio-systemlogic opened this issue Nov 22, 2022 · 6 comments
Open

Meta-packages not supported (POM-only) #25

genesio-systemlogic opened this issue Nov 22, 2022 · 6 comments

Comments

@genesio-systemlogic
Copy link

Hello, I am testing IKVM with Maven references in a .NET 6 project.

This reference gives me an error at build time:

<MavenReference Include="tika-parsers"> <GroupId>org.apache.tika</GroupId> <ArtifactId>tika-parsers</ArtifactId> <Version>2.6.0</Version> <Type>pom</Type> </MavenReference>

IKVM.Maven.Sdk.targets(96, 9): ArtifactNotFoundException: Could not find artifact org.apache.tika:tika-parsers:jar:2.6.0 in central (https://repo1.maven.org/maven2/)

The package I am trying to use is the following:
https://mvnrepository.com/artifact/org.apache.tika/tika-parsers/2.6.0

What am I doing wrong?

@wasabii
Copy link
Collaborator

wasabii commented Nov 22, 2022

What is Type POM?

@genesio-systemlogic
Copy link
Author

I am no Java expert but it looks like a "meta-package" with just pointers to other packages

https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#what-is-a-pom

I get the same error without the pom element

@wasabii
Copy link
Collaborator

wasabii commented Dec 6, 2022

Was this error on a Windows build machine?

@genesio-systemlogic
Copy link
Author

yes it is a windows 11 dev machine

@wasabii
Copy link
Collaborator

wasabii commented Dec 7, 2022

Yeah. Not totally sure how this is supposed to work in Maven.... but it doesn't appear we support "modules". Which are these aggregator POMs. Not sure if Maven is supposed to allow dependencies towards them, or if they're only for build time.

Either way, you can reference each module independently.

@wasabii
Copy link
Collaborator

wasabii commented Dec 7, 2022

So it looks like we could probably add this. But some changes would need to be made. We feed MavenReferences into Aether to resolve, but we default 'extension' to JAR, because what else would we expect to receive. Would have to see whether we can set that to NULL, and have it be smart enough to decide upon a JAR if available. Not sure how that's supposed to work. We can't know whether it's a meta-package until AFTER we resolve..... so how do we resolve it before we know? Will need to fool around with it to see what happens.

@wasabii wasabii changed the title ArtifactNotFoundException: Could not find artifact org.apache.tika:tika-parsers:jar:2.6.0 in central (https://repo1.maven.org/maven2/) Meta-packages not supported (POM-only) Dec 7, 2022
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

No branches or pull requests

2 participants