Skip to content

Commit

Permalink
Add a new example project spring-console. It is just a template now.
Browse files Browse the repository at this point in the history
  • Loading branch information
v-ladynev committed Oct 16, 2015
1 parent 56920f5 commit ac5db8a
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 121 deletions.
249 changes: 129 additions & 120 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,120 +1,129 @@
subprojects {
apply plugin: 'java'

sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6

repositories {
mavenCentral()
mavenLocal()
}

dependencies {
testCompile 'junit:junit:4.12'
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives javadocJar, sourcesJar
}
}

project(':fluent-hibernate-core') {
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'

group = "com.github.v-ladynev"
version = "0.1.3"
description = "Library to work with Hibernate by fluent API"
archivesBaseName = "fluent-hibernate-core"

dependencies {
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.36'
compile group: 'org.hibernate', name: 'hibernate-core', version: '5.0.1.Final'
testCompile 'com.h2database:h2:1.4.189'
testCompile 'org.assertj:assertj-core:1.7.1'
}

signing {
sign configurations.archives
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'Fluent Hibernate Core'
packaging 'jar'
description "A library to work with Hibernate by fluent API. This library hasn't dependencies except Hibernate dependencies. It requires Java 1.6 and above."
url 'https://github.com/v-ladynev/fluent-hibernate'

scm {
connection 'scm:git:http://github.com/v-ladynev/fluent-hibernate'
developerConnection 'scm:git:https://github.com/v-ladynev/fluent-hibernate'
url 'http://github.com/v-ladynev/fluent-hibernate'
}

licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id 'v-ladynev'
name 'Vladimir Ladynev'
email 'v-ladynev@sonatype.com'
}
developer {
id 'levvy'
name 'Lucas Levvy'
email 'levvy@sonatype.com'
}
}
}.writeTo("build/libs/"+archivesBaseName+"-"+version+".pom")
}
}
}
}

project(':fluent-hibernate-examples').subprojects {
dependencies {
compile project(':fluent-hibernate-core')
}
}

project(':fluent-hibernate-examples:simply-console') {
apply plugin: 'application'
apply plugin: 'eclipse'

group = "com.github.v-ladynev"
description = "A simply example console project using 'fluent-hibernate' library with MySQL"
mainClassName = "com.github.fluent.hibernate.example.mysql.MySqlExample"
}

task wrapper(type: Wrapper) {
gradleVersion = '2.7'
}
subprojects {
apply plugin: 'java'

sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6

repositories {
mavenCentral()
mavenLocal()
}

dependencies {
testCompile 'junit:junit:4.12'
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives javadocJar, sourcesJar
}
}

project(':fluent-hibernate-core') {
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'

group = "com.github.v-ladynev"
version = "0.1.3"
description = "Library to work with Hibernate by fluent API"
archivesBaseName = "fluent-hibernate-core"

dependencies {
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.36'
compile group: 'org.hibernate', name: 'hibernate-core', version: '5.0.1.Final'
testCompile 'com.h2database:h2:1.4.189'
testCompile 'org.assertj:assertj-core:1.7.1'
}

signing {
sign configurations.archives
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'Fluent Hibernate Core'
packaging 'jar'
description "A library to work with Hibernate by fluent API. This library hasn't dependencies except Hibernate dependencies. It requires Java 1.6 and above."
url 'https://github.com/v-ladynev/fluent-hibernate'

scm {
connection 'scm:git:http://github.com/v-ladynev/fluent-hibernate'
developerConnection 'scm:git:https://github.com/v-ladynev/fluent-hibernate'
url 'http://github.com/v-ladynev/fluent-hibernate'
}

licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id 'v-ladynev'
name 'Vladimir Ladynev'
email 'v-ladynev@sonatype.com'
}
developer {
id 'levvy'
name 'Lucas Levvy'
email 'levvy@sonatype.com'
}
}
}.writeTo("build/libs/"+archivesBaseName+"-"+version+".pom")
}
}
}
}

project(':fluent-hibernate-examples').subprojects {
dependencies {
compile project(':fluent-hibernate-core')
}
}

project(':fluent-hibernate-examples:simply-console') {
apply plugin: 'application'
apply plugin: 'eclipse'

group = "com.github.v-ladynev"
description = "A simply example console project using fluent-hibernate library with MySQL"
mainClassName = "com.github.fluent.hibernate.example.mysql.MySqlExample"
}

project(':fluent-hibernate-examples:spring-console') {
apply plugin: 'application'
apply plugin: 'eclipse'

group = "com.github.v-ladynev"
description = "An example console project using fluent-hibernate, Spring and MySQL"
mainClassName = "com.github.fluent.hibernate.example.spring.console.SpringConsoleExample"
}

task wrapper(type: Wrapper) {
gradleVersion = '2.7'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.github.fluent.hibernate.example.spring.console;

/**
*
* @author V.Ladynev
*/
public class SpringConsoleExample {

public static void main(String[] args) {
System.out.println("xxx");
}

}
3 changes: 2 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include 'fluent-hibernate-core'
include 'fluent-hibernate-examples:simply-console'
include 'fluent-hibernate-examples:simply-console'
include 'fluent-hibernate-examples:spring-console'

0 comments on commit ac5db8a

Please sign in to comment.