maven eclipse

Edit

Maven - Eclipse

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

Maven-Eclipse plugin

==== 테스트

Skip : -Dmaven.test.skip=true

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

하나만 : -Dtest=MyTest

메모리 문제시

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>

==== 주의할 점

Version 인식문제

==== Profile

=== Library 검색

=== Repository

[메이븐 저장소 war 버전 Nexus 설치 및 설정]

=== Maven WAS

===== Jetty

<build>

<plugin>

<groupId>org.mortbay.jetty</groupId>

<artifactId>maven-jetty-plugin</artifactId>

<configuration>

<scanIntervalSeconds>3</scanIntervalSeconds>

<contextPath>/</contextPath>

<connectors>

<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">

<port>8080</port>

</connector>

</connectors>

</configuration>

</plugin><plugin>

===== Tomcat

<groupId>org.codehaus.mojo</groupId>

<artifactId>tomcat-maven-plugin</artifactId>

<version>1.0</version>

<configuration>

<path>/admin</path>
</configuration>

</plugin>

</plugins>

</build>

Tomcat maven plugin 소스 : https://github.com/apache/tomcat-maven-plugin

=== Eclipse Integration

===== m2 Eclipse

===== Q4e

Local에 파일설치 : mvn install:install-file -Dfile=ojdbc14.jar -DgroupId=com.oracle-DartifactId=ojdbc14 -Dversion=10.2.0.2.0 -Dpackaging=jar

Release

mvn release:prepare -Darguments="-DskipTests" -Dusername=benelog -Dpassword=234234

War 파일에 버전 새기기

 <properties>
 <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>

  </properties>

  <plugin>

 <artifactId>maven-war-plugin</artifactId>

 <configuration>

 <webappDirectory>${deploy.dir}</webappDirectory>

 <archive>

 <manifestEntries>

 <Build-Date>${maven.build.timestamp}</Build-Date>

 <Revision-Number>${revision}</Revision-Number>

 </manifestEntries>

 </archive>

 </configuration>

 </plugin>