diff --git a/build.third_step0.gradle b/build.third_step0.gradle index 0a76a7a51..a7d30d649 100644 --- a/build.third_step0.gradle +++ b/build.third_step0.gradle @@ -16,7 +16,7 @@ targetCompatibility=1.7 //解压lib下的jar到classes文件夹 -version='10.0' + jar{ baseName="fine-third" zip64 true @@ -42,11 +42,21 @@ FileTree files =fileTree(dir:'./',include:'build*.gradle') def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) +def date = new Date() +def formattedDate = date.format('yyyy.MM.dd') + def srcDir="." -def MVN_BRANCH = branchVariable.toUpperCase() +def maven_version_build = "" +def indexV = branchName.indexOf( "%2F"); +if(indexV != -1){ + version= branchName.substring(indexV+3, branchName.length()).toUpperCase() + maven_version_build = project.version +"-" + branchName.substring(0, indexV).toUpperCase() +"-SNAPSHOT" +} else { + version= branchName + maven_version_build = project.version +"-SNAPSHOT" +} -// @branch - 分支信息 -def maven_version="${version}-${MVN_BRANCH}-SNAPSHOT" +def maven_version="${version}.${formattedDate}" def jar_version = version configurations { @@ -67,13 +77,32 @@ publishing { groupId "com.fr.third" artifactId "fine-third" version maven_version + ext.repo = 'release' + from components.java + } + + third_build(MavenPublication) { + groupId "com.fr.third" + artifactId "fine-third" + version maven_version_build + ext.repo = 'snapshot' from components.java } } repositories { maven { - - url "http://mvn.finedevelop.com/repository/fanruan/" + name "release" + url "http://mvn.finedevelop.com/repository/fanruan-release/" + credentials { + username = findProperty("NEXUS_USERNAME") + password = findProperty("NEXUS_PASSWORD") + } + + } + + maven { + name "snapshot" + url "http://mvn.finedevelop.com/repository/fanruan/" credentials { username = findProperty("NEXUS_USERNAME") password = findProperty("NEXUS_PASSWORD") @@ -83,6 +112,17 @@ publishing { } } + +afterEvaluate { + tasks.withType(PublishToMavenRepository) { task -> + if (task.publication.hasProperty('repo') && task.publication.repo != task.repository.name) { + task.enabled = false + task.group = null + } + } +} + + task unpack(type:Copy) { delete classesDir destinationDir=file(classesDir) @@ -114,4 +154,3 @@ task unpack(type:Copy) { } jar.dependsOn unpack - diff --git a/fine-jackson/src/main/java/com/fr/third/fasterxml/jackson/databind/type/ClassFactory.java b/fine-jackson/src/main/java/com/fr/third/fasterxml/jackson/databind/type/ClassFactory.java index 890f77a89..fb6354f38 100644 --- a/fine-jackson/src/main/java/com/fr/third/fasterxml/jackson/databind/type/ClassFactory.java +++ b/fine-jackson/src/main/java/com/fr/third/fasterxml/jackson/databind/type/ClassFactory.java @@ -8,4 +8,4 @@ public interface ClassFactory { Class classForName(String className) throws ClassNotFoundException; Class classForName(String className, ClassLoader classLoader) throws ClassNotFoundException; -} \ No newline at end of file +} diff --git a/fine-jackson/src/main/java/com/fr/third/fasterxml/jackson/databind/type/TypeFactory.java b/fine-jackson/src/main/java/com/fr/third/fasterxml/jackson/databind/type/TypeFactory.java index 9d9455cb6..efa990886 100644 --- a/fine-jackson/src/main/java/com/fr/third/fasterxml/jackson/databind/type/TypeFactory.java +++ b/fine-jackson/src/main/java/com/fr/third/fasterxml/jackson/databind/type/TypeFactory.java @@ -137,7 +137,7 @@ public final class TypeFactory * ClassLoader used by this factory [databind#624]. */ protected final ClassLoader _classLoader; - + private ClassFactory classFactory; /* @@ -146,6 +146,7 @@ public final class TypeFactory /********************************************************** */ + public void setClassFactory(ClassFactory classFactory) { this.classFactory = classFactory; diff --git a/fine-spring/pom.xml b/fine-spring/pom.xml index 8c03f0952..5fa28d6c9 100644 --- a/fine-spring/pom.xml +++ b/fine-spring/pom.xml @@ -65,7 +65,7 @@ fine-javax-annotation ${revision} - 以下是lib的本地jar包依赖<--> + libıjar<--> com.fr.third aopalliance diff --git a/pom.xml b/pom.xml new file mode 100644 index 000000000..992aad557 --- /dev/null +++ b/pom.xml @@ -0,0 +1,23 @@ + + + 4.0.0 + + fine-hibernate + fine-druid + > + + + com.fr.maven + finereport-maven + 10.0 + ../finereport-maven + + + com.fr.third + base-third-code + ${branch} + pom + + \ No newline at end of file