Skip to content

Instantly share code, notes, and snippets.

View jlandure's full-sized avatar
💭
👋

Julien Landuré jlandure

💭
👋
View GitHub Profile
@jlandure
jlandure / gist:3136189
Created July 18, 2012 13:23
pom-perf4j.xml
<dependency>
<groupid>org.perf4j</groupId>
<artifactid>perf4j</artifactId>
<version>0.9.16</version>
</dependency>
@jlandure
jlandure / gist:3136269
Created July 18, 2012 13:39
TestPerfHashmap.java
import java.util.HashMap;
import javax.cache.CacheException;
import org.perf4j.StopWatch;
public class TestPerfHashmap {
public static final String KEY = "KEY";
public static final String VALUE = "VALUE";
@jlandure
jlandure / gist:3136276
Created July 18, 2012 13:41
pom-guava.xml
<dependency>
<groupid>com.google.guava</groupId>
<artifactid>guava</artifactId>
<version>12.0</version>
</dependency>
@jlandure
jlandure / gist:3136278
Created July 18, 2012 13:42
TestPerfGuavaCache.java
import java.util.concurrent.TimeUnit;
import org.perf4j.StopWatch;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
public class TestPerfGuavaCache {
public static final String KEY = "KEY";
@jlandure
jlandure / gist:3136281
Created July 18, 2012 13:43
pom-ehcache.xml
<dependency>
<groupid>net.sf.ehcache</groupId>
<artifactid>ehcache-jcache</artifactId>
<version>1.4.0-beta1</version>
</dependency>
@jlandure
jlandure / gist:3136285
Created July 18, 2012 13:43
TestPerfJCache.java
import java.util.concurrent.TimeUnit;
import javax.cache.Cache;
import javax.cache.CacheConfiguration.Duration;
import javax.cache.CacheConfiguration.ExpiryType;
import javax.cache.CacheException;
import javax.cache.Caching;
import org.perf4j.StopWatch;
@jlandure
jlandure / gist:3170852
Created July 24, 2012 15:59
pom-hibernate3-maven-plugin.xml
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>jpaconfiguration</implementation>
<outputDirectory>target/sql</outputDirectory>
@jlandure
jlandure / gist:3170865
Created July 24, 2012 16:01
pom-hibernate3-maven-plugin_avecPU.xml
<componentProperties>
<persistenceunit>monPU</persistenceunit>
<outputfilename>db-scheme.sql</outputfilename>
<create>true</create>
<export>false</export>
<format>true</format>
</componentProperties>
@jlandure
jlandure / gist:3170883
Created July 24, 2012 16:05
persistence.xml
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit name="DefaultPersistenceUnit" transaction-type="RESOURCE_LOCAL">
<properties>
<!--
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
-->
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
</properties>
</persistence-unit>
</persistence>
@jlandure
jlandure / gist:3175119
Last active October 7, 2015 13:57
maven command line
mvn -Dmaven.test.skip
mvn dependency:resolve
mvn dependency:tree : arbre
mvn install:install-file -Dfile=as3corelib.swc -DgroupId=com.adobe -DartifactId=as3corelib -Dversion=0.93 -Dpackaging=swc -DgeneratePom=true -DcreateChecksum=true
#compiler src/test/java car compile tout court ne fait que src/main/java
mvn test-compile
mvn versions:set -DnewVersion=1.2.3-SNAPSHOT