Tuesday, 16 June 2015

Create Package by Maven


Create the assembly.xml and call it from pom.xml.

assembly.xml
-----------------

<?xml version="1.0" encoding="UTF-8"?>
<assembly 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/assembly-1.0.0.xsd">
<id>assembly</id>
  <formats>
    <format>jar</format>
  </formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>

<fileSet>
<outputDirectory>product/template-topologies</outputDirectory>
<directory>${env.HOME}/workspace/src/main/java/topologies</directory>
<includes>
<include>*.topology</include>
<include>**/*.*.topology</include>
</includes>
<fileMode>744</fileMode>
</fileSet>

 </fileSets>

 </assembly>



Main Pom.xml
------------------

    <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.5.5</version>
        <dependencies>
          <dependency>
            <groupId>your.group.id</groupId>
            <artifactId>my-assembly-descriptor</artifactId>
            <version>1.0-SNAPSHOT</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <!-- This is where we use our shared assembly descriptor -->
              <descriptorRefs>
                <descriptorRef>assembly.xml</descriptorRef>
              </descriptorRefs>
            </configuration>
          </execution>
        </executions>
      </plugin>

No comments:

Post a Comment

Thank You for your valuable comment

Difference between class level and object locking and static object lock

1) Class level locking will lock entire class, so no other thread can access any of other synchronized blocks. 2) Object locking will lo...