Skip to content

Instantly share code, notes, and snippets.

View hferentschik's full-sized avatar

Hardy Ferentschik hferentschik

View GitHub Profile
@aslakknutsen
aslakknutsen / build.groovy
Created May 22, 2011 22:44
Auto generated Multi version testing tasks with Gradle
description: 'JUnit Implementation for the Arquillian Project'
dependencies {
compile project(':test:spi')
provided libraries.junit
testCompile project(':core:impl-base')
testCompile project(':test:impl-base')
testCompile libraries.mockito
@aslakknutsen
aslakknutsen / build.gradle
Created May 20, 2011 17:51
Gradle vs Maven
dependencies {
compile project(':test:api')
compile project(':test:impl-base') // Needed to extend TestExtension and include
compile project(':container:spi')
compile project(':container:test-api')
compile project(':container:test-spi')
compile libraries.shrinkwrap_impl
testCompile project(':core:impl-base')
@sebersole
sebersole / gist:976704
Created May 17, 2011 15:32
metadata (building) options
// Option 1 - Options part of MetadataBuilder which is more "natural" i think, but maybe not
// feasible if the binding code does know about MetadataBuilder (in which case see option 2).
public interface MetadataBuilder {
public static interface Options {
public boolean useNewIdentifierGenerators();
...
}
...
@gbadner
gbadner / gist:948758
Created April 29, 2011 18:22
Metamodel tasks
1) MetadataSources -> Metadata -> SessionFactory process
[HHH-6107] - Metamodel dependence on ServiceRegistry (Steve: done)
[HHH-6138] - Implement addition of annotated classes and packages in MetadataSources (Steve: done)
[HHH-6141] - Develop scheme for ordered processing of MetadataSources sources (Steve: done)
A) for HBM XML
[HHH-2578] - redesign SessionFactory building (Steve: done)
[HHH-6145] - Create an "xml binding" service (Steve: open)
B) for EM
[HHH-6149] - Clean up EJB3Configuration (Steve: open)
[HHH-6159] - Determine best way to handle EntityManagerFactory building
MetadataImpl constructor:
public MetadataImpl(MetadataSources metadataSources, ProcessingOrder preferredProcessingOrder) {
this.serviceRegistry = metadataSources.getServiceRegistry();
this.namingStrategy = metadataSources.getNamingStrategy();
final ArrayList<String> processedEntityNames = new ArrayList<String>();
if ( preferredProcessingOrder == ProcessingOrder.HBM_FIRST ) {
applyHibernateMappings( metadataSources, processedEntityNames );
applyAnnotationMappings( metadataSources, processedEntityNames );
@gunnarmorling
gunnarmorling / 1_SimpleMapping.java
Created April 25, 2011 12:20
HV-431: New approach by removing creational context from ConstraintDef completely
ConstraintMapping mapping = new ConstraintMapping();
mapping.type( Marathon.class )
.property( "name", METHOD )
.constraint( new SizeDef()
.message( "name too short" )
.min( 3 ) )
.constraint( new NotNullDef() )
.property( "numberOfHelpers", FIELD )
.constraint( new MinDef().value( 1 ) );
void doStuff() {
String userQuery = "...";
SearchService search = new SearchService();
//do the query and display it using your favorite tech
List<Car> results = search.searchCar( userQuery );
displayResultsOnScreen( results );
//build the Facet menu and display it
search.displayFacets();
@Sanne
Sanne / build.sh
Last active February 11, 2021 09:04 — forked from emmanuelbernard/build.sh
Build script
#!/bin/bash
# run ./build.sh
# it will clone your existing repo and run the maven tests off this clone
# the branch tests are run from is the current branch at the time of cloning
#
# Note that you can work on the next bug while this is going on
#
# ./build.sh
# runs maven clean install
#
@emmanuelbernard
emmanuelbernard / build.sh
Created November 5, 2010 09:49
Run your tests on a cloned local repository. Clone or sync up your current repo with a cloned repo in ../privatebuild/reponame and run maven clean test on it.
#!/bin/bash
#run ./build.sh on another terminal window
#it will clone your existing repo and run the maven tests off this clone
#the branch tests are run from is the current branch
#
# ./build.sh
#the cloned repo will live in ../DIRECTORY_ROOT/REPO_DIRECTORY
DIRECTORY_ROOT="../privatebuild/"