Maven

http://cemerick.com/2010/08/24/hosting-maven-repos-on-github/

 

비교, 전환

http://jazoon.com/download/presentations/4840.pdf

http://www.sonatype.com/people/2009/04/how-to-convert-from-ant-to-maven-in-5-minutes/

 

MAVEN : The Definitive Guide

http://sonatype.com/book/

http://www.sonatype.com/MavenTheDefinitiveGuide.zip

 

시작하기

http://maven.apache.org/guides/introduction/introduction-to-the-pom.html

[강좌] maven 따라하기 - 프로젝트 생성, 빌드, 레포팅, 배포

아파치 메이븐 2 시작하기 (한글)

Maven Getting Started Guide(1)

Maven Getting Started Guide(2)

Maven Getting Started Guide(3)

 

http://maven.apache.org/ref/2.0.8/maven-model/maven.html

 

Maven 설치하기

An introduction to Maven 2

생성 mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=myapp

[Maven]으로 프로젝트 빌드하기 (maven1)

Maven 용어 2 (POM)

 

<dependency>
  <groupId>.....</groupId>
  <artifactId>.....</artifactId>
  <version>1.0.1</version>
  <scope>system</scope>
  <systemPath>${basedir}/lib/xss.jar</systemPath>
</dependency>

 

Effective pom : mvn help:effective-pom

Super pom

http://maven.apache.org/pom.html

http://maven.apache.org/guides/introduction/introduction-to-the-pom.html

Apache Maven에 대해 모르고 있던 5가지 사항

 

Options

-e : 발생한 error에 대해서 보여준다.
-X : Debug를 보여준다. 보통 이 옵션에 > log.log 처럼 파일로 내보내서 무슨 문제가 생겼는지 확인하면 좋다.
-U : 업데이트가 제대로 안되었을 경우 강제로 repository에서 업데이트 하도록한다.
-fn : 에러가 나던 말던 일단 빌드부터 하고 본다.
-P : 프로파일을 설정해서 하나의 프로젝트를 다른 설정으로 빌드할 수 있다.

 

기초개념

Profile

Plugin

 

Life Cycle

Maven 용어 1 (Plugin, Goal, Phase)

Maven 강좌 7 - Maven을 이용하여 Appfuse 프로젝트 생성하기

[Maven]Option

메이븐 상식: 기본 페이스(phase)

Commit comment template

 

Dependency

Maven Dependency의 scope의 의미

maven2 transitive dependency

Managed Depedency 네 녀석의 정체를 드디어 알았다.

[Maven]을 쓴다고 해서 종속성을 안중에서 Out 시킬 수 있느냐?

exclusion을 하까마까 "가장 가까운" 의존성을 사용하게 됩니다

기본적인 managed dependency 사용법

Managed Depedency 네 녀석의 정체를 드디어 알았다.

Maven의 version range를 사용할 때 주의할 점

Site

mvn site

Site Generation

 

디렉토리구조

Maven의 default directory layout 변경하기

Maven의 webapp directory 변경하기

http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#warSourceDirectory

 

Plug-in

http://maven.apache.org/plugins/

http://maven.apache.org/plugins/maven-jar-plugin/

http://maven.apache.org/plugins/maven-assembly-plugin/ : Assemblies

http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html

http://mojo.codehaus.org/exec-maven-plugin/usage.html

maven-dependency-plugin  : Maven 프로젝트 의존성 파일들 패키징하기

 

http://mojo.codehaus.org/javancss-maven-plugin/

http://maven-plugins.sourceforge.net/maven-javancss-plugin/

http://emma.sourceforge.net/maven-emma-plugin/

 

http://maven.apache.org/guides/development/guide-testing-development-plugins.html

 

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jar-plugin</artifactId>
  <configuration>
  <archive>
    <manifest>
    <addClasspath>true</addClasspath>
    <mainClass>ca.sqlpower.architect.swingui.ArchitectFrame</mainClass>
    <classpathPrefix>lib/</classpathPrefix>
    </manifest>
    <manifestEntries>
      <Class-Path>jdbc/</Class-Path>
     </manifestEntries>
     </archive>
    </configuration>
</plugin>

 

exec plugin

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>deploy</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <executable>/home1/irteam/bin/tomcat.sh</executable>
              <workingDirectory>/home1/irteam/bin</workingDirectory>
              <arguments>
                <argument>start</argument>
                <argument>buzz</argument>
              </arguments>
            </configuration>
          </plugin>

 

Resource Filter encoding 설정

             <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-resources-plugin</artifactId>
               <configuration>
                       <encoding>UTF-8</encoding>
                   </configuration>
               </plugin>

 

archetype

maven archetype 만들기

http://www.sonatype.com/books/mvnref-book/reference/archetype-sect-third-party.html

http://www.sonatype.com/books/mvnref-book/reference/archtype-sect-generate.html

mvn install:install-file -Dfile=C:\aa.jar -DgroupId=aa -DartifactId=aa -Dversion=1.0 -Dpackaging=jar

mvn archetype:update-local-catalog

mvn archetype:generate

 

Maven - Eclipse

Maven 강좌 5 - Maven 기반의 Eclipse 프로젝트 생성 및 활용

Eclipse-Maven2-tools.jar 문제 해결

Maven으로 이클립스 프로젝트 만들기 - Screen Cast

MAVEN을 사용하세요. 코딩이 편해집니다.

 

    <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
        <attributes>
            <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
        </attributes>
    </classpathentry>

 

  <nature>org.eclipse.jdt.core.javanature</nature>
  <nature>org.maven.ide.eclipse.maven2Nature</nature>
  <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
  <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
  <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>

 

Getting Maven and Eclipse to work together to filter resources

http://jira.codehaus.org/browse/MJNCSS-16

http://jira.codehaus.org/browse/MJNCSS-15

Maven 프로젝트 이클립스 import 하기

 

Maven-Eclipse plugin

http://maven.apache.org/plugins/maven-eclipse-plugin/

http://mevenide.codehaus.org/

http://www.nabble.com/JavaNCSS-Maven-Plugin-td15224237.html

Maven resource filtering with Maven Integration for Eclipse

 

m2 Eclipse

update site : http://m2eclipse.sonatype.org/update/

 

Maven Integration for Eclipse (M2 Eclipse):

pom.xml에 종속성 추가하기

Introduction to m2eclipse

Effective POM과 M2Eclipse Plugin

Getting Maven and Eclipse to work together to filter resources

 

Q4e

q4e

Q4E 플러그인 사용기 1

이클립스용 Maven 플러그인 Q4EMaven 플러그인 Q4E

 

 

테스트

Skip : -Dmaven.test.skip=true

    <properties>
        <maven.test.skip>true</maven.test.skip>
    </properties>

하나만 : -Dtest=MyTest

 

통합 테스트 분리와 메이븐 관련 참조 할 글

메이븐 프로젝트에서 단위/통합 테스트 어설프게 구분하기

http://igooo.org/tc/entry/Maven-Test-수행하기

 

메모리 문제시

export MAVEN_OPTS=-XX:MaxPermSize=256m

-XX:MaxPermSize=256m

 <plugin>
 <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.4.3</version>
        <configuration>
          <argLine>-Xmx256m</argLine>  << 요 부분에 좀 자세히 적어주시면 될 겁니다.
          <forkMode>once</forkMode>
          <reportFormat>xml</reportFormat>
        </configuration>
</plugin>

 

http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing

http://www.edwardkim.pe.kr/?tag=test

 

주의할 점

http://www.filsa.net/2008/02/11/maven-and-the-method-does-not-override-a-method-from-its-superclass-error/

 

Version 인식문제

 

Profile

http://java.dzone.com/articles/maven-profile-best-practices