4

And there I was thinking Maven is going to make life simpler, with this granular dependency management and IDE independence (no extraneous classpath and module management required). But wait, it turns out that to run simple Ant task I need all my dependencies to have *.pom. Every. Fricking. Dependency.
I mean, sure, only if I knew which sub-dependencies they all had, but that seems like heck a lot of work to make external JAR libraries to work with Maven process.
WHY TODAY? Yesterday I had no issue: uploaded few libraries in corporate repository, refreshed index, dependencies downloaded, even had time appending javadoc to one of them and it worked. But today is the day, right? I just run simple task with maven-antrun-plugin (mvn antrun:run@<executionID>), and it starts scanning each dependency for *.pom file. I DON'T WANT THIS. Google, help me. Oh, no direct answers and clues?

Just... fuck you, Maven. With all 2 days effort I could just litter in IDE's classpath, write build.xml in no time, make normal webservice, but that would require me to also litter sources with required libraries. FML!

Comments
  • 1
    I think the problem lies in front of the keyboard!
    But I‘m also not quite sure if I understood your post correctly.
    you don’t have to include all dependencies of your dependencies.
    but all your first-level deps need to be maven artifacts (are there any libraries that aren‘t????)
    if you want to include custom jars you have to build then as maven artifacts of course ....
  • 0
    @mojo2012 I've uploaded them through Nexus with "jar" packaging, so I hoped this conventional process will be done.
    Well, I'm pretty confused as for why I have recompile something I don't have sources for. So that means I cannot include prepared JAR that was not compiled as maven artifact?
  • 0
    @vintprox Maven needs metadata to do it's job. That's normal for any packaging system. How else is it supposed to resolve which jar represents which dependency?

    So yes, you will need a pom for every library you deploy into your Nexus. A small file with essentials is sufficient for that.

    While it may seem like tedious extra work, it allows you to include other libraries and whole frameworks with ease, as you don't need care about their dependencies.
  • 0
    @Makenshi the problem is... for unknown libraries it's basically a set of "group", "artifactId", "version", so I know understand what really is the problem.
    Nexus doesn't generate pom-file, even after filling all these important maven fields. And you think what? It's double-sided coin for me.
    On one side, I see that basic fields like "group", "artifactId", "version" *are* already specified in my project's pom.xml, why I need to do double job for Maven - that I do not understand.
    On other side, Nexus OSS failed to make a simple task of generating dependency's pom-file from data I feed to it (well, for infamous repository manager it should have been obvious that Maven will request pom-files even for stub dependencies at some point).
Add Comment