Re: [VOTE] Release Apache Camel Kamelets 3.20.4

2023-05-17 Thread Jean-Baptiste Onofré
+1 (binding)

Regards
JB

On Tue, May 16, 2023 at 12:15 PM Andrea Cosentino  wrote:
>
> Hello all:
>
> This is a vote for releasing camel-kamelets 3.20.4
>
> Kamelets release files:
> https://dist.apache.org/repos/dist/dev/camel/camel-kamelets/3.20.4
> Kamelets staging repository:
> https://repository.apache.org/content/repositories/orgapachecamel-1554
> Kamelets Tag:
> https://github.com/apache/camel/releases/tag/camel-3.20.4
>
> Please cast your vote.
>
> [ ] +1 Release camel-kamelets 3.20.4
> [ ] -1 Veto the release (provide specific comments)
>
> The vote is open for at least 72 hours.
>
> Here's my +1.
>
> Thanks,
> Andrea Cosentino


Re: [VOTE] Release Apache Camel Kamelets 3.20.4

2023-05-17 Thread Andrea Cosentino
Gently reminder. Please vote.

Il mar 16 mag 2023, 12:33 Babak Vahdat 
ha scritto:

> +1 (binding)
>
> Thanks Andrea!
>
> --
> Babak
>
> > On 16 May 2023, at 12:15, Andrea Cosentino  wrote:
> >
> > Hello all:
> >
> > This is a vote for releasing camel-kamelets 3.20.4
> >
> > Kamelets release files:
> > https://dist.apache.org/repos/dist/dev/camel/camel-kamelets/3.20.4
> > Kamelets staging repository:
> > https://repository.apache.org/content/repositories/orgapachecamel-1554
> > Kamelets Tag:
> > https://github.com/apache/camel/releases/tag/camel-3.20.4
> >
> > Please cast your vote.
> >
> > [ ] +1 Release camel-kamelets 3.20.4
> > [ ] -1 Veto the release (provide specific comments)
> >
> > The vote is open for at least 72 hours.
> >
> > Here's my +1.
> >
> > Thanks,
> > Andrea Cosentino
>
>


Re: Camel Main: RoutesIncludePattern doesn't seem to respect asterisks as a directory placeholder

2023-05-17 Thread Chirag
in a camel app, I have used property files to provide some of these
params in place of passing them thru the code. You may want to explore
that.


ચિરાગ/चिराग/Chirag
--
Sent from My Gmail Account

On Wed, May 17, 2023 at 4:59 PM Fyodor Kravchenko  wrote:
>
> Hi,
>
> I'm integrating Camel into my application, or better say, application
> platform, that may run different arbitrary Camel routes for integration,
> and I'd like to provide an ability for a developer who makes
> applications for this platform to edit the routes during the
> development. I'm already monitoring the filesystem for other artifact
> edits, so If there is an API to reload an individual route taken from a
> file I might use that.
>
> I've considered to use a separate Camel standalone or as a containerized
> service that I've noticed the project is encouraging now, but this would
> require me to develop some protocol to interact with my platform during
> its lifecycle. For Camel 2 I managed to instantiate xml snippets to
> custom Processors but the API has changed and this Main load-reload
> function seemed to do what I want for Camel 3.
>
> On 17.05.2023 22:58, Claus Ibsen wrote:
> > Hi
> >
> > What is your goal with this?
> >
> > The reload stuff is for development and not a production app server to
> > "redeploy apps" or any sort of that.
> > The intention is that you work on a single application.
> >
> > The reload is using Java APIs for "change file events" and this does not
> > support an ANT style way and whatnot.
> >
> >
> > On Wed, May 17, 2023 at 8:45 PM Fyodor Kravchenko 
> > wrote:
> >
> >> I'm sorry please disregard my previous ramblings, moving the "deploy"
> >> directory to the working directory of the java app did the "include"
> >> trick. It worked without the "file:" prefix because it was looking into
> >> the "target" directry which was the classpath.. My fault.
> >>
> >> However, the additional question remains: how do I make it _reload_ what
> >> it loaded previosly, without catching the extra *.yaml files that may be
> >> located in the wrong directories?
> >>
> >> I'm trying this,
> >>
> >>   Main main = new Main();
> >>
> >> main.configure().withRoutesIncludePattern("file:deploy/**/PRIVATE/EXCHANGE/*.yaml");
> >>   main.configure().withRoutesReloadEnabled(true);
> >>   main.configure().withRoutesReloadDirectory("deploy");
> >>   main.configure().withRoutesReloadDirectoryRecursive(true);
> >> // main.configure().withRoutesReloadPattern("**/PRIVATE/EXCHANGE/*.yaml");
> >> // main.configure().withRoutesReloadPattern("PRIVATE/EXCHANGE/*.yaml");
> >>   main.configure().withRoutesReloadPattern("*.yaml");
> >>   main.configure().withRoutesReloadRemoveAllRoutes(true);
> >>   main.run();
> >>
> >> but this will catch and load any .yaml file under the "deploy"
> >> directory, event those that wasn't loaded at startup, when I touch any
> >> of the yamls.
> >>
> >> Any tips on reloading patterns?
> >>
> >> Thank you!
> >>
> >> On 17.05.2023 21:06, Fyodor Kravchenko wrote:
> >>> Hi, thanks but this
> >>>
> >>> .
> >>> Netbeans uses the following command to run the program:
> >>>
> >>> cd /home/fedd/NetBeansProjects/camelmaintry;
> >>> JAVA_HOME=/home/fedd/Programs/graalvm-ce-java19-22.3.0
> >>> /snap/netbeans/76/netbeans/java/maven/bin/mvn -Dexec.vmArgs=
> >>> "-Dexec.args=${exec.vmArgs} -classpath %classpath ${exec.mainClass}
> >>> ${exec.appArgs}" -Dexec.appArgs=
> >>> -Dexec.mainClass=camelmaintry.CamelMainTry
> >>> -Dexec.executable=/home/fedd/Programs/graalvm-ce-java19-22.3.0/bin/java
> >>> org.codehaus.mojo:exec-maven-plugin:3.1.0:exec
> >>>
> >>> (nothing special in the "exec.mainClass" and other placeholders there)
> >>>
> >>> I can't grasp how to make it look into this pattern:
> >>>
> >>> deploy/**/PRIVATE/EXCHANGE/*.yaml
> >>>
> >>> Thanks!
> >>> --fedd
> >>>
> >>> On 17.05.2023 20:15, Claus Ibsen wrote:
>  Hi
> 
>  Okay for file system, you should favour prefixing with file:
> 
> 
> >> main.configure().withRoutesIncludePattern("file:deploy/customer/PRIVATE/EXCHANGE/*.yaml");
> >>
> 
> 
>  On Wed, May 17, 2023 at 3:53 PM Fyodor Kravchenko
>  
>  wrote:
> 
> > Hi,
> >
> > I'm trying to load the routes from the file system directly, it's Camel
> > 3.20.4, and it's java 19 from the GraalVM distribution running on
> > Ubuntu
> > 22.04. The fact it sees the file when no wildcard is present tells me
> > that I'm missing something in the wildcards and the docs.
> >
> > Thank you!
> >
> > --fedd
> >
> > (sorry for the late response, only now I've got the rejection
> > notification for the html-formatted email)
> >
> > On 15.05.2023 11:01, Claus Ibsen wrote:
> >> Hi
> >>
> >> Are you loading these files from classpath or file system directly.
> >> And what Camel version do you use

Re: Camel Main: RoutesIncludePattern doesn't seem to respect asterisks as a directory placeholder

2023-05-17 Thread Fyodor Kravchenko

Hi,

I'm integrating Camel into my application, or better say, application 
platform, that may run different arbitrary Camel routes for integration, 
and I'd like to provide an ability for a developer who makes 
applications for this platform to edit the routes during the 
development. I'm already monitoring the filesystem for other artifact 
edits, so If there is an API to reload an individual route taken from a 
file I might use that.


I've considered to use a separate Camel standalone or as a containerized 
service that I've noticed the project is encouraging now, but this would 
require me to develop some protocol to interact with my platform during 
its lifecycle. For Camel 2 I managed to instantiate xml snippets to 
custom Processors but the API has changed and this Main load-reload 
function seemed to do what I want for Camel 3.


On 17.05.2023 22:58, Claus Ibsen wrote:

Hi

What is your goal with this?

The reload stuff is for development and not a production app server to
"redeploy apps" or any sort of that.
The intention is that you work on a single application.

The reload is using Java APIs for "change file events" and this does not
support an ANT style way and whatnot.


On Wed, May 17, 2023 at 8:45 PM Fyodor Kravchenko 
wrote:


I'm sorry please disregard my previous ramblings, moving the "deploy"
directory to the working directory of the java app did the "include"
trick. It worked without the "file:" prefix because it was looking into
the "target" directry which was the classpath.. My fault.

However, the additional question remains: how do I make it _reload_ what
it loaded previosly, without catching the extra *.yaml files that may be
located in the wrong directories?

I'm trying this,

  Main main = new Main();

main.configure().withRoutesIncludePattern("file:deploy/**/PRIVATE/EXCHANGE/*.yaml");
  main.configure().withRoutesReloadEnabled(true);
  main.configure().withRoutesReloadDirectory("deploy");
  main.configure().withRoutesReloadDirectoryRecursive(true);
// main.configure().withRoutesReloadPattern("**/PRIVATE/EXCHANGE/*.yaml");
// main.configure().withRoutesReloadPattern("PRIVATE/EXCHANGE/*.yaml");
  main.configure().withRoutesReloadPattern("*.yaml");
  main.configure().withRoutesReloadRemoveAllRoutes(true);
  main.run();

but this will catch and load any .yaml file under the "deploy"
directory, event those that wasn't loaded at startup, when I touch any
of the yamls.

Any tips on reloading patterns?

Thank you!

On 17.05.2023 21:06, Fyodor Kravchenko wrote:

Hi, thanks but this

.
Netbeans uses the following command to run the program:

cd /home/fedd/NetBeansProjects/camelmaintry;
JAVA_HOME=/home/fedd/Programs/graalvm-ce-java19-22.3.0
/snap/netbeans/76/netbeans/java/maven/bin/mvn -Dexec.vmArgs=
"-Dexec.args=${exec.vmArgs} -classpath %classpath ${exec.mainClass}
${exec.appArgs}" -Dexec.appArgs=
-Dexec.mainClass=camelmaintry.CamelMainTry
-Dexec.executable=/home/fedd/Programs/graalvm-ce-java19-22.3.0/bin/java
org.codehaus.mojo:exec-maven-plugin:3.1.0:exec

(nothing special in the "exec.mainClass" and other placeholders there)

I can't grasp how to make it look into this pattern:

deploy/**/PRIVATE/EXCHANGE/*.yaml

Thanks!
--fedd

On 17.05.2023 20:15, Claus Ibsen wrote:

Hi

Okay for file system, you should favour prefixing with file:



main.configure().withRoutesIncludePattern("file:deploy/customer/PRIVATE/EXCHANGE/*.yaml");




On Wed, May 17, 2023 at 3:53 PM Fyodor Kravchenko

wrote:


Hi,

I'm trying to load the routes from the file system directly, it's Camel
3.20.4, and it's java 19 from the GraalVM distribution running on
Ubuntu
22.04. The fact it sees the file when no wildcard is present tells me
that I'm missing something in the wildcards and the docs.

Thank you!

--fedd

(sorry for the late response, only now I've got the rejection
notification for the html-formatted email)

On 15.05.2023 11:01, Claus Ibsen wrote:

Hi

Are you loading these files from classpath or file system directly.
And what Camel version do you use



On Sun, May 14, 2023 at 5:39 PM Fyodor Kravchenko

Hello,

in my little test I'm trying the following,


public class CamelMainTry {
public static void main(String[] args) throws Exception {
Main main = new Main();
//this works but I need to catch more
//



main.configure().withRoutesIncludePattern("deploy/customer/PRIVATE/EXCHANGE/*.yaml");


//these don't work:'
//



main.configure().withRoutesIncludePattern("deploy/**/PRIVATE/EXCHANGE/*.yaml");

main.configure().withRoutesIncludePattern("deploy/*/PRIVATE/EXCHANGE/*.yaml");


main.run();
}
}

my files are located:

deploy/customer/PRIVATE/EXCHANGE/cust.yaml

deploy/register/bank/PRIVATE/EXCHANGE/reg.yaml

So there could be more directories in the middle; however it doesn't
substitute even one.

The Ant-style (or what I'm thinking the Ant style) pattern doesn't

Re: Camel Main: RoutesIncludePattern doesn't seem to respect asterisks as a directory placeholder

2023-05-17 Thread Claus Ibsen
Hi

What is your goal with this?

The reload stuff is for development and not a production app server to
"redeploy apps" or any sort of that.
The intention is that you work on a single application.

The reload is using Java APIs for "change file events" and this does not
support an ANT style way and whatnot.


On Wed, May 17, 2023 at 8:45 PM Fyodor Kravchenko 
wrote:

> I'm sorry please disregard my previous ramblings, moving the "deploy"
> directory to the working directory of the java app did the "include"
> trick. It worked without the "file:" prefix because it was looking into
> the "target" directry which was the classpath.. My fault.
>
> However, the additional question remains: how do I make it _reload_ what
> it loaded previosly, without catching the extra *.yaml files that may be
> located in the wrong directories?
>
> I'm trying this,
>
>  Main main = new Main();
>
> main.configure().withRoutesIncludePattern("file:deploy/**/PRIVATE/EXCHANGE/*.yaml");
>  main.configure().withRoutesReloadEnabled(true);
>  main.configure().withRoutesReloadDirectory("deploy");
>  main.configure().withRoutesReloadDirectoryRecursive(true);
> // main.configure().withRoutesReloadPattern("**/PRIVATE/EXCHANGE/*.yaml");
> // main.configure().withRoutesReloadPattern("PRIVATE/EXCHANGE/*.yaml");
>  main.configure().withRoutesReloadPattern("*.yaml");
>  main.configure().withRoutesReloadRemoveAllRoutes(true);
>  main.run();
>
> but this will catch and load any .yaml file under the "deploy"
> directory, event those that wasn't loaded at startup, when I touch any
> of the yamls.
>
> Any tips on reloading patterns?
>
> Thank you!
>
> On 17.05.2023 21:06, Fyodor Kravchenko wrote:
> > Hi, thanks but this
> >
> > .
>
> > Netbeans uses the following command to run the program:
> >
> > cd /home/fedd/NetBeansProjects/camelmaintry;
> > JAVA_HOME=/home/fedd/Programs/graalvm-ce-java19-22.3.0
> > /snap/netbeans/76/netbeans/java/maven/bin/mvn -Dexec.vmArgs=
> > "-Dexec.args=${exec.vmArgs} -classpath %classpath ${exec.mainClass}
> > ${exec.appArgs}" -Dexec.appArgs=
> > -Dexec.mainClass=camelmaintry.CamelMainTry
> > -Dexec.executable=/home/fedd/Programs/graalvm-ce-java19-22.3.0/bin/java
> > org.codehaus.mojo:exec-maven-plugin:3.1.0:exec
> >
> > (nothing special in the "exec.mainClass" and other placeholders there)
> >
> > I can't grasp how to make it look into this pattern:
> >
> > deploy/**/PRIVATE/EXCHANGE/*.yaml
> >
> > Thanks!
> > --fedd
> >
> > On 17.05.2023 20:15, Claus Ibsen wrote:
> >> Hi
> >>
> >> Okay for file system, you should favour prefixing with file:
> >>
> >>
> main.configure().withRoutesIncludePattern("file:deploy/customer/PRIVATE/EXCHANGE/*.yaml");
>
> >>
> >>
> >>
> >> On Wed, May 17, 2023 at 3:53 PM Fyodor Kravchenko
> >> 
> >> wrote:
> >>
> >>> Hi,
> >>>
> >>> I'm trying to load the routes from the file system directly, it's Camel
> >>> 3.20.4, and it's java 19 from the GraalVM distribution running on
> >>> Ubuntu
> >>> 22.04. The fact it sees the file when no wildcard is present tells me
> >>> that I'm missing something in the wildcards and the docs.
> >>>
> >>> Thank you!
> >>>
> >>> --fedd
> >>>
> >>> (sorry for the late response, only now I've got the rejection
> >>> notification for the html-formatted email)
> >>>
> >>> On 15.05.2023 11:01, Claus Ibsen wrote:
>  Hi
> 
>  Are you loading these files from classpath or file system directly.
>  And what Camel version do you use
> 
> 
> 
>  On Sun, May 14, 2023 at 5:39 PM Fyodor Kravchenko
>   
>  wrote:
> 
> > Hello,
> >
> > in my little test I'm trying the following,
> >
> >
> > public class CamelMainTry {
> >public static void main(String[] args) throws Exception {
> >Main main = new Main();
> > //this works but I need to catch more
> > //
> >
> >
> >>>
> main.configure().withRoutesIncludePattern("deploy/customer/PRIVATE/EXCHANGE/*.yaml");
>
> >>>
> > //these don't work:'
> > //
> >
> >
> >>>
> main.configure().withRoutesIncludePattern("deploy/**/PRIVATE/EXCHANGE/*.yaml");
>
> >>>
> >
> >>>
> main.configure().withRoutesIncludePattern("deploy/*/PRIVATE/EXCHANGE/*.yaml");
>
> >>>
> >main.run();
> >}
> > }
> >
> > my files are located:
> >
> > deploy/customer/PRIVATE/EXCHANGE/cust.yaml
> >
> > deploy/register/bank/PRIVATE/EXCHANGE/reg.yaml
> >
> > So there could be more directories in the middle; however it doesn't
> > substitute even one.
> >
> > The Ant-style (or what I'm thinking the Ant style) pattern doesn't
> > seem
> > to catch multiple directories. If I specify the directory
> > explicitly it
> > works, but I need it to locate the routes in dozens of directories.
> >
> > How do I fix it?
> >
> > (While we're at it I would also 

Re: Camel Main: RoutesIncludePattern doesn't seem to respect asterisks as a directory placeholder

2023-05-17 Thread Fyodor Kravchenko
I'm sorry please disregard my previous ramblings, moving the "deploy" 
directory to the working directory of the java app did the "include" 
trick. It worked without the "file:" prefix because it was looking into 
the "target" directry which was the classpath.. My fault.


However, the additional question remains: how do I make it _reload_ what 
it loaded previosly, without catching the extra *.yaml files that may be 
located in the wrong directories?


I'm trying this,

    Main main = new Main();
main.configure().withRoutesIncludePattern("file:deploy/**/PRIVATE/EXCHANGE/*.yaml");
    main.configure().withRoutesReloadEnabled(true);
    main.configure().withRoutesReloadDirectory("deploy");
    main.configure().withRoutesReloadDirectoryRecursive(true);
// main.configure().withRoutesReloadPattern("**/PRIVATE/EXCHANGE/*.yaml");
// main.configure().withRoutesReloadPattern("PRIVATE/EXCHANGE/*.yaml");
    main.configure().withRoutesReloadPattern("*.yaml");
    main.configure().withRoutesReloadRemoveAllRoutes(true);
    main.run();

but this will catch and load any .yaml file under the "deploy" 
directory, event those that wasn't loaded at startup, when I touch any 
of the yamls.


Any tips on reloading patterns?

Thank you!

On 17.05.2023 21:06, Fyodor Kravchenko wrote:

Hi, thanks but this

.



Netbeans uses the following command to run the program:

cd /home/fedd/NetBeansProjects/camelmaintry; 
JAVA_HOME=/home/fedd/Programs/graalvm-ce-java19-22.3.0 
/snap/netbeans/76/netbeans/java/maven/bin/mvn -Dexec.vmArgs= 
"-Dexec.args=${exec.vmArgs} -classpath %classpath ${exec.mainClass} 
${exec.appArgs}" -Dexec.appArgs= 
-Dexec.mainClass=camelmaintry.CamelMainTry 
-Dexec.executable=/home/fedd/Programs/graalvm-ce-java19-22.3.0/bin/java 
org.codehaus.mojo:exec-maven-plugin:3.1.0:exec


(nothing special in the "exec.mainClass" and other placeholders there)

I can't grasp how to make it look into this pattern:

deploy/**/PRIVATE/EXCHANGE/*.yaml

Thanks!
--fedd

On 17.05.2023 20:15, Claus Ibsen wrote:

Hi

Okay for file system, you should favour prefixing with file:

main.configure().withRoutesIncludePattern("file:deploy/customer/PRIVATE/EXCHANGE/*.yaml"); 




On Wed, May 17, 2023 at 3:53 PM Fyodor Kravchenko 


wrote:


Hi,

I'm trying to load the routes from the file system directly, it's Camel
3.20.4, and it's java 19 from the GraalVM distribution running on 
Ubuntu

22.04. The fact it sees the file when no wildcard is present tells me
that I'm missing something in the wildcards and the docs.

Thank you!

--fedd

(sorry for the late response, only now I've got the rejection
notification for the html-formatted email)

On 15.05.2023 11:01, Claus Ibsen wrote:

Hi

Are you loading these files from classpath or file system directly.
And what Camel version do you use



On Sun, May 14, 2023 at 5:39 PM Fyodor Kravchenko 


wrote:


Hello,

in my little test I'm trying the following,


public class CamelMainTry {
   public static void main(String[] args) throws Exception {
   Main main = new Main();
//    this works but I need to catch more
//


main.configure().withRoutesIncludePattern("deploy/customer/PRIVATE/EXCHANGE/*.yaml"); 


//    these don't work:'
//


main.configure().withRoutesIncludePattern("deploy/**/PRIVATE/EXCHANGE/*.yaml"); 



main.configure().withRoutesIncludePattern("deploy/*/PRIVATE/EXCHANGE/*.yaml"); 


   main.run();
   }
}

my files are located:

deploy/customer/PRIVATE/EXCHANGE/cust.yaml

deploy/register/bank/PRIVATE/EXCHANGE/reg.yaml

So there could be more directories in the middle; however it doesn't
substitute even one.

The Ant-style (or what I'm thinking the Ant style) pattern doesn't 
seem
to catch multiple directories. If I specify the directory 
explicitly it

works, but I need it to locate the routes in dozens of directories.

How do I fix it?

(While we're at it I would also like to make it reload on the fly for
the testing purposes, not all of the .yaml files but restricting 
it to

my directory structure)

Thanks!

--fedd







Re: Camel Main: RoutesIncludePattern doesn't seem to respect asterisks as a directory placeholder

2023-05-17 Thread Fyodor Kravchenko

Hi, thanks but this

main.configure().withRoutesIncludePattern("file:deploy/customer/PRIVATE/EXCHANGE/*.yaml");

doesn't work saying "java.nio.file.NoSuchFileException: 
deploy/customer/PRIVATE/EXCHANGE"


Like I've said previously, without the double asterisks, it does work 
_without_ the "file:" prefix:


main.configure().withRoutesIncludePattern("deploy/customer/PRIVATE/EXCHANGE/*.yaml");

The above works but catches only one route.

However, I actually need to catch this pattern, with double asterisks:

main.configure().withRoutesIncludePattern("file:deploy/**/PRIVATE/EXCHANGE/*.yaml");

This fails with "java.nio.file.NoSuchFileException: deploy"

My routes are located at

deploy/customer/PRIVATE/EXCHANGE/cust.yaml

deploy/register/bank/PRIVATE/EXCHANGE/reg.yaml

and there be more routes in such a folder structure with the variable 
middle part. Actual file locations are:


/home/fedd/NetBeansProjects/camelmaintry/src/main/resources/deploy/customer/PRIVATE/EXCHANGE/cust.yaml

/home/fedd/NetBeansProjects/camelmaintry/src/main/resources/deploy/register/bank/PRIVATE/EXCHANGE/reg.yaml

and in the generated target:

/home/fedd/NetBeansProjects/camelmaintry/target/classes/deploy/customer/PRIVATE/EXCHANGE/cust.yaml

/home/fedd/NetBeansProjects/camelmaintry/target/classes/deploy/register/bank/PRIVATE/EXCHANGE/reg.yaml


Netbeans uses the following command to run the program:

cd /home/fedd/NetBeansProjects/camelmaintry; 
JAVA_HOME=/home/fedd/Programs/graalvm-ce-java19-22.3.0 
/snap/netbeans/76/netbeans/java/maven/bin/mvn -Dexec.vmArgs= 
"-Dexec.args=${exec.vmArgs} -classpath %classpath ${exec.mainClass} 
${exec.appArgs}" -Dexec.appArgs= 
-Dexec.mainClass=camelmaintry.CamelMainTry 
-Dexec.executable=/home/fedd/Programs/graalvm-ce-java19-22.3.0/bin/java 
org.codehaus.mojo:exec-maven-plugin:3.1.0:exec


(nothing special in the "exec.mainClass" and other placeholders there)

I can't grasp how to make it look into this pattern:

deploy/**/PRIVATE/EXCHANGE/*.yaml

Thanks!
--fedd

On 17.05.2023 20:15, Claus Ibsen wrote:

Hi

Okay for file system, you should favour prefixing with file:

main.configure().withRoutesIncludePattern("file:deploy/customer/PRIVATE/EXCHANGE/*.yaml");


On Wed, May 17, 2023 at 3:53 PM Fyodor Kravchenko 
wrote:


Hi,

I'm trying to load the routes from the file system directly, it's Camel
3.20.4, and it's java 19 from the GraalVM distribution running on Ubuntu
22.04. The fact it sees the file when no wildcard is present tells me
that I'm missing something in the wildcards and the docs.

Thank you!

--fedd

(sorry for the late response, only now I've got the rejection
notification for the html-formatted email)

On 15.05.2023 11:01, Claus Ibsen wrote:

Hi

Are you loading these files from classpath or file system directly.
And what Camel version do you use



On Sun, May 14, 2023 at 5:39 PM Fyodor Kravchenko 
Hello,

in my little test I'm trying the following,


public class CamelMainTry {
   public static void main(String[] args) throws Exception {
   Main main = new Main();
//this works but I need to catch more
//



main.configure().withRoutesIncludePattern("deploy/customer/PRIVATE/EXCHANGE/*.yaml");

//these don't work:'
//



main.configure().withRoutesIncludePattern("deploy/**/PRIVATE/EXCHANGE/*.yaml");



main.configure().withRoutesIncludePattern("deploy/*/PRIVATE/EXCHANGE/*.yaml");

   main.run();
   }
}

my files are located:

deploy/customer/PRIVATE/EXCHANGE/cust.yaml

deploy/register/bank/PRIVATE/EXCHANGE/reg.yaml

So there could be more directories in the middle; however it doesn't
substitute even one.

The Ant-style (or what I'm thinking the Ant style) pattern doesn't seem
to catch multiple directories. If I specify the directory explicitly it
works, but I need it to locate the routes in dozens of directories.

How do I fix it?

(While we're at it I would also like to make it reload on the fly for
the testing purposes, not all of the .yaml files but restricting it to
my directory structure)

Thanks!

--fedd







Re: Camel Main: RoutesIncludePattern doesn't seem to respect asterisks as a directory placeholder

2023-05-17 Thread Claus Ibsen
Hi

Okay for file system, you should favour prefixing with file:

main.configure().withRoutesIncludePattern("file:deploy/customer/PRIVATE/EXCHANGE/*.yaml");


On Wed, May 17, 2023 at 3:53 PM Fyodor Kravchenko 
wrote:

> Hi,
>
> I'm trying to load the routes from the file system directly, it's Camel
> 3.20.4, and it's java 19 from the GraalVM distribution running on Ubuntu
> 22.04. The fact it sees the file when no wildcard is present tells me
> that I'm missing something in the wildcards and the docs.
>
> Thank you!
>
> --fedd
>
> (sorry for the late response, only now I've got the rejection
> notification for the html-formatted email)
>
> On 15.05.2023 11:01, Claus Ibsen wrote:
> > Hi
> >
> > Are you loading these files from classpath or file system directly.
> > And what Camel version do you use
> >
> >
> >
> > On Sun, May 14, 2023 at 5:39 PM Fyodor Kravchenko  >
> > wrote:
> >
> >> Hello,
> >>
> >> in my little test I'm trying the following,
> >>
> >>
> >> public class CamelMainTry {
> >>   public static void main(String[] args) throws Exception {
> >>   Main main = new Main();
> >> //this works but I need to catch more
> >> //
> >>
> >>
> main.configure().withRoutesIncludePattern("deploy/customer/PRIVATE/EXCHANGE/*.yaml");
> >> //these don't work:'
> >> //
> >>
> >>
> main.configure().withRoutesIncludePattern("deploy/**/PRIVATE/EXCHANGE/*.yaml");
> >>
> >>
> main.configure().withRoutesIncludePattern("deploy/*/PRIVATE/EXCHANGE/*.yaml");
> >>   main.run();
> >>   }
> >> }
> >>
> >> my files are located:
> >>
> >> deploy/customer/PRIVATE/EXCHANGE/cust.yaml
> >>
> >> deploy/register/bank/PRIVATE/EXCHANGE/reg.yaml
> >>
> >> So there could be more directories in the middle; however it doesn't
> >> substitute even one.
> >>
> >> The Ant-style (or what I'm thinking the Ant style) pattern doesn't seem
> >> to catch multiple directories. If I specify the directory explicitly it
> >> works, but I need it to locate the routes in dozens of directories.
> >>
> >> How do I fix it?
> >>
> >> (While we're at it I would also like to make it reload on the fly for
> >> the testing purposes, not all of the .yaml files but restricting it to
> >> my directory structure)
> >>
> >> Thanks!
> >>
> >> --fedd
> >>
> >>
> >>
>


-- 
Claus Ibsen
-
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: Camel Main: RoutesIncludePattern doesn't seem to respect asterisks as a directory placeholder

2023-05-17 Thread Fyodor Kravchenko

Hi,

I'm trying to load the routes from the file system directly, it's Camel 
3.20.4, and it's java 19 from the GraalVM distribution running on Ubuntu 
22.04. The fact it sees the file when no wildcard is present tells me 
that I'm missing something in the wildcards and the docs.


Thank you!

--fedd

(sorry for the late response, only now I've got the rejection 
notification for the html-formatted email)


On 15.05.2023 11:01, Claus Ibsen wrote:

Hi

Are you loading these files from classpath or file system directly.
And what Camel version do you use



On Sun, May 14, 2023 at 5:39 PM Fyodor Kravchenko 
wrote:


Hello,

in my little test I'm trying the following,


public class CamelMainTry {
  public static void main(String[] args) throws Exception {
  Main main = new Main();
//this works but I need to catch more
//

main.configure().withRoutesIncludePattern("deploy/customer/PRIVATE/EXCHANGE/*.yaml");
//these don't work:'
//

main.configure().withRoutesIncludePattern("deploy/**/PRIVATE/EXCHANGE/*.yaml");

main.configure().withRoutesIncludePattern("deploy/*/PRIVATE/EXCHANGE/*.yaml");
  main.run();
  }
}

my files are located:

deploy/customer/PRIVATE/EXCHANGE/cust.yaml

deploy/register/bank/PRIVATE/EXCHANGE/reg.yaml

So there could be more directories in the middle; however it doesn't
substitute even one.

The Ant-style (or what I'm thinking the Ant style) pattern doesn't seem
to catch multiple directories. If I specify the directory explicitly it
works, but I need it to locate the routes in dozens of directories.

How do I fix it?

(While we're at it I would also like to make it reload on the fly for
the testing purposes, not all of the .yaml files but restricting it to
my directory structure)

Thanks!

--fedd