Replace usage of "build" directory with "target"

This commit is contained in:
Mahmoud Ben Hassine
2020-12-17 16:33:38 +01:00
parent d62f966e68
commit d0493906a8
46 changed files with 65 additions and 65 deletions

View File

@@ -208,7 +208,7 @@ public class StoredProcedureItemReaderBuilderTests {
public DerbyDataSourceFactoryBean dataSource() {
DerbyDataSourceFactoryBean derbyDataSourceFactoryBean = new DerbyDataSourceFactoryBean();
derbyDataSourceFactoryBean.setDataDirectory("build/derby-home");
derbyDataSourceFactoryBean.setDataDirectory("target/derby-home");
return derbyDataSourceFactoryBean;
}

View File

@@ -398,7 +398,7 @@ public class FlatFileItemReaderTests {
@Test
public void testDirectoryResource() throws Exception {
FileSystemResource resource = new FileSystemResource("build/data");
FileSystemResource resource = new FileSystemResource("target/data");
resource.getFile().mkdirs();
assertTrue(resource.getFile().isDirectory());
reader.setResource(resource);

View File

@@ -527,7 +527,7 @@ public class FlatFileItemWriterTests {
public void testOpenWithNonWritableFile() throws Exception {
writer = new FlatFileItemWriter<>();
writer.setLineAggregator(new PassThroughLineAggregator<>());
FileSystemResource file = new FileSystemResource("build/no-such-file.foo");
FileSystemResource file = new FileSystemResource("target/no-such-file.foo");
writer.setResource(file);
new File(file.getFile().getParent()).mkdirs();
file.getFile().createNewFile();
@@ -838,7 +838,7 @@ public class FlatFileItemWriterTests {
* If append=true a new output file should still be created on the first run (not restart).
*/
public void testAppendToNotYetExistingFile() throws Exception {
Resource toBeCreated = new FileSystemResource("build/FlatFileItemWriterTests.out");
Resource toBeCreated = new FileSystemResource("target/FlatFileItemWriterTests.out");
outputFile = toBeCreated.getFile(); //enable easy content reading and auto-delete the file

View File

@@ -318,7 +318,7 @@ public class MultiResourceItemReaderIntegrationTests {
*/
@Test
public void testDirectoryResources() throws Exception {
FileSystemResource resource = new FileSystemResource("build/data");
FileSystemResource resource = new FileSystemResource("target/data");
resource.getFile().mkdirs();
assertTrue(resource.getFile().isDirectory());
tested.setResources(new Resource[] { resource });

View File

@@ -70,7 +70,7 @@ public abstract class JsonFileItemWriterFunctionalTests {
@Before
public void setUp() throws Exception {
Path outputFilePath = Paths.get("build", "trades.json");
Path outputFilePath = Paths.get("target", "trades.json");
Files.deleteIfExists(outputFilePath);
this.resource = new FileSystemResource(outputFilePath.toFile());
this.executionContext = new ExecutionContext();
@@ -283,7 +283,7 @@ public abstract class JsonFileItemWriterFunctionalTests {
* If append=true a new output file should still be created on the first run (not restart).
*/
public void testAppendToNotYetExistingFile() throws Exception {
Resource toBeCreated = new FileSystemResource("build/FlatFileItemWriterTests.out");
Resource toBeCreated = new FileSystemResource("target/FlatFileItemWriterTests.out");
File outputFile = toBeCreated.getFile(); //enable easy content reading and auto-delete the file

View File

@@ -38,7 +38,7 @@ import static org.junit.Assert.fail;
*/
public class FileUtilsTests {
private File file = new File("build/FileUtilsTests.tmp");
private File file = new File("target/FileUtilsTests.tmp");
/**
* No restart + file should not be overwritten => file is created if it does

View File

@@ -542,7 +542,7 @@ public class StaxEventItemReaderTests {
@Test
public void testDirectoryResource() throws Exception {
FileSystemResource resource = new FileSystemResource("build/data");
FileSystemResource resource = new FileSystemResource("target/data");
resource.getFile().mkdirs();
assertTrue(resource.getFile().isDirectory());
source.setResource(resource);

View File

@@ -111,7 +111,7 @@ public class StaxEventItemWriterTests {
@Before
public void setUp() throws Exception {
File directory = new File("build/data");
File directory = new File("target/data");
directory.mkdirs();
resource = new FileSystemResource(File.createTempFile("StaxEventWriterOutputSourceTests", ".xml", directory));
writer = createItemWriter();

View File

@@ -75,7 +75,7 @@ public class StaxEventItemWriterBuilderTests {
@Before
public void setUp() throws IOException {
File directory = new File("build/data");
File directory = new File("target/data");
directory.mkdirs();
this.resource = new FileSystemResource(
File.createTempFile("StaxEventItemWriterBuilderTests", ".xml", directory));

View File

@@ -31,7 +31,7 @@ public class DatabaseTypeIntegrationTests {
@Test
public void testH2() throws Exception {
DataSource dataSource = DatabaseTypeTestUtils.getDataSource(org.h2.Driver.class,
"jdbc:h2:file:./build/data/sample");
"jdbc:h2:file:./target/data/sample");
assertEquals(DatabaseType.H2, DatabaseType.fromMetaData(dataSource));
dataSource.getConnection();
}
@@ -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:./build/derby-home/test;create=true", "sa", "");
"jdbc:derby:./target/derby-home/test;create=true", "sa", "");
assertEquals(DatabaseType.DERBY, DatabaseType.fromMetaData(dataSource));
dataSource.getConnection();
}

View File

@@ -60,8 +60,8 @@ public class LastModifiedResourceComparatorTests {
@Test
public void testCompareNewWithOldAfterCopy() throws Exception {
File temp1 = new File("build/temp1.txt");
File temp2 = new File("build/temp2.txt");
File temp1 = new File("target/temp1.txt");
File temp2 = new File("target/temp2.txt");
if (temp1.exists()) temp1.delete();
if (temp2.exists()) temp2.delete();
temp1.getParentFile().mkdirs();

View File

@@ -28,7 +28,7 @@ public class DerbyDataSourceFactoryBean extends AbstractFactoryBean<DataSource>
private static Log logger = LogFactory.getLog(DerbyDataSourceFactoryBean.class);
private String dataDirectory = "build/derby-home";
private String dataDirectory = "target/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("build/derbydb");
ds.setDatabaseName("target/derbydb");
ds.setCreateDatabase("create");
logger.info("Created instance of " + ds.toString());

View File

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

View File

@@ -14,7 +14,7 @@
</bean>
<bean id="dataSource" class="test.jdbc.datasource.DerbyDataSourceFactoryBean">
<property name="dataDirectory" value="build/derby-home"/>
<property name="dataDirectory" value="target/derby-home"/>
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">