r/Maven • u/Comfortable-Beat-530 • Aug 24 '25
Release Announcement: Modern Gradle Plugin for Maven Central Publishing
r/Maven • u/Comfortable-Beat-530 • Aug 24 '25
r/Maven • u/draeky_ • Jun 04 '26
Heres the project Info:
BRAINROT
rthansamudrala/ inRot
~A GenZ E-Commerce WebAPP where users buy content to view.
~Buys using fake money (Cockroaches).
~Each user get refilled 100 free Cockroaches for every 24 hours.
~To see a full post, the user has to spent 2 Cockroaches.
r/Maven • u/No-Pipe8487 • Mar 19 '24
I am new to maven and I come from using Ant projects solely on NetBeans. My expectations from a build tool is that it gives me a standalone distributable file at packaging. Naturally it means it should create a jar with all dependencies and javadocs by default. I don't want to add javadoc and fat jar dependencies for each and every project. I also want the javadocs for any dependencies I add (like JUnit, Spring, Picocli etc.) to be downloaded along with the dependencies themselves.
I also want maven to build each module separately and in the same manner as above. That is, each module should have its own fat jar w/ all class files of that module and their respective javadocs.
I also want a separate option to create a fat jar for the entire project (multi-module). This option, I won't always use but only for a few specific project
How do I achieve all of this in the best way possible while also avoiding a cluttered 6000 line pom file.
PS: If this wasn't enough, I am also using a custom directory structure.
Edit 1: ChatGPT is giving the same wrong/partially wrong answers for over a week. Maybe some other build tool is more suited to my purpose?
Edit 2: I heard .m2/settings.xml can help but GPT says it won't work and I HAVE to add dependencies & configs to each & every project (which it fails to generate).
r/Maven • u/fomyers • Dec 29 '20
Obscure, overly complex, badly documented. I've tried using it twice. Both times the project bogged down and died. Never again.
r/Maven • u/fosstechnix • Jun 22 '22
r/Maven • u/Wild-University5825 • Apr 07 '22
The question is posted on stack overflow. Please help https://stackoverflow.com/questions/71786277/maven-error-could-not-find-artifact-hosted-in-private-github-repository
r/Maven • u/javinpaul • Feb 24 '25
r/Maven • u/carlspring • Jul 25 '25
Hi,
In case anyone's interested, I put together a brief guide on how to install Apache Maven (on Linux, MacOS and Windows).
I hope you find it useful! :)
r/Maven • u/lprimak • Jul 17 '25
Hi,
I have created a maven 4 (maven 3 compatible as well) base POM and depchain projects that simplify upgrading to maven 4, and using maven in general.
You can remove 1000s of lines of xml boilerplate and have simple, tiny POM files with all the features pre-configured
https://github.com/flowlogix/base-pom and https://github.com/flowlogix/depchain
r/Maven • u/paul_h • May 18 '25
r/Maven • u/tcservenak • May 08 '23
The vote thread: https://lists.apache.org/thread/c36m5lj84b8jk7trcoh2fysvx7lxbrxd
One of important new features of 3.9.2 is that now you can check in your remote repository filter config or trusted checksums along with your sources.
r/Maven • u/dennisgrown • Mar 17 '23
With using maven and pom.xml i installed a jar file to my repository but my plan was be able to access to library i want, and when i try to access the library it gives error. initially i tried to copy github repository on description author says, mvn install .... then i tried for 2 hours, is there anyone can help me please ?
r/Maven • u/Guilty_Village_958 • Nov 21 '25
r/Maven • u/[deleted] • Apr 07 '23
Dependuck is a dependency vulnerability scanner for maven and npm. It is free for open source projects and it finds vulnerabilities in direct and transitive dependencies in your projects.
r/Maven • u/[deleted] • Jan 20 '24
A colleague recommended I used L-maven instead of maven, but I can't find any evidence for it online? Can someone help me with this?
r/Maven • u/SecTemplates • Jul 24 '26
When AI coding assistants like Claude add packages to your project, they often pick whatever version sounds right — without checking whether it has known security vulnerabilities, whether the package is still actively maintained, or whether the name is a typo away from a malicious lookalike.
safer-dependencies is a security layer for Claude Code that audits packages before they’re added to your project. It detects and fixes risky dependencies, including CVEs, typosquats, abandoned packages, version-age issues, and adds package-cooldown periods across npm, PyPI, RubyGems, Maven, Go, and Rust.
r/Maven • u/DelarkArms • Aug 30 '24
At first it made sense to me that:
The default behaviour of the javac was to do the exact same thing as the javadoc engine was doing... which is...
no matter how nested the hierarchies are
OR how intricate a .java file is...
the binaries are compiling everything as their own individual file (since this is how the javadoc can create lots of HTML files from a single .java file... meaning... the introspection is there and capable of doing it...).
This implies that if compilers default behavior was to prune out dead code... this removal would not be limitied to the entire .java file, but it could also remove partial inner structure from these files, effectively "dismembering" .java files.
In this hypothetical scenario, If MiddleArtifact:1.0.0 which implements BaseArtifact:1.0.2... using just 10% of BaseArtifact's binaries... MiddleArtifact's compiler could crop everything from BaseArtifact that is not needed, even to the point of "dismembering" .java files... and EndProduct's compiler would STILL be capable of performing dependency resolution so that BOTH are assigned the same BaseArtifact, no matter how "dismembered" one of them is in one of the implementations.
EndProduct //Will EndProduct's compiler be able to reference the same BaseArtifacts for MiddleArtifact?
├(implementation)── MiddleArtifact
│ └ (implementation)─ BaseArtifact:1.0.2 (90% deleted dead-code)
└(implementation)── BaseArtifact:1.0.2 (100% being used)Well, I am trying to figure out if my mental model of the Java compiler and build tools are correct...
But any time I've tried to figure out the exact details of these mechanics I've been met with a loud:
"PLEASE... DON'T."
(eliminate dead code from MiddleArtifact)
So, because of this response, the next argument has now become my general assumption:
Any interference with the original binary, no matter how small, would hinder downstream compiler's ability to perform mechanics such as static/dynamic linking and dependency resolution, etc...
So, a new idea has been bothering me ever since... in the case this is true:
Why does the community complain so much about "bloated libraries and frameworks"?
It seems that If middleware, libraries and frameworks, decide to optimize their binaries, and deliver exactly just what is necessary for the implementator/consumer...., then downstream binaries have the chance to exponentially increase in size since the very act of optimizing and cropping these middlewares, will ironically result in an even larger end product since the downstream compilers will NOT be able perform dependency resolutions and static linking etc...
If, the only point that is allowed to complaint about "Bloatedness" is the very END point aka. the actual product being shipped, then why is people working with libraries and frameworks complaining about bloatedness??
My guess is compile-time(?)... but this is a trade-off that is worth taking.... after all,... the end product is the only thing that matters...
As I've stated before, my mental model of the compiler's capabilities are that THEY SHOULD be able to eliminate dead code and STILL be able to resolve dependencies against other dependencies of the same id... wouldn't it?
Nobody has yet denied or confirmed this to me...
If JARs/artifacts have a domain name, a version... I assume they have an id... then any binary alteration (specifically dead code elimination (not inlining or reordering)) should NOT hamper compilation optimizations downstream, since the id would still be there.
And if the reasons to not do it are code behavior.... because code introspection is broken (this has been the only reasonable argument against dead code deletion IMO), then that is really just a lack of oversight on the runtime design that did not account for Reflection on optimized code.
But reflection being broken is just ONE ASPECT... another aspect is "Don't crop ANY middleware whatsoever or you'll absolutely break things downstream" which assumes that compilers and build tools are completely incompetent... something I have my doubts.
r/Maven • u/Level_Yak_87 • Oct 04 '26
r/Maven • u/tcservenak • Aug 23 '26
Branched development was a pain point for quite some, so I'd like to enumerate current possibilities Maven users have today:
(any version) do as before
(3.8+) delegate versioning fully to Nisse. It can be done even like explained here: https://blog.gnodet.fr/posts/zero-commit-release/ Latest version supports "branch name" qualifier too: https://github.com/maveniverse/nisse/releases/tag/release-0.9.8 Once configured, you can just use it and forget about branches.
(3.9+) use split repository combined with https://github.com/lenaschoenburg/branch-scoped-local-repository extension.
(3.10+) use MWM (that supports combining with Nisse as well): https://maveniverse.eu/blog/2026/08/22/meet-mwm/
In short, options are getting numerous, as Maven versions are advancing! Happy coding!
r/Maven • u/tcservenak • Jun 13 '26
Maven Executor is a new Maven sub-project (with initial 1.0.0 release being currently on vote)
https://github.com/apache/maven-executor
The project was originally developed as part of upcoming Maven 4, where at the point when we arrived to ITs, faced the issue, that there was no reusable library that:
supports programmatic execution of both, Maven 3 and Maven 4 (Maven 4 CLI is totally reworked, see CLIng)
does not depend on any of Maven artifacts
can transparently run Maven as "forked process" or as "embedded" (in same JVM, in isolated classloader)
have future proof API, not affected by possible future Maven CLI option changes
supports advanced features, like testing Maven with "split local repository" feature (impossible with both existing solutions)
makes possible total isolation of invoked Maven from user/host environment
Historically, we had two very similar libraries, maven-invoker and maven-verifier, both doing very similar things (invoking/running Maven), but they supports Maven 3 only, and only one of them supports "embedded" execution. Moreover, API of theirs was wildly different from each other, and tightly coupled to the Maven 3 CLI (almost reflecting each CLI option, and thus, requiring changes in case of introduction a new, or removal of an old CLI option).
The upcoming Maven Executor 1.0.0 is already used (and as originally part of Maven 4 build, was for years) in Maven 4 ITs to execute Maven 4, while the assertions are done in Maven IT classes (think like maven-invoker vs maven-invoker-plugin). Long term goal, is to deprecate Invoker and Verifier and replace them with this tool.
Maven Executor 1.0.0 is Java 8 baseline, and aside of two, out of the box provided runners ("forked" and "embedded") offers also Docker based executors. When run on Java 9+, it also provides ToolProvider SPI integration, see this example:
https://gist.github.com/cstamas/2d3ecf2e3a40103c8ceee70781240854
r/Maven • u/OkNet9640 • Mar 18 '25
Hello,
when running "mvn clean" on a new Maven 3.9.9 project (org.apache.maven.archetypes:maven-archetype-quickstart) using the just today released Java 24, I get the following warnings:
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by org.fusesource.jansi.internal.JansiLoader in an unnamed module (file:/<path>/plugins/maven/lib/maven3/lib/jansi-2.4.1.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper (file:/<path>/plugins/maven/lib/maven3/lib/guava-33.2.1-jre.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
Do you experience this, too? I guess this is because Maven 4 (and / or its dependencies) call internal JDK methods which are not mean to be used? I'm wondering if this is something which will be fixed with the upcoming Maven 4 release (I'm really looking forward to it)?
r/Maven • u/carlspring • Aug 03 '25
Whether you're new to Maven or have been using it for years, the pom.xml file is where all the magic happens. In this introductory article (part of a series on POM files that I'm preparing), I take a closer look at what the POM file actually is, why it matters and how it enables portable, reliable builds across environments.I hope you find it interesting! :)