-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new example project spring-console. It is just a template now.
- Loading branch information
Showing
3 changed files
with
144 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} |
13 changes: 13 additions & 0 deletions
13
...rc/main/java/com/github/fluent/hibernate/example/spring/console/SpringConsoleExample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |