Added reference to Tony Bargnesi github page.
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 24 Dec 2017 14:58:40 +0000 (16:58 +0200)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 24 Dec 2017 14:58:40 +0000 (16:58 +0200)
Initial version for commandline launcher.

commandline launcher/install [new file with mode: 0755]
commandline launcher/javainspect [new file with mode: 0755]
doc/index.org
pom.xml
src/main/java/eu/svjatoslav/inspector/java/Main.java
usage examples/demo project/pom.xml

diff --git a/commandline launcher/install b/commandline launcher/install
new file mode 100755 (executable)
index 0000000..f17fc78
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+(
+    # go to project root directory
+    cd ..
+
+    # This script installs JavaInspect into /opt/javainspect/ directory.
+    # It also enables javainspect command at the commandline.
+
+    # remove old installation (if any)
+    sudo rm -rf /opt/javainspect/
+
+    # compile new package
+    mvn clean package
+
+    # create installation directory
+    sudo mkdir -p /opt/javainspect/
+
+    # copy javainspect jar file to opt installation directory
+    sudo cp target/javainspect.jar /opt/javainspect/
+)
+
+# deploy launcher script to /usr/local/bin/javainspect
+sudo cp javainspect /usr/local/bin/
diff --git a/commandline launcher/javainspect b/commandline launcher/javainspect
new file mode 100755 (executable)
index 0000000..eb6110c
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+#
+# Launcher script for JavaInspect utility:
+#    http://www2.svjatoslav.eu/gitbrowse/javainspect/doc/
+#
+
+# Commandline parameters:
+# [JAR_FILE_PATH] [GRAPH_NAME] [[OPTIONS] ...]
+#
+#
+
+
+java \
+  -cp .:./example/target/myproject-0.0.jar:./target/javainspect-1.6-SNAPSHOT.jar \
+  eu.svjatoslav.inspector.java.Main \
+  ./example/src/main/java/ com.myproject.* myproject
index bcbbf0a..09f1266 100644 (file)
@@ -7,10 +7,14 @@
   it under the terms of version 3 of the [[https://www.gnu.org/licenses/lgpl.html][GNU Lesser General Public
   License]] or later as published by the Free Software Foundation.
 
-- Program author:
+- Program authors:
   - Svjatoslav Agejenko
-  - Homepage: http://svjatoslav.eu
-  - Email: mailto://svjatoslav@svjatoslav.eu
+    - Homepage: http://svjatoslav.eu
+    - Email: mailto://svjatoslav@svjatoslav.eu
+
+  - Tony Bargnesi
+    - GitHub fork for the project:
+      https://github.com/abargnesi/javainspect
 
 - [[http://www.svjatoslav.eu/programs.jsp][other applications hosted at svjatoslav.eu]]
 
@@ -195,7 +199,8 @@ sudo apt-get install graphviz
 - BUG: Should not hide references if there are too many of them to classes if
   referring classes are not visible anyway because of blacklist/whitelist rules.
   Basically reference counting should exclude not visible classes.
-- FEATURE: replace internal java parser with: https://javaparser.org/
+- FEATURE: replace internal java parser in package
+  eu.svjatoslav.inspector.java.methods with: https://javaparser.org/
 - FEATURE: integarte with [[http://plantuml.com/class-diagram][PlantUML]].
 - FEATURE: add dark theme
 - FEATURE: sort Class fields by alphabet
diff --git a/pom.xml b/pom.xml
index 592064d..2aa7657 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
     <artifactId>javainspect</artifactId>
     <version>1.7-SNAPSHOT</version>
     <packaging>jar</packaging>
-    <name>Java inspect</name>
+    <name>JavaInspect</name>
     <description>Utility to visualize Java code</description>
 
     <organization>
@@ -19,6 +19,7 @@
 
 
     <build>
+        <finalName>javainspect</finalName>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
index 080bdab..f24eae3 100644 (file)
@@ -5,6 +5,9 @@ import eu.svjatoslav.inspector.java.structure.ClassGraph;
 import static java.io.File.separator;
 import static java.lang.System.getProperty;
 
+/**
+ * This class acts as a commandline interface for JavaInspect.
+ */
 public class Main {
        public static void main(String[] args) {
                if (args.length == 0) {
@@ -23,7 +26,5 @@ public class Main {
                cg.whitelistClassGlob(packageGlob);
                cg.setKeepDotFile(true);
                cg.generateGraph(graphName);
-
-               System.exit(0);
        }
 }
index faee7f6..6a16ce8 100644 (file)
@@ -4,8 +4,8 @@
     <artifactId>javainspect-demo</artifactId>
     <version>1.0-SNAPSHOT</version>
     <packaging>jar</packaging>
-    <name>Java inspect demo</name>
-    <description>Demonstration project for Java inspect utility</description>
+    <name>JavaInspect demo</name>
+    <description>Demonstration project for JavaInspect utility</description>
 
     <build>
         <plugins>