How to add a library to the classpath

2023-01-05 Thread Siddharth Jain
Hello, I am using mvn exec:java to run a program. It automatically adds all the dependencies defined in the project's pom.xml to the Java classpath at runtime which is good but I want to add some more libraries that I have installed in M2 repository to the classpath at runtime and I do NOT want to

Re: How to add a library to the classpath

2023-01-05 Thread Laird Nelson
On Thu, Jan 5, 2023 at 3:20 PM Siddharth Jain wrote: > I am using mvn exec:java to run a program. […] I want to add some more > libraries that I have > installed in M2 repository to the classpath at runtime and I do NOT want to > list them in the project's pom.xml. How can I do this? I tried sear

Re: How to add a library to the classpath

2023-01-05 Thread Siddharth Jain
thanks. how do i separate multiple classpaths? tried : and , and none of them work. On Thu, Jan 5, 2023 at 3:58 PM Laird Nelson wrote: > On Thu, Jan 5, 2023 at 3:20 PM Siddharth Jain wrote: > > > I am using mvn exec:java to run a program. […] I want to add some more > > libraries that I have >

Re: How to add a library to the classpath

2023-01-05 Thread Greg Chabala
Try searching for an example: https://github.com/search?l=Maven+POM&q=additionalClasspathElements&type=Code On Thu, Jan 5, 2023 at 7:11 PM Siddharth Jain wrote: > thanks. how do i separate multiple classpaths? tried : and , and none of > them work. > > On Thu, Jan 5, 2023 at 3:58 PM Laird Nelson

Re: How to add a library to the classpath

2023-01-05 Thread Siddharth Jain
in fact i don't think it works at all. tried using it like -Dexec.additionalClasspathElements and doesn't work. i notice the documentation only says: Additional elements to be appended to the classpath. for rest of the options the documentation also says: *User property is*: exec.arguments. to give

Re: How to add a library to the classpath

2023-01-05 Thread Siddharth Jain
thanks. unfortunately this is exactly what i don't want to do. i am looking for a command line solution. i don't want my users to have to write a pom.xml to add additional dependencies to the classpath. On Thu, Jan 5, 2023 at 5:16 PM Greg Chabala wrote: > Try searching for an example: > > https:

Re: How to add a library to the classpath

2023-01-05 Thread Arnaud bourree
Hi, Maven without pom.xml? Why don't you write shell script in this case? Arnaud Le ven. 6 janv. 2023, 04:30, Siddharth Jain a écrit : > thanks. unfortunately this is exactly what i don't want to do. i am looking > for a command line solution. i don't want my users to have to write a > pom.xml