Skip to content

Commit

Permalink
Fixing the issue with Spring namespace handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
palych-piter committed Apr 28, 2017
1 parent bbc8e91 commit df8723c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 11 deletions.
53 changes: 42 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
group 'excel2db'
version '1.0'
version '2.0'

apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
}
}

sourceSets {
main {
java {
exclude 'src/main/resources/excel2db.properties'
}
}
}

//For building a single jar with all dependencies run "gradlew shadowJar"
// Configure the shadow jar task
shadowJar {
// exclude properties file from jar
exclude('excel2db.properties')
mergeServiceFiles()
}


sourceCompatibility = '1.8'
targetCompatibility = '1.8'
Expand All @@ -14,13 +41,11 @@ repositories {
dependencies {

compile project (":common")
// compile files('libs/common.jar')
compile 'ch.qos.logback:logback-classic:1.2.2'
// compile('org.springframework:spring-context:4.3.7.RELEASE') {
// exclude module: 'commons-logging' // force Spring to use jcl-over-slf4j bridge
// }
compile 'javax.persistence:persistence-api:1.0.2'
compile 'org.springframework:spring-context:4.3.7.RELEASE'
compile ('org.springframework:spring-context:4.3.7.RELEASE'){
//exclude module: 'commons-logging' // force Spring to use jcl-over-slf4j bridge
}
compile 'org.apache.poi:poi:3.15'
compile 'org.apache.poi:poi-ooxml:3.15'
compile 'org.postgresql:postgresql:42.0.0.jre7'
Expand All @@ -30,17 +55,23 @@ dependencies {


jar {

manifest {

attributes(
"Implementation-Title": "Gradle",
"Implementation-Version": version,
"Main-Class": "excel2db.excel2db"
)
"Implementation-Title": "Gradle",
"Implementation-Version": version,
"Main-Class": "excel2db.excel2db"
)
}

from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}

}





1 change: 1 addition & 0 deletions src/main/resources/spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<context:component-scan base-package="excel2db" />
<context:property-placeholder location="classpath:excel2db.properties, file:excel2db.properties" ignore-resource-not-found="true"/>


<bean id = "excel2db" class = "excel2db.excel2db" scope="singleton">
<property name="dbConnection" ref="dbConnection"></property>
<!--<property name="createTable" ref="createTable"></property>-->
Expand Down

0 comments on commit df8723c

Please sign in to comment.