BATCH-2699: move derby's generated files under "build" directory

This commit is contained in:
Mahmoud Ben Hassine
2018-04-13 16:30:22 +02:00
parent a8ecb4fdcf
commit 8748fff396
5 changed files with 11 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2009-2014 the original author or authors.
* Copyright 2009-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@ import org.springframework.beans.factory.config.AbstractFactoryBean;
public class DerbyDataSourceFactoryBean extends AbstractFactoryBean<DataSource> {
private String dataDirectory = "derby-home";
private String dataDirectory = "build/derby-home";
public void setDataDirectory(String dataDirectory) {
this.dataDirectory = dataDirectory;
@@ -38,7 +38,7 @@ public class DerbyDataSourceFactoryBean extends AbstractFactoryBean<DataSource>
System.setProperty("derby.storage.pageCacheSize", "100");
final EmbeddedDataSource ds = new EmbeddedDataSource();
ds.setDatabaseName("derbydb");
ds.setDatabaseName("build/derbydb");
ds.setCreateDatabase("create");
return ds;

View File

@@ -1,7 +1,7 @@
# Placeholders batch.*
# for Derby:
batch.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
batch.jdbc.url=jdbc:derby:derby-home/test;create=true
batch.jdbc.url=jdbc:derby:build/derby-home/test;create=true
batch.jdbc.user=sa
batch.jdbc.password=
batch.jdbc.testWhileIdle=false

View File

@@ -1,7 +1,7 @@
# Placeholders batch.*
# for Derby:
batch.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
batch.jdbc.url=jdbc:derby:derby-home/test;create=true
batch.jdbc.url=jdbc:derby:build/derby-home/test;create=true
batch.jdbc.user=app
batch.jdbc.password=
batch.jdbc.testWhileIdle=false
@@ -12,4 +12,4 @@ batch.business.schema.script=classpath:/org/springframework/batch/jms/init.sql
batch.data.source.init=true
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.DerbyMaxValueIncrementer
batch.database.incrementer.parent=columnIncrementerParent
batch.verify.cursor.position=false
batch.verify.cursor.position=false

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2009 the original author or authors.
* Copyright 2006-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@ public class DatabaseTypeIntegrationTests {
@Test
public void testDerby() throws Exception {
DataSource dataSource = DatabaseTypeTestUtils.getDataSource(org.apache.derby.jdbc.EmbeddedDriver.class,
"jdbc:derby:derby-home/test;create=true", "sa", "");
"jdbc:derby:./build/derby-home/test;create=true", "sa", "");
assertEquals(DatabaseType.DERBY, DatabaseType.fromMetaData(dataSource));
dataSource.getConnection();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2014 the original author or authors.
* Copyright 2010-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ public class DerbyDataSourceFactoryBean extends AbstractFactoryBean<DataSource>
private static Log logger = LogFactory.getLog(DerbyDataSourceFactoryBean.class);
private String dataDirectory = "derby-home";
private String dataDirectory = "build/derby-home";
public void setDataDirectory(String dataDirectory) {
this.dataDirectory = dataDirectory;
@@ -42,7 +42,7 @@ public class DerbyDataSourceFactoryBean extends AbstractFactoryBean<DataSource>
System.setProperty("derby.storage.pageCacheSize", "100");
final EmbeddedDataSource ds = new EmbeddedDataSource();
ds.setDatabaseName("derbydb");
ds.setDatabaseName("build/derbydb");
ds.setCreateDatabase("create");
logger.info("Created instance of " + ds.toString());