Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions elemental-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
<jaxb.api.version>3.0.1</jaxb.api.version>
<jaxb.impl.version>3.0.2</jaxb.impl.version>
<slf4j.version>2.0.17</slf4j.version>
<saxon.version>9.9.1-8</saxon.version>

<!-- Surefire parallel configuration -->
<surefire.forkCount>1C</surefire.forkCount>
Expand All @@ -129,6 +130,12 @@
<version>1.0.0</version>
</dependency>

<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>${saxon.version}</version>
</dependency>

<dependency>
<groupId>com.evolvedbinary.j8fu</groupId>
<artifactId>j8fu</artifactId>
Expand Down Expand Up @@ -216,6 +223,21 @@
<artifactId>jaxb-maven-plugin</artifactId>
<version>${jaxb.impl.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.2.0</version>
<configuration>
<transformerFactory>net.sf.saxon.TransformerFactoryImpl</transformerFactory>
</configuration>
<dependencies>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>${saxon.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
26 changes: 26 additions & 0 deletions exist-ant/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,32 @@
</licenseSets>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>validate-test-conf</id>
<phase>process-test-resources</phase>
<goals>
<goal>validate</goal>
</goals>
<configuration>
<validationSets>
<validationSet>
<validating>true</validating>
<dir>${project.build.testOutputDirectory}</dir>
<includes>
<include>conf.xml</include>
</includes>
</validationSet>
</validationSets>
</configuration>
</execution>
</executions>
</plugin>

</plugins>

</build>
Expand Down
698 changes: 22 additions & 676 deletions exist-ant/src/test/resources-filtered/conf.xml

Large diffs are not rendered by default.

60 changes: 56 additions & 4 deletions exist-core/pom.xml

Large diffs are not rendered by default.

26 changes: 25 additions & 1 deletion exist-core/src/main/java/org/exist/BTreeTest.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
/*
* Elemental
* Copyright (C) 2024, Evolved Binary Ltd
*
* admin@evolvedbinary.com
* https://www.evolvedbinary.com | https://www.elemental.xyz
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* NOTE: Parts of this file contain code from 'The eXist-db Authors'.
* The original license header is included below.
*
* =====================================================================
*
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
Expand Down Expand Up @@ -43,7 +67,7 @@ public class BTreeTest {
private BrokerPool pool = null;

public BTreeTest() {
file = Paths.get(System.getProperty("exist.home", ".")).resolve("test/test.dbx");
file = Paths.get(System.getProperty("elemental.home", ".")).resolve("test/test.dbx");
try {
Configuration config = new Configuration();

Expand Down
38 changes: 31 additions & 7 deletions exist-core/src/main/java/org/exist/TestUtils.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
/*
* Elemental
* Copyright (C) 2024, Evolved Binary Ltd
*
* admin@evolvedbinary.com
* https://www.evolvedbinary.com | https://www.elemental.xyz
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* NOTE: Parts of this file contain code from 'The eXist-db Authors'.
* The original license header is included below.
*
* =====================================================================
*
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
Expand Down Expand Up @@ -165,26 +189,26 @@ public static byte[] readFile(final Path file) throws IOException {
}

/**
* Get the EXIST_HOME directory
* Get the ELEMENTAL_HOME directory
*
* @return The absolute path to the EXIST_HOME folder
* @return The absolute path to the ELEMENTAL_HOME folder
* or {@link Optional#empty()}
*/
public static Optional<Path> getEXistHome() {
return ConfigurationHelper.getExistHome().map(Path::toAbsolutePath);
public static Optional<Path> getElementalHome() {
return ConfigurationHelper.getElementalHome().map(Path::toAbsolutePath);
}

/**
* Get a file from within the EXIST_HOME directory.
* Get a file from within the ELEMENTAL_HOME directory.
*
* @param fileName Just the name of the file.
*
* @return The path if it exists
*
* @throws IOException if an IO error occurs.
*/
public static Optional<Path> getExistHomeFile(final String fileName) throws IOException {
final Path path = getEXistHome().orElseGet(() -> Paths.get(".")).resolve(fileName);
public static Optional<Path> getElementalHomeFile(final String fileName) throws IOException {
final Path path = getElementalHome().orElseGet(() -> Paths.get(".")).resolve(fileName);
if(Files.exists(path)) {
return Optional.of(path);
} else {
Expand Down
Loading