Eclipse + Maven

Letzte Änderung: 10.10.2011 - 04:41 Uhr

Eclipse

Repositories

  • maven2Eclipse: http://download.eclipse.org/technology/m2e/releases
  • AnyEdit: http://andrei.gmxhome.de/eclipse/

Konfiguration

Startparameter:

  • ./eclipse -vmargs -Duser.name="Dennis" -Xms1024m -Xmx1024m -XX:PermSize=64M -XX:MaxPermSize=512m -XX:+UseParallelGC

Details:

  • -vmargs
  • -Duser.name="Dennis"
  • -Xms1024m
  • -Xmx1024m
  • -XX:PermSize=64M
  • -XX:MaxPermSize=512m
  • -XX:+UseParallelGC

 Quellen:

Maven

Setting Compiler Level For Maven

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <configuration>
        <source>1.5</source>
        <target>1.5</target>
      </configuration>
    </plugin>
  </plugins>
</build>

Quelle: http://codestuff.wordpress.com/2008/04/09/setting-compiler-level-for-maven/

Log4j

<dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.15</version>
    <scope>provided</scope>
    <exclusions>
        <exclusion>
          <groupId>com.sun.jdmk</groupId>
          <artifactId>jmxtools</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.sun.jmx</groupId>
          <artifactId>jmxri</artifactId>
        </exclusion>
    </exclusions>
</dependency>

Quelle: http://stackoverflow.com/questions/2310633/maven-dependency-log4j-error

JAR mit Abhängigkeiten bauen

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.2.1</version>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
          <archive>
            <manifest>
              <mainClass>de.meinefirma.meinprojekt.App</mainClass>
            </manifest>
          </archive>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

 Paketbau mittels Maven: mvn clean package

Quelle: http://www.torsten-horn.de/techdocs/maven.htm