2015. 5. 19. 13:31ㆍJAVA/Spring(eGovFrame)
<modelVersion>4.0.0</modelVersion>
<groupId>com.intercast</groupId>
<artifactId>SuhyupSchedule</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>KigamSchedule</name>
<description>SuhyupSchedule</description>
<properties>
<spring.maven.artifact.version>4.1.6.RELEASE</spring.maven.artifact.version>
<org.mybatis-version>3.2.8</org.mybatis-version>
<org.mybatis.spring-version>1.2.2</org.mybatis.spring-version><deploy.target.dir>D:/Repository/deploy/shuhyup</deploy.target.dir>
<lib.dir>lib</lib.dir>
<jar.name>Suhyupchedule</jar.name>
</properties>
<repositories>
<repository>
<id>mvn2</id>
<url>http://repo1.maven.org/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>jasterxml</id>
<url>http://repo1.maven.org/maven2/com/fasterxml/jackson/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.maven.artifact.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.maven.artifact.version}</version>
</dependency><dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.maven.artifact.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.maven.artifact.version}</version>
</dependency><dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${org.mybatis-version}</version>
</dependency><dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>${org.mybatis.spring-version}</version>
</dependency><dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.8</version>
</dependency><dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.8</version>
</dependency><dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc5</artifactId>
<version>11.2.0.3</version>
</dependency></dependencies>
아래는 jar 파일로 배포를 하기 위해 설정되는 부분으로
추후 maven build > clean package 하면 자동으로 jar 파일이 생성됩니다.
파일명은 위에서 설정한 <jar.name>Suhyupchedule</jar.name> 으로 생성이 됩니다.
<build><pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata><pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>
[2.3,)
</versionRange>
<goals>
<goal>copy-dependencies</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution></pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement><plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin><plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version><configuration>
<finalName>${jar.name}</finalName>
<!-- jar 파일이 생성될 폴더 -->
<outputDirectory>${deploy.target.dir}</outputDirectory>
<archive>
<manifest>
<!-- public static void main() 함수가 있는 클래스 지정 -->
<mainClass>com.intercast.schedule.stater.Application</mainClass><!-- jar 파일 META-INF/MANIFEST.MF 에 클래스패스 정보 추가 -->
<addClasspath>true</addClasspath><!-- 클래스패스에 추가시 prefix 설정 ex) log4j-1.2.16.jar -> lib/log4j-1.2.16.jar 로 추가됨 -->
<classpathPrefix>${lib.dir}/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>${deploy.target.dir}/${lib.dir}</outputDirectory>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</plugin>
</plugins></build>
'JAVA > Spring(eGovFrame)' 카테고리의 다른 글
Spring4 Scheduling - Demon (0) | 2015.05.19 |
---|---|
Spring4 Scheduling - Spring 설정 (0) | 2015.05.19 |
Spring4 Scheduling - 폴더구조 (0) | 2015.05.19 |
Spring4 JavaConfig 설정 - SecurityConfig.java (3) | 2015.04.23 |
Spring4 JavaConfig 설정 - DatabaseConfig.java (0) | 2015.04.23 |