Tuesday, April 3, 2012

Maven builiding SDK Jar

Here we are going to create a Jar file SDK from source file using maven:


POM should look like :

<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>

    <groupId>com.techyhouse</groupId>
    <artifactId>techyHouseSDK</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>

    <name>techyHouseSDK</name>
    <url>http://maven.apache.org</url>
    <build>
        <finalName>techyHouseSDK-1.0.0</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <inherited>true</inherited>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <excludes>
                        <exclude>**Test*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>

        <dependency>
        ...........
        ...........
        </dependency>

    </dependencies>
</project>

No comments:

Post a Comment