killbill-aplcache

catalog: overdue: build schema generator artifacts Signed-off-by:

2/26/2013 8:27:33 AM

Details

catalog/pom.xml 26(+24 -2)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index ad053c3..74ad781 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -15,7 +15,8 @@
   ~ under the License.
   -->
 
-<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">
+<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>com.ning.billing</groupId>
@@ -102,7 +103,8 @@
                             <shadedArtifactAttached>true</shadedArtifactAttached>
                             <shadedClassifierName>load-tool</shadedClassifierName>
                             <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <manifestEntries>
                                         <Main-Class>com.ning.billing.catalog.LoadCatalog</Main-Class>
                                     </manifestEntries>
@@ -110,6 +112,26 @@
                             </transformers>
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>assemble-xsd-tool-catalog</id>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <createSourcesJar>false</createSourcesJar>
+                            <shadedArtifactAttached>true</shadedArtifactAttached>
+                            <shadedClassifierName>xsd-tool</shadedClassifierName>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <manifestEntries>
+                                        <Main-Class>com.ning.billing.catalog.CreateCatalogSchema</Main-Class>
+                                    </manifestEntries>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
                 </executions>
             </plugin>
         </plugins>
diff --git a/catalog/src/main/java/com/ning/billing/catalog/CreateCatalogSchema.java b/catalog/src/main/java/com/ning/billing/catalog/CreateCatalogSchema.java
index 1ccaf64..7e25177 100644
--- a/catalog/src/main/java/com/ning/billing/catalog/CreateCatalogSchema.java
+++ b/catalog/src/main/java/com/ning/billing/catalog/CreateCatalogSchema.java
@@ -25,7 +25,7 @@ import com.ning.billing.util.config.catalog.XMLSchemaGenerator;
 public class CreateCatalogSchema {
 
     /**
-     * @param args
+     * @param args output file path
      */
     public static void main(final String[] args) throws Exception {
         if (args.length != 1) {
@@ -37,7 +37,5 @@ public class CreateCatalogSchema {
         final Writer w = new FileWriter(f);
         w.write(XMLSchemaGenerator.xmlSchemaAsString(StandaloneCatalog.class));
         w.close();
-
     }
-
 }

overdue/pom.xml 29(+28 -1)

diff --git a/overdue/pom.xml b/overdue/pom.xml
index 15e394d..b4bea2f 100644
--- a/overdue/pom.xml
+++ b/overdue/pom.xml
@@ -15,7 +15,8 @@
   ~ under the License.
   -->
 
-<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">
+<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>com.ning.billing</groupId>
@@ -130,6 +131,32 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>assemble-xsd-tool-overdue</id>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <createSourcesJar>false</createSourcesJar>
+                            <shadedArtifactAttached>true</shadedArtifactAttached>
+                            <shadedClassifierName>xsd-tool</shadedClassifierName>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <manifestEntries>
+                                        <Main-Class>com.ning.billing.overdue.CreateOverdueConfigSchema</Main-Class>
+                                    </manifestEntries>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>