You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/08/09 13:14:31 UTC

[GitHub] [camel-quarkus] dufoli opened a new issue #2999: creation of

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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] dufoli commented on issue #2999: creation of extension on windows failed

Posted by GitBox <gi...@apache.org>.
dufoli commented on issue #2999:
URL: https://github.com/apache/camel-quarkus/issues/2999#issuecomment-896273452


   IT works! 
   does it work on linux  too ?
   ```
   D:\src\camel-quarkus>mvn cq:create -N -Dcq.artifactIdBase=cxf
   [INFO] Scanning for projects...
   [INFO]
   [INFO] ---------------< org.apache.camel.quarkus:camel-quarkus >---------------
   [INFO] Building Camel Quarkus 2.2.0-SNAPSHOT
   [INFO] --------------------------------[ pom ]---------------------------------
   [INFO]
   [INFO] --- cq-maven-plugin:0.38.0:create (default-cli) @ camel-quarkus ---
   [INFO] Generating D:\src\camel-quarkus\extensions\cxf\pom.xml
   [INFO] Generating D:\src\camel-quarkus\extensions\cxf\runtime\pom.xml
   [INFO] Generating D:\src\camel-quarkus\extensions\cxf\runtime\src\main\resources\META-INF\quarkus-extension.yaml
   [INFO] Generating D:\src\camel-quarkus\extensions\cxf\deployment\pom.xml
   [INFO] Generating D:\src\camel-quarkus\extensions\cxf\deployment\src\main\java\org\apache\camel\quarkus\component\cxf\deployment\CxfProcessor.java
   [INFO] Adding module [cxf] to [D:\src\camel-quarkus\extensions\pom.xml]
   [INFO] Adding [camel-quarkus-cxf] to dependencyManagement in [D:\src\camel-quarkus\poms\bom\pom.xml]
   [INFO] Adding [camel-quarkus-cxf-deployment] to dependencyManagement in [D:\src\camel-quarkus\poms\bom\pom.xml]
   [INFO] Adding [org.apache.camel:camel-cxf:${camel.version}] to dependencyManagement in [D:\src\camel-quarkus\poms\bom\pom.xml]
   [INFO] Adding module [cxf] to [D:\src\camel-quarkus\integration-tests\pom.xml]
   [INFO] Generating D:\src\camel-quarkus\integration-tests\cxf\pom.xml
   [INFO] Generating D:\src\camel-quarkus\integration-tests\cxf\src\main\resources\application.properties
   [INFO] Generating D:\src\camel-quarkus\integration-tests\cxf\src\main\java\org\apache\camel\quarkus\component\cxf\it\CxfResource.java
   [INFO] Generating D:\src\camel-quarkus\integration-tests\cxf\src\test\java\org\apache\camel\quarkus\component\cxf\it\CxfTest.java
   [INFO] Generating D:\src\camel-quarkus\integration-tests\cxf\src\test\java\org\apache\camel\quarkus\component\cxf\it\CxfIT.java
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  3.147 s
   [INFO] Finished at: 2021-08-10T21:49:15+02:00
   [INFO] ------------------------------------------------------------------------
   ```


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga commented on issue #2999: creation of extension on windows failed

Posted by GitBox <gi...@apache.org>.
ppalaga commented on issue #2999:
URL: https://github.com/apache/camel-quarkus/issues/2999#issuecomment-896317162


   > does it work on linux too ?
   
   Yes, it does. Could you please submit it as a separate fix for this issue?


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga commented on issue #2999: creation of extension on windows failed

Posted by GitBox <gi...@apache.org>.
ppalaga commented on issue #2999:
URL: https://github.com/apache/camel-quarkus/issues/2999#issuecomment-896234346


   Thanks for the report, @dufoli! Could you please try to remove the three slashes around here https://github.com/apache/camel-quarkus/blob/main/pom.xml#L543 as a quick workaround? I'll have a Windows VM available in ~2 weeks and I'd work on a permanent fix then. 


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga closed issue #2999: creation of extension on windows failed

Posted by GitBox <gi...@apache.org>.
ppalaga closed issue #2999:
URL: https://github.com/apache/camel-quarkus/issues/2999


   


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org