diff --git a/local.properties.sample b/local.properties.sample
new file mode 100644
index 0000000..5374164
--- /dev/null
+++ b/local.properties.sample
@@ -0,0 +1,5 @@
+TEST_SMB_ACCOUNT=foo
+TEST_SMB_DOMAIN=WORKGROUP
+TEST_SMB_HOST=bar
+TEST_SMB_PASSWORD=xxx
+TEST_SMB_PATH=/yyy/baz
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 2030081..d6c1e41 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,6 +21,40 @@
+
+
+ props
+
+
+ ${basedir}/local.properties
+
+
+
+
+
+ org.codehaus.mojo
+ properties-maven-plugin
+ 1.1.0
+
+
+ read-properties
+ initialize
+
+ read-project-properties
+
+
+
+ ${basedir}/local.properties
+
+
+
+
+
+
+
+
+
+
@@ -33,25 +67,6 @@
UTF-8
-
- org.codehaus.mojo
- properties-maven-plugin
- 1.0.0
-
-
- read-properties
- initialize
-
- read-project-properties
-
-
-
- ${basedir}/local.properties
-
-
-
-
-
org.apache.maven.plugins
maven-surefire-plugin
diff --git a/src/test/java/SmbjTest.java b/src/test/java/SmbjTest.java
index 55a2f70..c8bb5f5 100644
--- a/src/test/java/SmbjTest.java
+++ b/src/test/java/SmbjTest.java
@@ -19,6 +19,7 @@
import com.hierynomus.smbj.share.DiskShare;
import com.hierynomus.smbj.share.File;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import vavi.util.Debug;
import static com.hierynomus.msdtyp.AccessMask.DELETE;
@@ -42,6 +43,10 @@
*/
public class SmbjTest {
+ static boolean localPropertiesExists() {
+ return Files.exists(Paths.get("local.properties"));
+ }
+
static {
// TODO move to pom.xml
System.setProperty("vavi.util.logging.VaviFormatter.extraClassMethod",
@@ -64,6 +69,7 @@ public class SmbjTest {
* - according to cyberduck it works with smbj 0.12.2 https://github.com/hierynomus/smbj/issues/584#issuecomment-1694759650
*/
@Test
+ @EnabledIf("localPropertiesExists")
void test_smbj() throws Exception {
String username = System.getenv("TEST_SMB_ACCOUNT");
String password = System.getenv("TEST_SMB_PASSWORD");