arturobernalg commented on code in PR #681:
URL: https://github.com/apache/maven-war-plugin/pull/681#discussion_r4667850529


##########
src/main/java/org/apache/maven/plugins/war/util/MavenBuildTimestamp.java:
##########
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.plugins.war.util;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.Properties;
+import java.util.TimeZone;
+
+/**
+ * Formats the build timestamp the same way Maven core does when interpolating 
{@code ${maven.build.timestamp}}
+ * in the POM. Duplicated from {@code maven-model-builder} because that 
computation isn't reachable from a plugin
+ * (same reasoning as MRESOURCES-99 in {@code maven-resources-plugin}): the 
value substituted into the POM itself
+ * isn't exposed through the build context a plugin can obtain from Maven core.
+ *
+ * @since 3.5.2
+ */
+public class MavenBuildTimestamp {

Review Comment:
   No good reason, it just carried over everything from the class it was 
duplicated from. Removed the whole class in ff192a3 and inlined just the one 
formatting call this PR actually needs as a private method in AbstractWarMojo.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to