war:exploded should have an explicit incremental option

未关闭 适合新手
#556 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@efegokdemir 已经在做这个了。

开始于 2026年9月24日。

  • #662 来自 @efegokdemir —— 未关闭

评估

难度
2/5
预计耗时
半天
新手友好度
68/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
java
领域
build-system

调研方向

先阅读 AbstractWarPackagingTask 以及决定文件是否进入展开的 WAR 的 copyFile 调用。跟踪 packaging 选项是如何暴露的,然后添加一个显式的 incremental 选项;启用该选项时应跳过未更改的文件;当展开的 WAR 保持等价,同时重复构建避免不必要的复制时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

enhancement
New feature, improvement proposal

When checking whether to copy files into the exploded war, the plugin is aggressively copying each file even if it is already present with an modification date that indicates that it doesn't need to be fully refreshed. This can be a significant slowdown in larger projects (For context, I'm using this on a large legacy java application where the entire non-exploded war file is about half a GB and contains ~21k files of which 787 are separate JARs, and copying the entire set in can take ~2 minutes (which I am entirely aware is probably limited by other factors outside of this plugin!)).

Forking the plugin locally and making myself a version where I just universally change the copyFile invocations in AbstractWarPackagingTask to all have onlyIfModified = true, then the overall WAR compilation time is cut down to seconds and the final output exploded war is equivalent and consistently gets updated as I make changes.

This seems like a fairly simple feature to add that has marginal benefits to people in a similar situation

主要语言
Java
星标
48
派生
103
平均合并
11 小时 20 分钟
30 天内合并 PR
15

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/maven-war-plugin 的其他 Issue

查看 apache/maven-war-plugin 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。