The k8s:build action copies the .git folder to target and then failed to build the docker image.
mvn -v) :Apache Maven 3.0.5 (Red Hat 3.0.5-17)
Maven home: /usr/share/maven
Java version: 11.0.9, vendor: AdoptOpenJDK
Java home: /usr/lib/jvm/adoptopenjdk-11-openj9
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1160.11.1.el7.x86_64", arch: "amd64", family: "unix"
Kubernetes / Red Hat OpenShift setup and version : 1.20
If it's a bug, how to reproduce :
Clone a git repository. Then, execute the k8s:build action. The following error is shown:
[ERROR] k8s: Failed to execute the build [Error while trying to build the image: C:\dev\tmp\jkube-test\hello-world\target\docker\asms\hello-world\0.1.0\build\target\.git\objects\pack\pack-196b9336d55bf0c758ab92782f761f62fd0f95f4.idx]
To reproduce the issue, you can use the attached project. Then do:
Will probably get fixed by #529 -> #567
Thanks @manusa . Any workaround you can recommend ? Because it makes it unusable for the moment ๐
Any workaround you can recommend ?
Don't use the simplified Dockerfile workflow. So probably your project looks like: https://github.com/eclipse/jkube/tree/master/quickstarts/maven/docker-file-simple
If you use any of the other approaches in any of the 4 profiles of https://github.com/eclipse/jkube/tree/master/quickstarts/maven/docker-file-provided you should be fine.
OK; just saw your reproducer project.
Just don't use the ${project.basedir} as the docker contextDir, make it all relative to the target dir
Thanks @manusa. Your tip works fine.
I have the same problem.
My plugin-config is the following:
<profile>
<id>s2i-chained-local</id>
<properties>
<jkube.build.strategy>s2i</jkube.build.strategy>
<jkube.resourceDir>${project.basedir}/src/main/jkube/s2i-chained-local</jkube.resourceDir>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>openshift-maven-plugin</artifactId>
<version>${openshift-maven-plugin.version}</version>
<executions>
<execution>
<id>s2i-chained-local</id>
<phase>process-resources</phase>
<goals>
<goal>resource</goal>
<goal>apply</goal>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<namespace>${os_project}</namespace>
<resources>
<labels>
<all>
<property>
<name>app</name>
<value>${os_app_name}</value>
</property>
</all>
</labels>
<!-- This section seems to be ignored -->
<openshiftBuildConfig>
<requests>
<cpu>${request_cpu_build}</cpu>
<memory>${request_memory_build}</memory>
</requests>
<limits>
<cpu>${limit_cpu_build}</cpu>
<memory>${limit_memory_build}</memory>
</limits>
</openshiftBuildConfig>
</resources>
<images>
<image>
<name>${os_app_name}-build</name>
<build>
<env>
<MAVEN_COMMANDLINE>${maven_commandline}</MAVEN_COMMANDLINE>
</env>
<assembly>
<inline>
<fileSets>
<fileSet>
<directory>${project.basedir}/../../</directory><!-- Projects sources are 2 levels above openshift maven-module -->
<excludes><!-- excludes are not working as expected, see edit below -->
<exclude>.git</exclude>
<exclude>target</exclude>
</excludes>
</fileSet>
</fileSets>
</inline>
<name>.</name>
</assembly>
<from>
${registry}/${namespace}/${builder}:${version}
</from>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
</profile>
EDIT: I found out that the excludes are applied to late to avoid the .git folder error. Alle resources are copied first to the output directory and then the exclusions are deleted. But in between these two steps the error with the .git folder is thrown. To avoid that, the includes can be used. Unlike the exclude only the resources that are included are copied in the build step.
This issue should be fixed in the latest 1.2.0 release.
Could you please confirm?
I can't confirm. The problem persists with v1.2.0 in s2i local build with excludes like in my example above.
Failed to execute goal org.eclipse.jkube:openshift-maven-plugin:1.2.0:build (s2i-chained-local) on project springrest.openshift: Failed to execute the build: Unable to create the build archive: C:\springrest\openshift\target\docker\springrest-build\build\.\.git\objects\00\163521cb06fd599fa4f8d74b6c5b81fed9d98d
@ochstobi : Could you please try creating .jkube-dockerignore file and putting .git/** inside it?
@rohanKanojia I confirm that this is working. But only for .git/**. If I add other folders/files they are not ignored.
.git/**
.idea/**
.mvn/**
target/**
mvnw
mvnw.cmd
README.md
Are you sure about that? For me all specified folders seem to be getting ignored. I tested this on https://github.com/r0haaaan/jkube-dockerfile-test project which has this .jkube-dockerignore file:
target/classes/**
target/maven-status/**
src/**
pom.xml
docker-file-simple.iml
jkube-dockerinclude
I do k8s:build and check contents of target/docker directory:
jkube-dockerfile-test : $ tree target/docker -a
target/docker
โโโ build.timestamp
โโโ jkube
โโโ docker-file-simple
โโโ 1.2.0
โโโ build
โย ย โโโ Dockerfile
โย ย โโโ maven
โย ย โโโ Dockerfile
โย ย โโโ docker-file-simple.jar
โย ย โโโ .git
โย ย โย ย โโโ branches
โย ย โย ย โโโ config
โย ย โย ย โโโ description
โย ย โย ย โโโ HEAD
โย ย โย ย โโโ hooks
โย ย โย ย โย ย โโโ applypatch-msg.sample
โย ย โย ย โย ย โโโ commit-msg.sample
โย ย โย ย โย ย โโโ fsmonitor-watchman.sample
โย ย โย ย โย ย โโโ post-update.sample
โย ย โย ย โย ย โโโ pre-applypatch.sample
โย ย โย ย โย ย โโโ pre-commit.sample
โย ย โย ย โย ย โโโ pre-merge-commit.sample
โย ย โย ย โย ย โโโ prepare-commit-msg.sample
โย ย โย ย โย ย โโโ pre-push.sample
โย ย โย ย โย ย โโโ pre-rebase.sample
โย ย โย ย โย ย โโโ pre-receive.sample
โย ย โย ย โย ย โโโ update.sample
โย ย โย ย โโโ index
โย ย โย ย โโโ info
โย ย โย ย โย ย โโโ exclude
โย ย โย ย โโโ logs
โย ย โย ย โย ย โโโ HEAD
โย ย โย ย โย ย โโโ refs
โย ย โย ย โย ย โโโ heads
โย ย โย ย โย ย โย ย โโโ master
โย ย โย ย โย ย โโโ remotes
โย ย โย ย โย ย โโโ origin
โย ย โย ย โย ย โโโ HEAD
โย ย โย ย โโโ objects
โย ย โย ย โย ย โโโ 04
โย ย โย ย โย ย โย ย โโโ e212d7d69c3b4cbb8ab8ebe87610f38a1ee5c4
โย ย โย ย โย ย โโโ 0b
โย ย โย ย โย ย โย ย โโโ 47282267ecd59c4b666d891a8136d79145e013
โย ย โย ย โย ย โโโ 0d
โย ย โย ย โย ย โย ย โโโ 2b7261890fb77ce2dc933896015a0254b37b4c
โย ย โย ย โย ย โโโ 24
โย ย โย ย โย ย โย ย โโโ 473ac970f28c45b848fe5c6df21df2a92648ad
โย ย โย ย โย ย โโโ 6c
โย ย โย ย โย ย โย ย โโโ 9d9fcd0b634759b85c8728cdcf6144dafd55ca
โย ย โย ย โย ย โโโ 6d
โย ย โย ย โย ย โย ย โโโ 35923d91d97ebdc571cdf3859cb31866f4ba84
โย ย โย ย โย ย โโโ a6
โย ย โย ย โย ย โย ย โโโ 2354208b4d93375702b9c3c88bbbda0e1eb043
โย ย โย ย โย ย โโโ b8
โย ย โย ย โย ย โย ย โโโ e8510166e025756b176c3f1687c88cfcbc42c8
โย ย โย ย โย ย โโโ d4
โย ย โย ย โย ย โย ย โโโ 0ccd4758e1b7602f6c100e13d8d832dfa4adf9
โย ย โย ย โย ย โโโ d5
โย ย โย ย โย ย โย ย โโโ 12bf73487d02a9cfe2e52f34b2050916d07dd5
โย ย โย ย โย ย โโโ dc
โย ย โย ย โย ย โย ย โโโ 328e61c482c6a9d0fe1510e6adc4101915e904
โย ย โย ย โย ย โโโ e1
โย ย โย ย โย ย โย ย โโโ 5f6ec9f9c8862b31bf5c83655837133ff836f5
โย ย โย ย โย ย โโโ e9
โย ย โย ย โย ย โย ย โโโ ac9da2611a23ea5231921ab18609d37fa89fac
โย ย โย ย โย ย โโโ ee
โย ย โย ย โย ย โย ย โโโ c52115fe2a89c0ca00ce084fb9a7298c3300a5
โย ย โย ย โย ย โโโ f5
โย ย โย ย โย ย โย ย โโโ 95fdf15af098e059810a2a8f24675c79bb3dd2
โย ย โย ย โย ย โโโ fb
โย ย โย ย โย ย โย ย โโโ 566a928a13b6b79d22948044a13cc6ecf983bf
โย ย โย ย โย ย โโโ info
โย ย โย ย โย ย โโโ pack
โย ย โย ย โโโ packed-refs
โย ย โย ย โโโ refs
โย ย โย ย โโโ heads
โย ย โย ย โย ย โโโ master
โย ย โย ย โโโ remotes
โย ย โย ย โย ย โโโ origin
โย ย โย ย โย ย โโโ HEAD
โย ย โย ย โโโ tags
โย ย โโโ .gitignore
โย ย โโโ .idea
โย ย โย ย โโโ compiler.xml
โย ย โย ย โโโ encodings.xml
โย ย โย ย โโโ .gitignore
โย ย โย ย โโโ jarRepositories.xml
โย ย โย ย โโโ libraries
โย ย โย ย โย ย โโโ Maven__ch_qos_logback_logback_classic_1_2_3.xml
โย ย โย ย โย ย โโโ Maven__ch_qos_logback_logback_core_1_2_3.xml
โย ย โย ย โย ย โโโ Maven__com_fasterxml_classmate_1_5_1.xml
โย ย โย ย โย ย โโโ Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_4.xml
โย ย โย ย โย ย โโโ Maven__com_fasterxml_jackson_core_jackson_core_2_10_4.xml
โย ย โย ย โย ย โโโ Maven__com_fasterxml_jackson_core_jackson_databind_2_10_4.xml
โย ย โย ย โย ย โโโ Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_10_4.xml
โย ย โย ย โย ย โโโ Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_10_4.xml
โย ย โย ย โย ย โโโ Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_10_4.xml
โย ย โย ย โย ย โโโ Maven__io_micrometer_micrometer_core_1_3_8.xml
โย ย โย ย โย ย โโโ Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml
โย ย โย ย โย ย โโโ Maven__jakarta_validation_jakarta_validation_api_2_0_2.xml
โย ย โย ย โย ย โโโ Maven__org_apache_logging_log4j_log4j_api_2_12_1.xml
โย ย โย ย โย ย โโโ Maven__org_apache_logging_log4j_log4j_to_slf4j_2_12_1.xml
โย ย โย ย โย ย โโโ Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_34.xml
โย ย โย ย โย ย โโโ Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_34.xml
โย ย โย ย โย ย โโโ Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_34.xml
โย ย โย ย โย ย โโโ Maven__org_hdrhistogram_HdrHistogram_2_1_11.xml
โย ย โย ย โย ย โโโ Maven__org_hibernate_validator_hibernate_validator_6_0_19_Final.xml
โย ย โย ย โย ย โโโ Maven__org_jboss_logging_jboss_logging_3_4_1_Final.xml
โย ย โย ย โย ย โโโ Maven__org_latencyutils_LatencyUtils_2_0_3.xml
โย ย โย ย โย ย โโโ Maven__org_slf4j_jul_to_slf4j_1_7_30.xml
โย ย โย ย โย ย โโโ Maven__org_slf4j_slf4j_api_1_7_30.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_boot_spring_boot_2_2_7_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_boot_spring_boot_actuator_2_2_7_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_boot_spring_boot_actuator_autoconfigure_2_2_7_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_boot_spring_boot_autoconfigure_2_2_7_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_boot_spring_boot_starter_2_2_7_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_boot_spring_boot_starter_actuator_2_2_7_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_boot_spring_boot_starter_json_2_2_7_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_boot_spring_boot_starter_logging_2_2_7_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_boot_spring_boot_starter_tomcat_2_2_7_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_boot_spring_boot_starter_validation_2_2_7_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_boot_spring_boot_starter_web_2_2_7_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_spring_aop_5_2_6_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_spring_beans_5_2_6_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_spring_context_5_2_6_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_spring_core_5_2_6_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_spring_expression_5_2_6_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_spring_jcl_5_2_6_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_spring_web_5_2_6_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_springframework_spring_webmvc_5_2_6_RELEASE.xml
โย ย โย ย โย ย โโโ Maven__org_yaml_snakeyaml_1_25.xml
โย ย โย ย โโโ misc.xml
โย ย โย ย โโโ modules.xml
โย ย โย ย โโโ .name
โย ย โย ย โโโ vcs.xml
โย ย โย ย โโโ workspace.xml
โย ย โโโ src
โย ย โโโ target
โย ย โโโ classes
โย ย โโโ docker-file-simple.jar
โย ย โโโ docker-file-simple.jar.original
โย ย โโโ generated-sources
โย ย โย ย โโโ annotations
โย ย โโโ maven-archiver
โย ย โย ย โโโ pom.properties
โย ย โโโ maven-status
โโโ tmp
โย ย โโโ docker-build.tar
โโโ work
49 directories, 100 files
I modify my .jkube-dockerignore file to ignore .git and .idea as well:
jkube-dockerfile-test : $ cat .jkube-dockerignore
.git
.git/**
.idea
.idea/**
target/classes/**
target/maven-status/**
src/**
pom.xml
docker-file-simple.iml
jkube-dockerinclude
When I run mvn k8s:build, I was able to see both of them ignored:
jkube-dockerfile-test : $ tree target/docker -a
target/docker
โโโ build.timestamp
โโโ jkube
โโโ docker-file-simple
โโโ 1.2.0
โโโ build
โย ย โโโ Dockerfile
โย ย โโโ maven
โย ย โโโ Dockerfile
โย ย โโโ docker-file-simple.jar
โย ย โโโ .gitignore
โย ย โโโ src
โย ย โโโ target
โย ย โโโ classes
โย ย โโโ docker-file-simple.jar
โย ย โโโ docker-file-simple.jar.original
โย ย โโโ generated-sources
โย ย โย ย โโโ annotations
โย ย โโโ maven-archiver
โย ย โย ย โโโ pom.properties
โย ย โโโ maven-status
โโโ tmp
โย ย โโโ docker-build.tar
โโโ work
14 directories, 9 files
Please also confirm your OS
I am working on Windows 10. Sorry I did a mistake before. In fact the .jkube-dockerignore isn't considered at all in my setup.
My .jkube-dockerignore is this:
.git/**
.idea/**
.mvn/**
target/**
mvnw
mvnw.cmd
and is located in /cicd/openshift/.jkube-dockerignore (same folder als the pom.xml which is executing the plugin).
I have the following structure:
C:/jkube-test/.
| mvnw
| mvnw.cmd
| pom.xml <-- Parent pom for the spring applications modules
| README.md
|
+---.git
| endless git folders/files...
+---.idea
| | endless intellij folders/files...
|
+---.mvn
| \---wrapper
| maven-wrapper.jar
| maven-wrapper.properties
|
+---cicd
| \---openshift
| | .gitignore
| | .jkube-dockerignore
| | pom.xml <-- Submodule which is triggering the openshift build
| | springrest.cicd.openshift.iml
| |
| +---src
| | \---main
| | \---jkube
| | +---s2i-chained-local
| | | build-buildconfig.yaml
| | | build-imagestream.yaml
| | | deployment.yaml
| | | keystore-secret.yaml
| | | route.yaml
| | | run-buildconfig.yaml
| | | run-imagestream.yaml
| | | service.yaml
| | |
| \---target
| | s2i-env-springrest-build
| |
| +---classes
| | \---META-INF
| | \---jkube
| | | openshift.yml
| | |
| | \---openshift
| | springrest-build-imagestream.yml
| | springrest-build-s2i-buildconfig.yml
| | springrest-deploymentconfig.yml
| | springrest-imagestream.yml
| | springrest-keystore-secret-secret.yml
| | springrest-route.yml
| | springrest-run-buildconfig.yml
| | springrest-service.yml
| |
| +---docker
| | | build.timestamp
| | |
| | \---springrest-build
| | +---build
| | | | mvnw
| | | | mvnw.cmd
| | | | pom.xml
| | | | README.md
| | | |
| | | +---.git
| | | | | copied git folders/files
| | | +---.idea
| | | | | copied intellij folders/files
| | | +---.mvn
| | | | \---wrapper
| | | | maven-wrapper.jar
| | | | maven-wrapper.properties
| | | |
| | | +---cicd
| | | | \---openshift
| | | | | .gitignore
| | | | | .jkube-dockerignore
| | | | | pom.xml
| | | | | springrest.cicd.openshift.iml
| | | | |
| | | | +---src
| | | | | \---main
| | | | | \---jkube
| | | | | +---s2i-chained-local
| | | | | | build-buildconfig.yaml
| | | | | | build-imagestream.yaml
| | | | | | deployment.yaml
| | | | | | keystore-secret.yaml
| | | | | | route.yaml
| | | | | | run-buildconfig.yaml
| | | | | | run-imagestream.yaml
| | | | | | service.yaml
| | | | | |
| | | | |
| | | | \---target
| | | | | s2i-env-springrest-build
| | | | |
| | | | +---classes
| | | | | \---META-INF
| | | | | \---jkube
| | | | | | openshift.yml
| | | | | |
| | | | | \---openshift
| | | | | springrest-build-imagestream.yml
| | | | | springrest-build-s2i-buildconfig.yml
| | | | | springrest-deploymentconfig.yml
| | | | | springrest-imagestream.yml
| | | | | springrest-keystore-secret-secret.yml
| | | | | springrest-route.yml
| | | | | springrest-run-buildconfig.yml
| | | | | springrest-service.yml
| | | | |
| | | | +---docker
| | | | | | build.timestamp
| | | | | |
| | | | | \---springrest-build
| | | | | +---build
| | | | | +---tmp
| | | | | \---work
| | | | \---jkube
| | | | | build-buildconfig.yaml
| | | | | build-imagestream.yaml
| | | | | deployment.yaml
| | | | | keystore-secret.yaml
| | | | | route.yaml
| | | | | run-buildconfig.yaml
| | | | | run-imagestream.yaml
| | | | | service.yaml
| | | | |
| | | | \---applyJson
| | | | \---my-namespace
| | | | buildconfig-springrest-build-s2i.json
| | | | buildconfig-springrest-run.json
| | | | deploymentconfig-springrest.json
| | | | route-springrest.json
| | | | secret-springrest-keystore-secret.json
| | | | service-springrest.json
| | | |
| | | \---target
| | | \---failsafe-reports
| | | failsafe-summary.xml
| | |
| | +---tmp
| | \---work
| \---jkube
| | build-buildconfig.yaml
| | build-imagestream.yaml
| | deployment.yaml
| | keystore-secret.yaml
| | route.yaml
| | run-buildconfig.yaml
| | run-imagestream.yaml
| | service.yaml
| |
| \---applyJson
| \---my-namespace
| buildconfig-springrest-build-s2i.json
| buildconfig-springrest-run.json
| deploymentconfig-springrest.json
| route-springrest.json
| secret-springrest-keystore-secret.json
| service-springrest.json
|
\---target
\---failsafe-reports
failsafe-summary.xml
This is my fileset for the openshift-maven-plugin step:
<assembly>
<inline>
<fileSets>
<fileSet>
<directory>${project.basedir}/../../</directory><!-- This is because it is a submodule -->
<outputDirectory>.</outputDirectory>
</fileSet>
</fileSets>
</inline>
<name>.</name>
</assembly>
Maybe the .jkube-dockerignore is in the wrong place?
I haven't checked our code, but I suspect it might have something to do with line separators (could you switch your file from CRLF to LF [if that is the case] and see if it works as expected?)
@manusa Sadly this ends in the same output.
Yes, we checked the code and we're using the nio Files helper class to read the file entries.
However, if you're still using the configuration provided in this comment, then the issue has nothing to do with the .jkube-dockerignore. I think that the fact that we're discussing your problem in this issue that is related to the Dockerfile simple mode is misleading us.
In your case, you really need to provide the <excludes> configuration in for your FileSets in the assembly. The .jkube-dockerignore or .jkube-dockerexclude files are only applicable for Dockerfile mode.
@manusa Thanks for this clarification. I apologize for the trouble.
@manusa Thanks for this clarification. I apologize for the trouble.
OK, no problem. Just confirm to us if once you configure the excludes in your XML config, it works OK.
I have tested it and found out some things. First of all the exclusions are working but not correctly. In the oc:build step the content of <directory>${project.basedir}/../../</directory> is copied completely to the target\docker\springrest-build\build folder. After that the exclusions are deleted. It works for all but .git because this error is thrown:
Failed to execute goal org.eclipse.jkube:openshift-maven-plugin:1.2.0:build (s2i-chained-local) on project springrest.openshift: Failed to execute the build: Unable to create the build archive: C:\springrest\openshift\target\docker\springrest-build\build\.\.git\objects\00\163521cb06fd599fa4f8d74b6c5b81fed9d98d
To dig a bit deeper I deleted the .git folder to see what the exclusions are actually doing.
After copying the resources the exclusions are deleted. Example of the syntax need is below:
<excludes>
<exclude>**/.git/**</exclude>
<exclude>/.git/**</exclude>
<exclude>.git</exclude>
<exclude>.git/**</exclude> -- the git stuff is not working because of the error.
<exclude>**/target</exclude> -- this is applied for all target folders which are not directly in `<directory>${project.basedir}/../../</directory>`
<exclude>target</exclude> -- this is applied only for target in `<directory>${project.basedir}/../../</directory>`
<exclude>target/**</exclude> -- this doesn't do anything at all
<exclude>**/target/**</exclude> -- this doesn't do anything at all
<exclude>.idea</exclude>
</excludes>
So exclusions should be prevented from copying to the target. And the syntax for globs should be improved. I would expect that **/target/** excludes all folders named target regardless of the folder depth.
I hope this helps.
Remember that the syntax for the exclusions is based on FileSystem.html#getPathMatcher.
Since you're on a Windows platform, try using \ instead e.g. **\target\**, or even <exclude>**${file.separator}target${file.separator}**</exclude>
It seems that maven doesn't care. I tried and the results are the same.
This issue should be fixed after #693
@ochstobi could you please confirm everything works now as expected?
In order to test this I used the following settings with the maven/xml-config quickstart:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</pluginRepository>
</pluginRepositories>
<!-- ... -->
<plugins>
<plugin>
<groupId>com.github.eclipse.jkube</groupId>
<artifactId>openshift-maven-plugin</artifactId>
<version>master-SNAPSHOT</version>
<configuration>
<!-- ... -->
<fileSet>
<directory>${project.basedir}/../../..</directory>
<outputDirectory>.</outputDirectory>
<excludes>
<exclude>.git{/**,}</exclude>
<exclude>**/target/**</exclude>
<exclude>ide-config{/**,}</exclude>
<exclude>.idea{/**,}</exclude>
<exclude>.circleci{/**,}</exclude>
<exclude>quickstarts{/**,}</exclude>
</excludes>
</fileSet>
</configuration>
</plugin>
</plugins>
Where can I get the version "master-SNAPSHOT" to test it? Can't find it in maven central.
Just configure the plugin as described in my previous comment.
Note that the Maven GAV coordinates change and that you need to add the Jitpack repository.
Sadly I don't have access to jitpack repository in my environment. So I can only test it after the offical release.
Well, you can always clone and install locally :wink:
We just released 1.3.0, could you please confirm you can no longer reproduce this issue?
@manusa I can confirm that this is working now. Great work!
Most helpful comment
@manusa I can confirm that this is working now. Great work!