RFR: update README and optimize maven configurations of jol

qudongfang qudongfang at gmail.com
Wed Aug 1 01:54:50 UTC 2018


Hi, there

I found some warnings when I try to build jol. The README is outdated too.

I think it would be better if fixed.

The changeset includes two commits:

 1. changes about maven configurations.
 2. changes about README.

Could some help me with this?

webrev file link stored in google drive 
<https://drive.google.com/open?id=1YRuQkHhB5aYKGVJ1_oZ_OdnLB7xLuKpF>

-- 
Best regards,

QU DONGFANG

-------------- next part --------------
# HG changeset patch
# User qudongfang
# Date 1533020646 -28800
#      Tue Jul 31 15:04:06 2018 +0800
# Branch update_maven_config
# Node ID dc464f5c5a68b0013ee31cda5f511d73b9bbacd0
# Parent  03064c057dc95f1c6c8f706476b13fb3dd30bbe0
1. replace 'prerequisites' with 'maven-enforcer-plugin';
2. remove unused config in 'maven-license-plugin';
3. ignore '*.class' files generated by test.

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -2,3 +2,4 @@
 .idea/
 *.iml
 target/
+*/*.class
diff --git a/jol-cli/pom.xml b/jol-cli/pom.xml
--- a/jol-cli/pom.xml
+++ b/jol-cli/pom.xml
@@ -119,10 +119,7 @@
                             <header>file:///${project.basedir}/../src/license/gpl_cpe/header.txt</header>
                             <skipExistingHeaders>true</skipExistingHeaders>
                             <strictCheck>true</strictCheck>
-                            <basedir>src/main/</basedir>
-                            <mapping>
-                                <java>PHP</java>
-                            </mapping>
+                            <basedir>src/main/java/</basedir>
                         </configuration>
                     </execution>
                 </executions>
diff --git a/jol-core/pom.xml b/jol-core/pom.xml
--- a/jol-core/pom.xml
+++ b/jol-core/pom.xml
@@ -92,10 +92,7 @@
                             <header>file:///${project.basedir}/../src/license/gpl_cpe/header.txt</header>
                             <skipExistingHeaders>true</skipExistingHeaders>
                             <strictCheck>true</strictCheck>
-                            <basedir>src/main/</basedir>
-                            <mapping>
-                                <java>PHP</java>
-                            </mapping>
+                            <basedir>src/main/java/</basedir>
                         </configuration>
                     </execution>
                 </executions>
diff --git a/jol-samples/pom.xml b/jol-samples/pom.xml
--- a/jol-samples/pom.xml
+++ b/jol-samples/pom.xml
@@ -104,10 +104,7 @@
                             <header>file:///${project.basedir}/../src/license/bsd/header.txt</header>
                             <skipExistingHeaders>true</skipExistingHeaders>
                             <strictCheck>true</strictCheck>
-                            <basedir>src/main/</basedir>
-                            <mapping>
-                                <java>PHP</java>
-                            </mapping>
+                            <basedir>src/main/java/</basedir>
                         </configuration>
                     </execution>
                 </executions>
diff --git a/pom.xml b/pom.xml
--- a/pom.xml
+++ b/pom.xml
@@ -69,10 +69,6 @@
         <module>jol-samples</module>
     </modules>
 
-    <prerequisites>
-        <maven>3.0</maven>
-    </prerequisites>
-
     <dependencyManagement>
         <dependencies>
             <dependency>
@@ -118,6 +114,28 @@
                 </plugin>
             </plugins>
         </pluginManagement>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-enforcer-plugin</artifactId>
+                <version>3.0.0-M1</version>
+                <executions>
+                    <execution>
+                        <id>enforce-maven</id>
+                        <goals>
+                            <goal>enforce</goal>
+                        </goals>
+                        <configuration>
+                            <rules>
+                                <requireMavenVersion>
+                                    <version>3.0</version>
+                                </requireMavenVersion>
+                            </rules>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
     </build>
 
     <properties>
# HG changeset patch
# User qudongfang
# Date 1533021669 -28800
#      Tue Jul 31 15:21:09 2018 +0800
# Branch update_maven_config
# Node ID 71a7dbb0340f4e5e658fad8011aeabe9f841add0
# Parent  dc464f5c5a68b0013ee31cda5f511d73b9bbacd0
update README according to the implements

diff --git a/README b/README
--- a/README
+++ b/README
@@ -2,9 +2,11 @@
 ---------------------------------------------------------------------
 
 These are the tiny tools to analyze object layout schemes in JVMs.
-These tools are using Unsafe heavily to deduce the *actual* object
-layout and footprint. This makes the tools much more accurate than
-others relying on heap dumps, specification assumptions, etc.
+These tools are using Unsafe, JVMTI, and Serviceability Agent (SA)
+heavily to decoder the actual object layout, footprint, and references.
+This makes JOL much more accurate than other tools relying on heap dumps,
+specification assumptions, etc.
+
 
 Source compile:
   $ mvn clean install


More information about the jol-dev mailing list