cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject cayenne git commit: Fix Gradle build on Windows
Date Wed, 31 May 2017 09:35:15 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 82afc7b82 -> 97396d454


Fix Gradle build on Windows


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/97396d45
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/97396d45
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/97396d45

Branch: refs/heads/master
Commit: 97396d454b31c8263079ee34626ad82a548fa0b1
Parents: 82afc7b
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Wed May 31 12:35:09 2017 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
Committed: Wed May 31 12:35:09 2017 +0300

----------------------------------------------------------------------
 cayenne-gradle-plugin/build.gradle                            | 2 +-
 cayenne-gradle-plugin/pom.xml                                 | 3 ++-
 .../src/test/java/org/apache/cayenne/tools/BaseTaskIT.java    | 7 +++----
 .../test/java/org/apache/cayenne/tools/DbGenerateTaskIT.java  | 4 ++--
 .../src/test/java/org/apache/cayenne/tools/DbImportIT.java    | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/97396d45/cayenne-gradle-plugin/build.gradle
----------------------------------------------------------------------
diff --git a/cayenne-gradle-plugin/build.gradle b/cayenne-gradle-plugin/build.gradle
index 0068cfd..530eb65 100644
--- a/cayenne-gradle-plugin/build.gradle
+++ b/cayenne-gradle-plugin/build.gradle
@@ -46,7 +46,7 @@ def getProjectVersion() {
 
 def classpathFile = file('build/classpath.txt')
 if (classpathFile.file) {
-    String[] paths = classpathFile.text.split(':')
+    String[] paths = classpathFile.text.split(';')
     dependencies {
         add 'compile', files(paths)
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/97396d45/cayenne-gradle-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-gradle-plugin/pom.xml b/cayenne-gradle-plugin/pom.xml
index 45472e8..e18b0f5 100644
--- a/cayenne-gradle-plugin/pom.xml
+++ b/cayenne-gradle-plugin/pom.xml
@@ -48,7 +48,7 @@
                 </os>
             </activation>
             <properties>
-                <gradle.executable>./gradlew.bat</gradle.executable>
+                <gradle.executable>gradlew.bat</gradle.executable>
             </properties>
         </profile>
         <profile>
@@ -80,6 +80,7 @@
                         </goals>
                         <configuration>
                             <outputFile>build/classpath.txt</outputFile>
+                            <pathSeparator>;</pathSeparator>
                         </configuration>
                     </execution>
                 </executions>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/97396d45/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/BaseTaskIT.java
----------------------------------------------------------------------
diff --git a/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/BaseTaskIT.java
b/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/BaseTaskIT.java
index d73f4f0..a1c53d7 100644
--- a/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/BaseTaskIT.java
+++ b/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/BaseTaskIT.java
@@ -50,7 +50,7 @@ public class BaseTaskIT {
         projectDir = tempFolder.newFolder();
     }
 
-    protected GradleRunner createRunner(String projectName, String... args) throws IOException
{
+    protected GradleRunner createRunner(String projectName, String... args) throws Exception
{
         prepareBuildScript(projectName);
 
         List<String> gradleArguments = new ArrayList<>();
@@ -63,9 +63,8 @@ public class BaseTaskIT {
                 .withArguments(gradleArguments);
     }
 
-    private void prepareBuildScript(String name) throws IOException {
-        String projectFileSrc = URLDecoder.decode(getClass().getResource(name + ".gradle").getFile(),
"UTF-8");
-        Path src = FileSystems.getDefault().getPath(projectFileSrc);
+    private void prepareBuildScript(String name) throws Exception {
+        Path src = new File(getClass().getResource(name + ".gradle").toURI()).toPath();
         Path dst = FileSystems.getDefault().getPath(projectDir.getAbsolutePath(), "build.gradle");
         Files.copy(src, dst, StandardCopyOption.REPLACE_EXISTING);
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/97396d45/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/DbGenerateTaskIT.java
----------------------------------------------------------------------
diff --git a/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/DbGenerateTaskIT.java
b/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/DbGenerateTaskIT.java
index daae050..87c1194 100644
--- a/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/DbGenerateTaskIT.java
+++ b/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/DbGenerateTaskIT.java
@@ -37,7 +37,7 @@ import static org.junit.Assert.assertTrue;
 public class DbGenerateTaskIT extends BaseTaskIT {
 
     @Test
-    public void notConfiguredTaskFailure() throws IOException {
+    public void notConfiguredTaskFailure() throws Exception {
         GradleRunner runner = createRunner("cdbgen_failure", "cdbgen", "--info");
 
         BuildResult result = runner.buildAndFail();
@@ -80,7 +80,7 @@ public class DbGenerateTaskIT extends BaseTaskIT {
     }
 
     @Test
-    public void customConfigTaskSuccess() throws IOException {
+    public void customConfigTaskSuccess() throws Exception {
         GradleRunner runner = createRunner(
                 "cdbgen_custom",
                 "customCdbgen",

http://git-wip-us.apache.org/repos/asf/cayenne/blob/97396d45/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/DbImportIT.java
----------------------------------------------------------------------
diff --git a/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/DbImportIT.java
b/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/DbImportIT.java
index efb12da..0b45f6b 100644
--- a/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/DbImportIT.java
+++ b/cayenne-gradle-plugin/src/test/java/org/apache/cayenne/tools/DbImportIT.java
@@ -43,7 +43,7 @@ import static org.junit.Assert.*;
 public class DbImportIT extends BaseTaskIT {
 
     @Test
-    public void notConfiguredTaskFailure() throws IOException {
+    public void notConfiguredTaskFailure() throws Exception {
         GradleRunner runner = createRunner("dbimport_failure", "cdbimport", "--info");
 
         BuildResult result = runner.buildAndFail();
@@ -55,7 +55,7 @@ public class DbImportIT extends BaseTaskIT {
     }
 
     @Test
-    public void emptyDbTaskSuccess() throws IOException {
+    public void emptyDbTaskSuccess() throws Exception {
         GradleRunner runner = createRunner("dbimport_empty_db", "cdbimport", "--info");
 
         BuildResult result = runner.build();


Mime
View raw message