The motivation of this patch is to remove jolokia-agent artifact from main 
java-base module so that 
so it is only built when httpserver-jolokia-plugin is built. It is a 3rd patch 
in a series of patches to 
move most of java/* sources into their specific existing or new modules to make 
java images
more modular.

Signed-off-by: Waldemar Kozaczuk <[email protected]>
---
 .gitignore                                         |  3 +
 modules/httpserver-jolokia-plugin/Makefile         |  3 +
 .../jolokia-agent/pom.xml                          | 78 ++++++++++++++++++++++
 .../src/main/java/io/osv/jolokia/Dispatcher.java   |  0
 .../java/io/osv/jolokia/RequestAndResponse.java    |  0
 modules/httpserver-jolokia-plugin/module.py        |  2 +-
 modules/java-base/jolokia-agent/pom.xml            | 64 ------------------
 modules/java-base/pom.xml                          |  2 -
 modules/java-isolated/Makefile                     |  2 +-
 modules/java-non-isolated/Makefile                 |  2 +-
 modules/java-tests/pom.xml                         |  1 -
 11 files changed, 87 insertions(+), 70 deletions(-)
 create mode 100644 modules/httpserver-jolokia-plugin/jolokia-agent/pom.xml
 rename modules/{java-base => 
httpserver-jolokia-plugin}/jolokia-agent/src/main/java/io/osv/jolokia/Dispatcher.java
 (100%)
 rename modules/{java-base => 
httpserver-jolokia-plugin}/jolokia-agent/src/main/java/io/osv/jolokia/RequestAndResponse.java
 (100%)
 delete mode 100644 modules/java-base/jolokia-agent/pom.xml

diff --git a/.gitignore b/.gitignore
index 4da6666..dad437d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,9 +28,12 @@ build.out
 modules/java-base/**/dependency-reduced-pom.xml
 modules/java-base/**/*.iml
 modules/java-tests/**/*.iml
+modules/httpserver/usr.manifest
 modules/httpserver-jolokia-plugin/autogen/
 modules/httpserver-jolokia-plugin/jolokia.so
 modules/httpserver-jolokia-plugin/obj/
+modules/httpserver-jolokia-plugin/jolokia-agent/target/
+modules/httpserver-jolokia-plugin/jolokia-agent/dependency-reduced-pom.xml
 modules/httpserver-jvm-plugin/autogen/
 modules/httpserver-jvm-plugin/jvm.so
 modules/httpserver-jvm-plugin/obj/
diff --git a/modules/httpserver-jolokia-plugin/Makefile 
b/modules/httpserver-jolokia-plugin/Makefile
index 163ddbd..f89b02c 100644
--- a/modules/httpserver-jolokia-plugin/Makefile
+++ b/modules/httpserver-jolokia-plugin/Makefile
@@ -58,6 +58,7 @@ DEPS := $(OBJ_FILES:.o=.d)
 module: all
 
 all: $(TARGET).so
+       cd jolokia-agent && mvn package -DskipTests=true
 
 init:
        @echo "  MKDIRS"
@@ -90,3 +91,5 @@ clean:
        $(call very-quiet, $(RM) -f usr.manifest)
        $(call very-quiet, $(RM) -rf obj)
        $(call very-quiet, $(RM) -rf autogen)
+       cd jolokia-agent && mvn clean
+       -rm -f dependency-reduced-pom.xml
diff --git a/modules/httpserver-jolokia-plugin/jolokia-agent/pom.xml 
b/modules/httpserver-jolokia-plugin/jolokia-agent/pom.xml
new file mode 100644
index 0000000..2671abf
--- /dev/null
+++ b/modules/httpserver-jolokia-plugin/jolokia-agent/pom.xml
@@ -0,0 +1,78 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <properties>
+        <version>1.0-SNAPSHOT</version>
+    </properties>
+
+    <groupId>io.osv</groupId>
+    <artifactId>jolokia-agent</artifactId>
+    <version>${version}</version>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <version>2.3</version>
+            <scope>provided</scope>
+        </dependency>
+       <dependency>
+           <groupId>org.jolokia</groupId>
+           <artifactId>jolokia-core</artifactId>
+           <version>1.2.2</version>
+       </dependency>
+   </dependencies>
+
+   <build>
+       <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.1</version>
+                <configuration>
+                    <source>1.7</source>
+                    <target>1.7</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <descriptorRefs>
+                        <descriptorRef>jar-with-dependencies</descriptorRef>
+                    </descriptorRefs>
+                    <finalName>${project.artifactId}</finalName>
+                    <appendAssemblyId>false</appendAssemblyId>
+                    <classifier>jar</classifier>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-jar-with-dependencies</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+           <plugin>
+               <groupId>org.apache.maven.plugins</groupId>
+               <artifactId>maven-shade-plugin</artifactId>
+               <version>2.3</version>
+               <executions>
+                       <execution>
+                               <phase>package</phase>
+                               <goals>
+                                       <goal>shade</goal>
+                               </goals>
+                               <configuration>
+                                       <minimizeJar>true</minimizeJar>
+                               </configuration>
+                       </execution>
+               </executions>
+         </plugin>
+       </plugins>
+   </build>
+
+</project>
diff --git 
a/modules/java-base/jolokia-agent/src/main/java/io/osv/jolokia/Dispatcher.java 
b/modules/httpserver-jolokia-plugin/jolokia-agent/src/main/java/io/osv/jolokia/Dispatcher.java
similarity index 100%
rename from 
modules/java-base/jolokia-agent/src/main/java/io/osv/jolokia/Dispatcher.java
rename to 
modules/httpserver-jolokia-plugin/jolokia-agent/src/main/java/io/osv/jolokia/Dispatcher.java
diff --git 
a/modules/java-base/jolokia-agent/src/main/java/io/osv/jolokia/RequestAndResponse.java
 
b/modules/httpserver-jolokia-plugin/jolokia-agent/src/main/java/io/osv/jolokia/RequestAndResponse.java
similarity index 100%
rename from 
modules/java-base/jolokia-agent/src/main/java/io/osv/jolokia/RequestAndResponse.java
rename to 
modules/httpserver-jolokia-plugin/jolokia-agent/src/main/java/io/osv/jolokia/RequestAndResponse.java
diff --git a/modules/httpserver-jolokia-plugin/module.py 
b/modules/httpserver-jolokia-plugin/module.py
index 316f934..34f8c00 100644
--- a/modules/httpserver-jolokia-plugin/module.py
+++ b/modules/httpserver-jolokia-plugin/module.py
@@ -8,4 +8,4 @@ _module = '${OSV_BASE}/modules/httpserver-jolokia-plugin'
 usr_files = FileMap()
 usr_files.add(os.path.join(_module, 
'jolokia.so')).to('/usr/mgmt/plugins/jolokia.so')
 usr_files.add(os.path.join(_module, 
'api-doc/listings/jolokia.json')).to('/usr/mgmt/api/listings/jolokia.json')
-usr_files.add('${OSV_BASE}/modules/java-base/jolokia-agent/target/jolokia-agent.jar').to('/usr/mgmt/jolokia-agent.jar')
+usr_files.add(os.path.join(_module, 
'jolokia-agent/target/jolokia-agent.jar')).to('/usr/mgmt/jolokia-agent.jar')
diff --git a/modules/java-base/jolokia-agent/pom.xml 
b/modules/java-base/jolokia-agent/pom.xml
deleted file mode 100644
index a2b3742..0000000
--- a/modules/java-base/jolokia-agent/pom.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
-       <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>io.osv</groupId>
-        <artifactId>java-parent</artifactId>
-        <version>${version}</version>
-    </parent>
-
-       <groupId>io.osv</groupId>
-       <artifactId>jolokia-agent</artifactId>
-
-
-       <dependencies>
-               <dependency>
-                       <groupId>org.jolokia</groupId>
-                       <artifactId>jolokia-core</artifactId>
-                       <version>1.2.2</version>
-               </dependency>
-       </dependencies>
-
-       <build>
-               <plugins>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptorRefs>
-                        <descriptorRef>jar-with-dependencies</descriptorRef>
-                    </descriptorRefs>
-                    <finalName>${artifactId}</finalName>
-                    <appendAssemblyId>false</appendAssemblyId>
-                    <classifier>jar</classifier>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-jar-with-dependencies</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-shade-plugin</artifactId>
-                               <version>2.3</version>
-                               <executions>
-                                       <execution>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       <goal>shade</goal>
-                                               </goals>
-                                               <configuration>
-                                                       
<minimizeJar>true</minimizeJar>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
-               </plugins>
-       </build>
-
-</project>
\ No newline at end of file
diff --git a/modules/java-base/pom.xml b/modules/java-base/pom.xml
index c520664..d833f4b 100644
--- a/modules/java-base/pom.xml
+++ b/modules/java-base/pom.xml
@@ -18,7 +18,6 @@
         <module>runjava-common</module>
         <module>runjava-isolated</module>
         <module>runjava-non-isolated</module>
-        <module>jolokia-agent</module>
     </modules>
 
     <dependencies>
@@ -41,7 +40,6 @@
                     <target>1.7</target>
                 </configuration>
             </plugin>
-
         </plugins>
     </build>
 </project>
diff --git a/modules/java-isolated/Makefile b/modules/java-isolated/Makefile
index 64c5633..9e936ce 100644
--- a/modules/java-isolated/Makefile
+++ b/modules/java-isolated/Makefile
@@ -1,6 +1,6 @@
 SRC = $(shell readlink -f ../..)
 module:
-       cd $(SRC)/modules/java-base && mvn --projects 
:runjava-common,:runjava-isolated,:jolokia-agent,:cloudius package 
-DskipTests=true
+       cd $(SRC)/modules/java-base && mvn --projects 
:runjava-common,:runjava-isolated,:cloudius package -DskipTests=true
 
 clean:
        cd $(SRC)/modules/java-base && mvn clean
diff --git a/modules/java-non-isolated/Makefile 
b/modules/java-non-isolated/Makefile
index fcc8565..a333549 100644
--- a/modules/java-non-isolated/Makefile
+++ b/modules/java-non-isolated/Makefile
@@ -1,6 +1,6 @@
 SRC = $(shell readlink -f ../..)
 module:
-       cd $(SRC)/modules/java-base && mvn --projects 
:runjava-common,:runjava-non-isolated,:jolokia-agent,:cloudius package 
-DskipTests=true
+       cd $(SRC)/modules/java-base && mvn --projects 
:runjava-common,:runjava-non-isolated,,:cloudius package -DskipTests=true
 
 clean:
        cd $(SRC)/modules/java-base && mvn clean
diff --git a/modules/java-tests/pom.xml b/modules/java-tests/pom.xml
index 2ede15e..e8a0c08 100644
--- a/modules/java-tests/pom.xml
+++ b/modules/java-tests/pom.xml
@@ -15,7 +15,6 @@
 
     <modules>
         <module>../java-base/cloudius</module>
-        <module>../java-base/jolokia-agent</module>
         <module>../java-base/runjava-common</module>
         <module>../java-base/runjava-non-isolated</module>
         <module>../java-base/runjava-isolated</module>
-- 
2.7.4

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to