question on maven dependency scope

2023-10-01 Thread Siddharth Jain
hello. https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope - *provided* This is much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime. For example, when building a web application

maven-javadoc-plugin cannot find symbol in another module while building a multi-module project

2023-10-03 Thread Siddharth Jain
Hello, I am compiling a multi-module project with Maven. When I run maven clean install the compilation succeeds on a submodule but the javadoc plugin throws error while trying to generate javadoc for the submodule that has dependency on another submodule. My parent pom has:

maven-compiler-plugin adds all dependencies to the module-path when executing test-compile when it shouldn't

2023-10-12 Thread Siddharth Jain
Hello, I am building a project that uses modules (JPMS) I have observed the maven-compiler-plugin behaves differently for test vs. main compilation. I have a project and the main compilation works but the test code does not compile. when i looked at the logs, i see during the test-compile phase

Re: maven-compiler-plugin adds all dependencies to the module-path when executing test-compile when it shouldn't

2023-10-12 Thread Siddharth Jain
Hi Martin, Thanks for your response. please see inline: > Which approach did you choose for the tests? One approach is to > duplicate the module-info.java file in the test directory [1], but this > is not the only way. > Yes, that is the approach I took. Basically, the test code is put in its

how to use maven exec plugin with modules?

2023-10-18 Thread Siddharth Jain
I am developing an application using Java modules. when i try to run it using exec:java it seems the exec-plugin adds all dependencies to the classpath. i verified this using the -X option. the behavior expected is the modularized dependencies should be added to the module path. i am using plugin

How to use Vector API with Maven Exec Plugin

2023-08-21 Thread Siddharth Jain
> > > Hello, How can I use the Vector API with maven exec plugin? I compiled my project with these settings and it worked fine: org.apache.maven.plugins maven-compiler-plugin 20 20 --enable-preview --add-modules jdk.incubator.vector 20 But when I try to run it using mvn exec:java I get

Re: java.lang.ClassNotFoundException: com.google.common.base.Preconditions

2022-07-25 Thread Siddharth Jain
for the execution to work. > www.mojohaus.org > gruss > Martin > > From: Siddharth Jain > Sent: Sunday, July 24, 2022 8:13 PM > To: Maven Users List > Subject: Re: java.lang.ClassNotFoundException: > com.google.common.base.Preconditions >

Re: java.lang.ClassNotFoundException: com.google.common.base.Preconditions

2022-07-24 Thread Siddharth Jain
- > http://bernd.eckenfels.net > ____ > Von: Siddharth Jain > Gesendet: Sunday, July 24, 2022 8:46:04 PM > An: users@maven.apache.org > Betreff: java.lang.ClassNotFoundException: > com.google.common.base.Preconditions > > we are running into the dreaded ClassN

java.lang.ClassNotFoundException: com.google.common.base.Preconditions

2022-07-24 Thread Siddharth Jain
we are running into the dreaded ClassNotFoundException in a project. Here is the setup. Using JDK 11 and Maven 3.8.5. Trying to create sample test project that uses memory-measurer to measure memory. First we mvn packaged and installed the

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 > > lib

Re: How to add a library to the classpath

2023-01-05 Thread Siddharth Jain
gt; https://github.com/search?l=Maven+POM=additionalClasspathElements=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

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

Re: How to add a library to the classpath

2023-01-05 Thread Siddharth Jain
. to give an example. On Thu, Jan 5, 2023 at 5:10 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 wrote: > >> On Thu, Jan 5, 2023 at 3:20 PM Siddharth Jain wrote: &

Re: Re: How to add a library to the classpath

2023-01-06 Thread Siddharth Jain
n.apache.org/plugins/maven-dependency-plugin/build-classpath-mojo.html > > > Delany > > > > > > On Fri, 6 Jan 2023 at 05:30, Siddharth Jain (mailto:siddh...@gmail.com)> wrote: > > > > > > > thanks. unfortunately this is exactly what i don'

Re: Re: How to add a library to the classpath

2023-01-06 Thread Siddharth Jain
: > The way to separate multiple classpaths is to have multiple poms. You can > make another child module (so that it inherits the base dependencies) and > add the extra dependencies and the exec:java to THAT module. > Delany > > On Fri, 6 Jan 2023 at 18:55, Siddharth Jain w

Re: How does maven resolve inter-module dependencies in a multi-module build?

2024-02-15 Thread Siddharth Jain
e' build. > Joe > > On 2024/02/15 17:50:44 Siddharth Jain wrote: > > Hello, > > > > I am working on a multi-module Maven build. e.g., I have a root directory > > containing 3 sub-projects A, B, C and a parent pom defined in the root > > directory. I not

How does maven resolve inter-module dependencies in a multi-module build?

2024-02-15 Thread Siddharth Jain
Hello, I am working on a multi-module Maven build. e.g., I have a root directory containing 3 sub-projects A, B, C and a parent pom defined in the root directory. I notice that I can run mvn compile from the root directory and it will build the 3 projects. The projects may have inter-dependencies

Re: How does maven resolve inter-module dependencies in a multi-module build?

2024-02-15 Thread Siddharth Jain
over the m2 repo because the > > > builds in the reactor will be up-to-date whereas the jar in the repo > may > > be > > > out of date. > > > > > > If you run mvn compile in directory B then you will not be running a > > multi > > > module build - a

MAVEN_OPTS on Windows does not behave correctly

2024-01-28 Thread Siddharth Jain
Hello, I have: >mvn -v Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae) Maven home: C:\Program Files\apache-maven-3.9.6 Java version: 21.0.2, vendor: Oracle Corporation, runtime: C:\Program Files\jdk-21.0.2 Default locale: en_US, platform encoding: UTF-8 OS name: "windows 11",

Re: MAVEN_OPTS on Windows does not behave correctly

2024-01-29 Thread Siddharth Jain
on2=value2" > > Windows Cmd.exe: > set MAVEN_OPTS=-Doption1=value1 -Doption2=value2 > > Just do not use the double quotes there. They are used for arguments > which actually contain spaces. > > -- > Alexander Kriegisch > https://scrum-master.de > > > S

weird error - property substitution not working

2024-05-09 Thread Siddharth Jain
Hello, I have a property defined in parent pom: 1.17.3 I have project A that has following: com.microsoft.onnxruntime onnxruntime ${onnxruntime.version} it installs fine. I have project B that has following: com.example projectA ${project.version} test this give me this bizarre error