dufoli opened a new issue #2999:
URL: https://github.com/apache/camel-quarkus/issues/2999
OS : Windows
mvn cq:create -N -Dcq.artifactIdBase=cxf
error log:
[ERROR] Failed to execute goal org.l2x6.cq:cq-maven-plugin:0.38.0:create
(default-cli) on project camel-quarkus: Execution default-cli of goal
org.l2x6.cq:cq-maven-plugin:0.38.0:create failed: Illegal character [:] in path
at index 4: ///D:\src\camel-quarkus/tooling/create-extension-templates -> [Help
1]
it come from main pom.xml:
```
<templatesUriBase>file:///${project.basedir}/tooling/create-extension-templates</templatesUriBase>
```
and it is used in org.apache.camel.quarkus.maven.CqUtils
templatesUriBase on my desktop was :
`file:///D:\src\camel-quarkus/tooling/create-extension-templates`
FILE_PREFIX is removed so I end with
"///D:\src\camel-quarkus/tooling/create-extension-templates" in
createTemplateLoader
I think uri on windows must be
`D:\src\camel-quarkus\tooling\create-extension-templates`
quick hack is maybe just in
org.apache.camel.quarkus.maven.CqUtils.createTemplateLoader :
```
diff --git
a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/CqUtils.java
b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/CqUtils.java
index d74490355..57a78ff60 100644
---
a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/CqUtils.java
+++
b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/CqUtils.java
@@ -63,7 +63,13 @@ public class CqUtils {
defaultLoader //
});
} else if (templatesUriBase.startsWith(FILE_PREFIX)) {
- final Path resolvedTemplatesDir =
basePath.resolve(templatesUriBase.substring(FILE_PREFIX.length()));
+ String templatesUri =
templatesUriBase.substring(FILE_PREFIX.length());
+ //windows uri
+ if (templatesUri.contains(":") {
+ templatesUri = templatesUri.substring(3);
+ templatesUri = templatesUri.replaceAll("/","\\");
+ }
+ final Path resolvedTemplatesDir =
basePath.resolve(templatesUri);
try {
return new MultiTemplateLoader( //
new TemplateLoader[] { //
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]