]> source.dussan.org Git - javassist.git/commitdiff
improve pom 477/head
authorJerry Lee <oldratlee@gmail.com>
Sat, 30 Dec 2023 10:53:14 +0000 (18:53 +0800)
committerJerry Lee <oldratlee@gmail.com>
Sat, 30 Dec 2023 10:58:39 +0000 (18:58 +0800)
- add `inceptionYear` element, and use it in `copyright bottom`
- add missing version declaration for `maven-gpg-plugin`
  more stable build and fix related warning message
- add `maven-enforcer-plugin`
  more straightforward error message when `maven`/`java` version is not satisfied

pom.xml

diff --git a/pom.xml b/pom.xml
index 01e9f88cc2e1ddd5add0301b0ab9f341ae68b4dc..d13fee29580472b41c4bbdc9eb420dd676b95088 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -12,6 +12,7 @@
     simple. It is a class library for editing bytecodes in Java.
   </description>
   <url>https://www.javassist.org/</url>
+  <inceptionYear>1999</inceptionYear>
 
   <licenses>
     <!-- this is the license under which javassist is usually distributed
           <attach>true</attach>
           <excludePackageNames>javassist.compiler:javassist.convert:javassist.scopedpool:javassist.bytecode.stackmap</excludePackageNames>
           <bottom><![CDATA[<i>Javassist, a Java-bytecode translator toolkit.<br>
-Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.</i>]]></bottom>
+Copyright (C) ${project.inceptionYear}- Shigeru Chiba. All Rights Reserved.</i>]]></bottom>
           <show>public</show>
           <nohelp>true</nohelp>
           <doclint>none</doclint>
           <source>8</source>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <version>3.4.1</version>
+        <executions>
+          <execution>
+            <id>enforces</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <configuration>
+              <rules>
+                <!-- official docs: https://maven.apache.org/enforcer/enforcer-rules/index.html -->
+                <requireMavenVersion>
+                  <version>3.2.5</version>
+                </requireMavenVersion>
+                <requireJavaVersion>
+                  <version>11</version>
+                </requireJavaVersion>
+              </rules>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
@@ -281,6 +306,7 @@ Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.</i>]]></bottom>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-gpg-plugin</artifactId>
+            <version>3.1.0</version>
             <configuration>
               <passphrase>${gpg.passphrase}</passphrase>
               <useAgent>${gpg.useAgent}</useAgent>
@@ -300,7 +326,7 @@ Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.</i>]]></bottom>
     </profile>
     <!-- profiles to add tools jar containing com.sun.jdi code
          needed by sample code
-         -->
+      -->
     <profile>
       <id>default-tools</id>
       <activation>