Bogus file copy for onlyIfModified=true
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
- Lĩnh vực
- build-system
Hướng nghiên cứu
Start with AbstractWarPackagingTask.copyFile, which the issue identifies as comparing the source and destination modification times when onlyIfModified is true. Check the existing tests for this copy behavior and reproduce the case with files whose contents differ but modification times match. Done when changed content is copied despite equal timestamps and the relevant tests pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Affected version
3.5.1, possibly others
Bug description
While analysing a weird race-condition during WAR packaging, I might have discovered the responsible cause.
Symptom: On some builds, the WAR is badly packaged because modified files are not copied from the overlay to the target directory.
This seems to happen, when the overlay file has the same modify time as the target, although having been changed in the build process.
Analysis showed, that the modified overlay file is sometimes not copied, because the modification time is the same as the target file, although the file content differs.
Digging deeper revealed, that the modification timestamp has a granularity of 1 sec on the underlying filesystem (Apple HFS). So when the file modification and packaging actually run within a second, the file copy might be surpressed!
Responsible for that seems this method in AbstractWarPackagingTask:
protected boolean copyFile(
WarPackagingContext context, File source, File destination, String targetFilename, boolean onlyIfModified)
throws IOException {
context.addResource(targetFilename);
BasicFileAttributes readAttributes = Files.readAttributes(source.toPath(), BasicFileAttributes.class);
if (onlyIfModified
&& destination.lastModified()
>= readAttributes.lastModifiedTime().toMillis()) {
context.getLog().debug(" * " + targetFilename + " is up to date.");
return false;
} else {
...
Although the lastModifiedTime attribute is compared in millis, it effectively only compares in seconds, when the underlying FS hasn't that granularity. This even disregards a difference in file size.
- Ngôn ngữ chính
- Java
- Star
- 48
- Fork
- 103
- Merge trung bình
- 11 giờ 20 phút
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/maven-war-plugin
-
help wanted maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
apache/maven-war-plugin#694 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
OverlayManager.compareOverlayWithArtifact() treats null classifier as literal "null" stringCó thể đã có người làm @elharo đã nhận 146 ngày trước. Đang mởbug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
apache/maven-war-plugin#621 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DependencyInfo.hashCode() violates equals/hashCode contractCó thể đã có người làm @elharo đã nhận 146 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/maven-war-plugin#620 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
war:exploded should have an explicit incremental optionCó thể đã có người làm @efegokdemir đã nhận 64 ngày trước. Đang mởenhancement
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 68/100
apache/maven-war-plugin#556 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Multibyte UTF-8 character split by newline in MANIFEST. MFCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
apache/maven-war-plugin#654 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/maven-war-plugin
Issue tương tự
-
Android Bug Core Drape
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
organicmaps/organicmaps#14449 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openhab/openhab-addons#22512 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
objectionary/lints#1871 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
help wanted maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/maven-resolver-ant-tasks#219 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
help wanted maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
apache/maven-project-info-reports-plugin#704 ·
Maintainer thường phản hồi trong vòng 1 ngày