Schlagwörter: Maven Kommentarverlauf ein-/ausschalten | Tastaturkürzel

  • Andreas Höhmann 22:47 am Thursday, 27. June 2013 Permalink |
    Tags: Maven, memcached, , tinkerpop   

    Quick Maven Workaround 

    Currently I want run https://github.com/jamesward/hello-java-spring-neo4j

    $ mvn -version
    Apache Maven 3.1.0-alpha-1 (c726cdd3a9ad5c3a419e1171f8c1925e336ead18; 2013-06-01 15:03:28+0200)
    Maven home: C:\Development\apache-maven-3.1.0-alpha-1
    Java version: 1.7.0_09, vendor: Oracle Corporation
    Java home: C:\Program Files\Java\jdk1.7.0_09\jre
    Default locale: de_DE, platform encoding: Cp1252
    OS name: „windows 7“, version: „6.1“, arch: „amd64“, family: „windows“

    Unfortunately I got some strange error like „access denied“ for tinkerpop (I never heard about this maven repository until now) and slowwwww connection to memcache repo at googlecode (svn) … so here is a „workaround“ for that …

    <?xml version="1.0" encoding="UTF-8"?>
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    	<mirrors>
    		<mirror>
    			<id>tinkerpop</id>
    			<name>tinkerpop</name>
    			<url>http://repo.maven.apache.org/maven2</url>
    			<mirrorOf>tinkerpop-repository</mirrorOf>
    		</mirror>
    		<mirror>
    			<id>msm</id>
    			<name>msm</name>
    			<url>http://repo.maven.apache.org/maven2</url>
    			<mirrorOf>msm</mirrorOf>
    		</mirror>
    	</mirrors>
    </settings>
    
     
  • Andreas Höhmann 15:21 am Thursday, 26. April 2012 Permalink |
    Tags: GWT, Maven, ,   

    Use maven profile to recompile vaadin widgetset #2 

    In a older post I describe my solution to handle VAADIN/GWT widgetset compilation with maven.

    Today I  will share some changes to use GWT 2.4 with my solution.

    The problem: after GWT compilation a new directory gwt-unitCache exists under the VAADIN directory. I don’t need this 😉

    I integrate this workaround in my profile:

    <profile>
      <!-- Updates Vaadin widgetset definitions based on project dependencies -->
      <id>update-widgetset</id>
      <activation>
        <file>
          <missing>${basedir}/src/main/webapp/VAADIN/widgetsets/</missing>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-maven-plugin</artifactId>
            <version>1.0.2</version>
            <executions>
              <execution>
                <phase>generate-resources</phase>
                <goals>
                  <goal>update-widgetset</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <version>2.4.0</version>
            <configuration>
              <webappDirectory>${basedir}/src/main/webapp/VAADIN/widgetsets/</webappDirectory>
              <extraJvmArgs>-Xmx512M -Xss1024k </extraJvmArgs>
              <deploy>${project.build.directory}/gwt-tmp/</deploy>
              <soyc>false</soyc>
              <force>true</force>
              <strict>true</strict>
              <style>OBFUSCATED</style>
              <optimizationLevel>9</optimizationLevel>
            </configuration>
            <executions>
              <execution>
                <phase>generate-resources</phase>
                <goals>
                  <goal>resources</goal>
                  <goal>compile</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <!-- workaround for 
                 http://code.google.com/p/google-web-toolkit/issues/detail?id=6397 -->
            <artifactId>maven-clean-plugin</artifactId>
            <version>2.4.1</version>
            <configuration>
              <filesets>
                <fileset>
                  <directory>${basedir}/src/main/webapp/VAADIN/</directory>
                  <includes>
                    <directory>gwt-unitCache/**</directory>
                  </includes>
                  <followSymlinks>false</followSymlinks>
                </fileset>
              </filesets>
              <excludeDefaultDirectories>true</excludeDefaultDirectories>
            </configuration>
            <executions>
              <execution>
                <id>default</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>clean</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    

    🙂

     
  • Andreas Höhmann 9:43 am Thursday, 15. December 2011 Permalink |
    Tags: Maven,   

    Use maven profile to recompile vaadin widgetset 

    Today I will show you my maven profile to configure Vaadin widgetset recompilation.

    The Vaadin wiki shows the basics … but I want widgetset update only if its necessary … so I moved the gwt/vaadin plugins in a profile and add a activation per file for this profile:

    <profile>
       <!--
         Updates Vaadin widgetset definitions based on project dependencies
         Remove widgetset directory to trigger recompile:
           rm -Rf src/main/webapp/VAADIN/widgetsets/
       -->
       <id>update-widgetset</id>
       <activation>
         <file>
           ${basedir}/src/main/webapp/VAADIN/widgetsets/
         </file>
       </activation>
       <build>
         <plugins>
           <plugin>
             <groupId>com.vaadin</groupId>
             <artifactId>vaadin-maven-plugin</artifactId>
             <version>1.0.2</version>
             <configuration>
               <!-- if you don't specify any modules, the plugin will find them -->
             </configuration>
             <executions>
               <execution>
                 <phase>generate-resources</phase>
                 <goals>
                   <goal>update-widgetset</goal>
                 </goals>
               </execution>
             </executions>
           </plugin>
           <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>gwt-maven-plugin</artifactId>
             <version>2.3.0-1</version>
             <configuration>
               <!-- if you don't specify any modules, the plugin will find them -->
               ${basedir}/src/main/webapp/VAADIN/widgetsets/
               -Xmx512M -Xss1024k
               ${project.build.directory}/gwt-tmp/
               <soyc>false</soyc>
               <force>true</force>
             </configuration>
             <executions>
               <execution>
                 <phase>generate-resources</phase>
                 <goals>
                   <goal>resources</goal>
                   <goal>compile</goal>
                 </goals>
               </execution>
             </executions>
           </plugin>
         </plugins>
       </build>
     </profile>

    🙂

     
  • Andreas Höhmann 12:55 am Friday, 11. June 2010 Permalink |
    Tags: , graph, jung, Maven, , ricochet robots   

    Oberwald Rally 

    Ich habe heute ein kleines privates Projekt öffentlich zugänglich gemacht.

    Das Projekt entstand im Rahmen unseres jährlichen Männertagstreffens (wir Leipziger HTWK Mappen feiern nicht nur einen Tag sondern gleich vier). Dieses Mal waren wir halt im schönen Oberwald. Der Tag war noch jung, ein paar Bier waren auch schon geleert … also was tun. Na dann einfach Mal etwas programmieren 😀 Ziel: „Rasende Roboter“ programmieren, am besten gleich einen Algorithmus schreiben, der das Problem automatisch löst. Das Projekt beschäftigt sich also mit dem Thema „Ricochet Robots“ (im dt. Rasende Roboter). Wie ich hier bereits schon schrieb, ist es eines meiner Lieblingsspiele 🙂

    Das ganze Ding ist mittlerweile zu einem Eclipse PDE Projekt gereift … hier ein paar Screenshots …

    Random Calculator View

    Der RandomCalculator schiebt die 4 Roboter nach dem Zufallsprinzip über das Brett. Dabei kommt es ab und zu auch dazu, dass die Aufgabe (Roboter vom grünen Feld auf das rote Feld) gelöst wird 🙂

    Graph Calculator View

    Der GraphCalculator ist schon etwas „schlauer“, allerdings kann er nur den kürzesten Weg für einen Roboter berechnen.

    Den Code gibts unter https://github.com/ahoehma/oberwaldrally.

    Feedback erwünscht!

    Viel Spass beim Bot schreiben!

    😀

     
  • Andreas Höhmann 11:31 am Tuesday, 25. May 2010 Permalink |
    Tags: , Maven,   

    Export maven war artifact as runnable jetty package 

    Today I will show you a way to export a <packaging>war</packaging> artifact as a runnable windows application.

    The ingredients are:

    • maven war artifact (i.e. our web application)
    • embedded Jetty

    A minimal web application’s pom looks like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <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/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>de.ahoehma</groupId>
      <artifactId>dummy-webapp</artifactId>
      <version>1.0.0-SNAPSHOT</version>
      <packaging>war</packaging>
    </project>
    

    Now we add some components to the artifact …

    1. add the following profile to the pom.xml:

    <profiles>
       <profile>
          <id>jetty-offline</id>
          <build>
            <plugins>
              <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.2-beta-5</version>
                <configuration>
                  <finalName>offline-dummy-webapp-${project.version}</finalName>
                  <attach>false</attach>
                  <descriptors>
                    <descriptor>src/assembly/jetty-offline.xml</descriptor>
                  </descriptors>
                </configuration>
                <executions>
                  <execution>
                    <id>make-assembly</id>
                    <phase>package</phase>
                    <goals>
                      <goal>single</goal>
                    </goals>
                  </execution>
                </executions>
              </plugin>
            </plugins>
          </build>
          <dependencies>
            <!-- logging ... -->
            <dependency>
              <groupId>commons-logging</groupId>
              <artifactId>commons-logging</artifactId>
              <version>1.1.1</version>
            </dependency>
            <dependency>
              <groupId>log4j</groupId>
              <artifactId>log4j</artifactId>
              <version>1.2.15</version>
              <scope>runtime</scope>
            </dependency>
            <!-- embedded jetty -->
            <dependency>
              <groupId>org.mortbay.jetty</groupId>
              <artifactId>jetty</artifactId>
              <version>${jetty.version}</version>
            </dependency>
            <dependency>
              <groupId>org.mortbay.jetty</groupId>
              <artifactId>start</artifactId>
              <version>${jetty.version}</version>
            </dependency>
            <dependency>
              <groupId>org.mortbay.jetty</groupId>
              <artifactId>jetty-util</artifactId>
              <version>${jetty.version}</version>
            </dependency>
            <dependency>
              <groupId>org.mortbay.jetty</groupId>
              <artifactId>jsp-2.1-jetty</artifactId>
              <version>${jetty.version}</version>
            </dependency>
          </dependencies>
          <properties>
              <jetty.version>6.1.23</jetty.version>
          </properties>
        </profile>
    </profiles>
    

    2. the assembly descriptor for src/assembly/jetty-offline is here:

    <?xml version="1.0" encoding="UTF-8"?>
    <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
    
      <formats>
        <format>dir</format>
      </formats>
      
      <dependencySets>
        <dependencySet>
          <!-- unpack the webapp as root application -->
          <scope>runtime</scope>
          <unpack>true</unpack>
          <outputDirectory>webapps/root/</outputDirectory>
          <includes>
            <include>de.ahoehma:dummy-webapp:war</include>
          </includes>
        </dependencySet>
        <dependencySet>
          <unpack>false</unpack>
          <outputDirectory>lib</outputDirectory>
          <useTransitiveFiltering>true</useTransitiveFiltering>
          <useStrictFiltering>true</useStrictFiltering>
          <includes>
            <include>org.mortbay.jetty:jetty</include>
            <include>org.mortbay.jetty:jetty-util</include>
            <include>org.mortbay.jetty:start</include>
            <include>org.mortbay.jetty:jsp-2.1-jetty</include>
            <include>commons-logging:commons-logging</include>
            <include>log4j:log4j</include>
          </includes>
        </dependencySet>
      </dependencySets>
    
      <fileSets>
        <fileSet>
          <directory>src/jetty/bin</directory>
          <outputDirectory>bin/</outputDirectory>
          <filtered>false</filtered>
        </fileSet>
        <fileSet>
          <directory>src/jetty/resources</directory>
          <outputDirectory>etc/</outputDirectory>
          <filtered>false</filtered>
        </fileSet>
      </fileSets>
      
    </assembly>
    

    See maven-assembly-plugin for more options …

    3. src/jetty/bin contains a windows batch file:

     @echo off
     @set JVM_OPTS=-XX:MaxPermSize=256m -XX:PermSize=128m -Xms128m -Xmx512m
     (cd .. && java %JVM_OPTS% -jar lib/start-6.1.23.jar)
    

    4. and at least the src/jetty/resources contains the file jetty.xml:

    <?xml version="1.0"?>
    <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
    <Configure id="Server" class="org.mortbay.jetty.Server">
        <Set name="ThreadPool">
          <New class="org.mortbay.thread.BoundedThreadPool">
            <Set name="minThreads">10</Set>
            <Set name="maxThreads">250</Set>
            <Set name="lowThreads">25</Set>
          </New>
        </Set>
        <Call name="addConnector">
          <Arg>
              <New class="org.mortbay.jetty.nio.SelectChannelConnector">
                <Set name="host"><SystemProperty name="jetty.host" default="localhost"/></Set>
                <Set name="port"><SystemProperty name="jetty.port" default="1976"/></Set>
                <Set name="maxIdleTime">30000</Set>
                <Set name="Acceptors">2</Set>
                <Set name="statsOn">false</Set>
                <Set name="confidentialPort">8442</Set>
          	    <Set name="lowResourcesConnections">5000</Set>
          	    <Set name="lowResourcesMaxIdleTime">5000</Set>
              </New>
          </Arg>
        </Call>
        <Set name="handler">
          <New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
            <Set name="handlers">
             <Array type="org.mortbay.jetty.Handler">
               <Item>
                 <New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
               </Item>
               <Item>
                 <New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
               </Item>
             </Array>
            </Set>
          </New>
        </Set>
        <Call name="addLifeCycle">
          <Arg>
            <New class="org.mortbay.jetty.deployer.ContextDeployer">
              <Set name="contexts"><Ref id="Contexts"/></Set>
              <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
              <Set name="scanInterval">1</Set>
            </New>
          </Arg>
        </Call>
        <Call name="addLifeCycle">
          <Arg>
            <New class="org.mortbay.jetty.deployer.WebAppDeployer">
              <Set name="contexts"><Ref id="Contexts"/></Set>
              <Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/webapps</Set>
          	  <Set name="parentLoaderPriority">false</Set>
          	  <Set name="extract">true</Set>
          	  <Set name="allowDuplicates">false</Set>
            </New>
          </Arg>
        </Call>
        <Set name="stopAtShutdown">true</Set>
        <Set name="sendServerVersion">true</Set>
        <Set name="sendDateHeader">true</Set>
        <Set name="gracefulShutdown">1000</Set>
    </Configure>
    

    Now we are able to build a „offline version“ of our web application:

     mvn package -Pjetty-offline
    

    The result will be a directory target\distribution\offline-dummy-webapp-1.0.0-SNAPSHOT with the structure:

     bin/
        jetty_run.bar
     etc/
        jetty.xml
     lib/
        log4j-1.2.15.jar
        commons-logging-1.1.1.jar    
        servlet-api-2.5-20081211.jar
        start-6.1.23.jar
        jetty-6.1.23.jar
        jetty-util-6.1.23.jar
        ant-1.6.5.jar
        core-3.1.1.jar
        ecj-3.5.1.jar
        jsp-2.1-jetty-6.1.23.jar
        jsp-2.1-glassfish-2.1.v20091210.jar
        jsp-api-2.1-glassfish-2.1.v20091210.jar
     webapps/
        root/
           index.html
           css/
           images/
           META-INF/
           pages/
           WEB-INF/
           ...
    

    To run the web application start the jetty_run.bat (i.e. open the dir with the explorer and double click the bat-file).

    That’s it 😀

    This article was the first part if the tutorial … in the second part I will show you how to build a windows exe package with a runnable web application inside …

     
    • tplee923 19:54 am Donnerstag, 16. Juni 2011 Permalink | Zum Antworten anmelden

      When I use your code, and execute the bat file, why I get the error:
      java.lang.ClassNotFoundException: org.mortbay.xml.XmlConfiguration
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at org.mortbay.start.Main.invokeMain(Main.java:179)
      at org.mortbay.start.Main.start(Main.java:534)
      at org.mortbay.start.Main.start(Main.java:441)
      at org.mortbay.start.Main.main(Main.java:119)

  • Andreas Höhmann 12:21 am Thursday, 11. February 2010 Permalink |
    Tags: antihype, hype, Maven   

    Yet another Maven discussion 

    I posted a comment to the Code Buzz Blog.

     
  • Andreas Höhmann 15:03 am Thursday, 26. November 2009 Permalink |
    Tags: , Maven, , ,   

    Concept to handle minimal and maximal tests in a maven project 

    In real world applications we have all too often external dependencies in test cases. Sometimes theses third party are not always available (i.e. remote webservices).

    For continuous integration I want check a minimal set of tests but for my local development i want check a maximal set of tests. I want run my tests on command line (via maven) and in eclipse (via testng-plugin).

    Here is my idea to do that …

    My project super pom defines 2 profiles:

    • test-min
      1. active by default
      2. exclude testng groups (online-tests, thirdparty-tests,…)
    • test-max
      1. run a defined testng suite
      2. the suite defines a maximal set of test (all testng groups)
    <profiles>
      <profile>
        <id>test-min</id>
        <activation>
          <activeByDefault>true</activeByDefault>
        </activation>
        <build>
          <plugins>
            <plugin>
              <artifactId>maven-surefire-plugin</artifactId>
              <inherited>true</inherited>
              <configuration>
                <excludedGroups>${excludedTestGroups}</excludedGroups>
              </configuration>
            </plugin>
          </plugins>
        </build>
      </profile>
      <profile>
        <id>test-max</id>
        <build>
          <plugins>
            <plugin>
              <artifactId>maven-surefire-plugin</artifactId>
              <inherited>true</inherited>
              <configuration>
                <suiteXmlFiles>
                  ${basedir}/src/test/resources/Testsuite.xml
                </suiteXmlFiles>
              </configuration>
            </plugin>
          </plugins>
        </build>
      </profile>
    </profiles>
    <properties>
      <excludedTestGroups>online,integration,thirdparty</excludedTestGroups>
    </properties>
    

    Each subproject must define a testng src/test/resources/Testsuite.xml:

    <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
    <suite name="TestSuite for Foobar">
      <test name="Online Tests">
        <packages>
          <package name="de.foobar.*" />
        </packages>
        <groups>
          <run>
            <include name="online" />
          </run>
        </groups>
      </test>
      <test name="Integration Tests">
        <packages>
          <package name="de.foobar.*" />
        </packages>
        <groups>
          <run>
            <include name="integration" />
          </run>
        </groups>
      </test>
      <test name="Thirdparty Tests">
        <packages>
          <package name="de.foobar.*" />
        </packages>
        <groups>
          <run>
            <include name="thirdparty" />
          </run>
        </groups>
      </test>
      <!-- Each project can define MORE groups: i.e. "interactive" -->
      <test name="Other Tests">
        <packages>
          <package name="de.foobar.*" />
        </packages>
        <groups>
          <run>
            <exclude name="online" />
            <exclude name="integration" />
            <exclude name="thirdparty" />
            <!-- Each project can define MORE groups: i.e. "interactive" -->
          </run>
        </groups>
      </test>
    </suite>
    

    If the sub project defines more exclude groups (i.e. a additional „interactive“ group) then the pom must overwrite the excludedTestGroups property:

    <properties>
      <excludedTestGroups>online,integration,thirdparty,interactive</excludedTestGroups>
    </properties>
    

    To check the correct configuration of the two profiles we can use help:effective-pom:

    mvn -Ptest-min help:effective-pom | less

    <plugin>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
        <excludedGroups>online,integration,thirdparty,interactive</excludedGroups>
      </configuration>
    </plugin>
    

    mvn -Ptest-max help:effective-pom | less

    <plugin>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
        <suiteXmlFiles>
          <suiteXmlFile>d:\foobar\src/test/resources/Testsuite.xml</suiteXmlFile>
        </suiteXmlFiles>
      </configuration>
    </plugin>
    

    Now I can run min/max tests for each project which depend on the above super-pom. The test-min is the default profile and would be used on the continuous integration system (i.e. TeamCity).

    Try it 🙂

     
    • Thomas Wabner 10:09 am Dienstag, 31. Januar 2012 Permalink | Zum Antworten anmelden

      Short info … the current 2.11 version of the surefire plugin contains a bug with the „excludeGroups“ rule … you need to wait for 2.12 or just use 2.10.

  • Andreas Höhmann 14:39 am Tuesday, 17. November 2009 Permalink |
    Tags: , , , Maven, , , self signed, ssl   

    Maven https repository with self-signed ssl certificate 

    For a private project I try to use nexus behind apache and ssl. I used a self-signed certificate.

    But each nexus repository request ends with a security exception:

    [WARNING] repository metadata for: 'artifact org.apache.maven.plugins:maven-enforcer-plugin' could not be retrieved from repository: nexus-plugin-releases due to an error: Error transferring file: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    I found many site for that problem and they describe always the same solution

    import the self signed cert in your local truststore!

    … here are the steps:

    1. download the certificate
    2. create a local truststore and import the certificat
    3. call maven with the correct security properties

    The import is simple  (java keytool):

    keytool.exe -importcert
                -alias nexus-xxx
                -keystore xxx.jks
                -storepass secret
                -file xxx.crt

    For maven I’m using a cygwin bash alias:

    alias mvn_xxx='/cygdrive/d/maven-2.2.1/bin/mvn
    -gs "d:/maven-2.2.1/conf/settings-xxx.xml"
    -s "d:/maven-2.2.1/conf/settings-xxx.xml"
    -Djavax.net.ssl.trustStore=d:/maven-2.2.1/conf/xxx.jks
    -Djavax.net.ssl.trustStorePassword=secret'

    I point the global config  (-gs) and the personal config (-s) to the same file to ignore other configuration from my default maven config file (i.e. common mirros settings / repositories etc.).

    And at least here is my complete maven setting-nexus settings:

    <?xml version="1.0" encoding="UTF-8"?>
    <settings xmlns="http://maven.apache.org/settings/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    
      <localRepository>D:\maven-repository-xxx</localRepository>
    
      <mirrors>
        <mirror>
          <id>xxx-nexus-snapshots</id>
          <mirrorOf>nexus-snapshots</mirrorOf>
          <url>https://nexus.xxx.com/content/groups/public-snapshots/</url>
        </mirror>
        <mirror>
          <id>xxx-nexus-snapshots</id>
          <mirrorOf>nexus-plugin-snapshots</mirrorOf>
          <url>https://nexus.xxx.com/content/groups/public-snapshots/</url>
        </mirror>
        <mirror>
          <id>xxx-nexus-releases</id>
          <mirrorOf>nexus-releases</mirrorOf>
          <url>https://nexus.xxx.com/content/groups/public/</url>
        </mirror>
        <mirror>
          <id>xxx-nexus-releases</id>
          <mirrorOf>nexus-plugin-releases</mirrorOf>
          <url>https://nexus.xxx.com/content/groups/public/</url>
        </mirror>
        <mirror>
          <id>xxx-nexus-releases</id>
          <mirrorOf>*</mirrorOf>
          <url>https://nexus.xxx.com/content/groups/public/</url>
        </mirror>
      </mirrors>
    
      <profiles>
        <profile>
          <id>xxx-nexus-mirror</id>
          <activation>
            <activeByDefault>true</activeByDefault>
          </activation>
          <repositories>
            <repository>
              <id>nexus-releases</id>
              <url>http://foobar</url>
              <releases>
                <enabled>true</enabled>
              </releases>
              <snapshots>
                <enabled>false</enabled>
              </snapshots>
            </repository>
            <repository>
              <id>nexus-snapshots</id>
              <url>http://foobar</url>
              <releases>
                <enabled>false</enabled>
              </releases>
              <snapshots>
                <enabled>true</enabled>
              </snapshots>
            </repository>
          </repositories>
          <pluginRepositories>
            <pluginRepository>
              <id>nexus-plugin-releases</id>
              <url>http://foobar</url>
              <releases>
                <enabled>true</enabled>
              </releases>
              <snapshots>
                <enabled>false</enabled>
              </snapshots>
            </pluginRepository>
            <pluginRepository>
              <id>nexus-plugin-snapshots</id>
              <url>http://foobar</url>
              <releases>
                <enabled>false</enabled>
              </releases>
              <snapshots>
                <enabled>true</enabled>
              </snapshots>
            </pluginRepository>
          </pluginRepositories>
        </profile>
      </profiles>
    
      <servers>
        <server>
          <id>xxx-nexus-releases</id>
          <username>foo</username>
          <password>bar</password>
        </server>
        <server>
          <id>xxx-nexus-snapshots</id>
          <username>foo</username>
          <password>bar</password>
        </server>
      </servers>
    
    </settings>
    

    You can replace xxx with your personal domain-alias.

     
    • rherrick 21:00 am Dienstag, 31. August 2010 Permalink | Zum Antworten anmelden

      Very helpful post, thanks for taking the time to document this!

      I streamlined the command a little bit by setting MAVEN_OPTS to hold the -Dxxx options. So you would then have:

      MAVEN_OPTS=-Djavax.net.ssl.trustStore=d:/maven-2.2.1/conf/xxx.jks -Djavax.net.ssl.trustStorePassword=secret

      And you could run the command like this:

      mvn -gs xxx -s xxx clean install

    • joltcan 21:02 am Sonntag, 10. Februar 2013 Permalink | Zum Antworten anmelden

      Thank you so much, the keystore tip saved my dat!

  • Andreas Höhmann 18:08 am Friday, 13. November 2009 Permalink |
    Tags: , Maven, osgi, rcp,   

    Build eclipse applications with maven 3 

    The  tool chain for building eclipse based applications with maven becomes better and better.

    Read here.

    I know 2 projects using maven to build eclipse plugins:

    Which project are there else?

     
  • Andreas Höhmann 15:57 am Monday, 2. November 2009 Permalink |
    Tags: , , , function, java rebel, jrebel, Maven   

    Toggle jrebel with a cygwin bash function and maven 

    I’m using java rebel for web development with maven.

    Sometimes I would run jetty with jrebel sometimes without.

    For that I’m using two simple bash functions:

    # ~/.bashrc
    
    #
    # Maven options
    #
    export INTERNAL_MAVEN_OPTS="-Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m"
    
    #
    # Java Rebel
    #
    export JAVA_REBEL="-Drebel.spring_plugin=true -noverify -javaagent:D:/tools/javarebel/jrebel.jar -Drebel.packages=de.ahoehma"
    
    function jrebel_on() {
     export MAVEN_OPTS="$INTERNAL_MAVEN_OPTS $JAVA_REBEL"
    }
    
    function jrebel_off() {
     export MAVEN_OPTS="$INTERNAL_MAVEN_OPTS"
    }
    

    Now its very simple to enable

    $ jrebel_on
    

    or disable jrebel

    $ jrebel_off
    
     
c
Neuen Beitrag erstellen
j
nächster Beitrag/nächster Kommentar
k
vorheriger Beitrag/vorheriger Kommentar
r
Antworten
e
Bearbeiten
o
zeige/verstecke Kommentare
t
Zum Anfang gehen
l
zum Login
h
Zeige/Verberge Hilfe
Shift + ESC
Abbrechen