Re: Using Apache Maven, what is the simplest way to include /lib/ directory in the classpath in the pom.xml

2020-10-16 Thread Greg Chabala
I appreciate that you're trying to use Maven to build software, but you've framed your question unfairly. What is the simplest way to specify a directory (and all jars underneath > this directory) to be in the maven classpath when it compiles .java classes > and builds a .jar? > Maven builds

Re: How to build multiple .jars from a single /src/ tree?

2020-10-16 Thread Anders Hammar
You can have a look at the source code for Maven itself. /Anders (mobile) Den fre 16 okt. 2020 16:45/dev /local/ca skrev: > Thank you Anders: > > Do you have an example, or can point me to one on github? > > On Fri, Oct 16, 2020 at 2:44 AM Anders Hammar wrote: > > > This is not the right way

Re: Using Apache Maven, what is the simplest way to include /lib/ directory in the classpath in the pom.xml

2020-10-16 Thread /dev /local/ca
Thank you for the suggestion Bernd, Do you have an example you can share? There are hundreds of jar files in the $TOMCAT_HOME//WEB-INF/lib directory. I need something with no more than 5..10 lines of XML that would include this directory so that it would pick up all jars and add to the class

Re: How to build multiple .jars from a single /src/ tree?

2020-10-16 Thread /dev /local/ca
Thank you Anders: Do you have an example, or can point me to one on github? On Fri, Oct 16, 2020 at 2:44 AM Anders Hammar wrote: > This is not the right way to create two jars with Maven. It is possible to > do it, but you will likely run into other issues later on. > What you should do is

Re: How to build multiple .jars from a single /src/ tree?

2020-10-16 Thread Bernd Eckenfels
You can configure multiple jar creation runs (for example with the assembly or maven-jar-plugin) with include and exclude rules, which creates a second jar with a classifier. But derivations from a default build (one jar per module) should be done only if absolutely necessary. In the Long run

Re: How to build multiple .jars from a single /src/ tree?

2020-10-16 Thread Anders Hammar
This is not the right way to create two jars with Maven. It is possible to do it, but you will likely run into other issues later on. What you should do is create a multi-module project where you have one module for each jar artifact you want to create. There are numerous examples of multi-module

Re: Using Apache Maven, what is the simplest way to include /lib/ directory in the classpath in the pom.xml

2020-10-16 Thread Bernd Eckenfels
Hello, It is really not a good idea to fight maven. If you need something in the classpath for compile, specify it as dependency in the Pom. Otherwise your build cannot be repeated and the project is hard to set up. All tomcat libraries needed to compile should be in the maven repository. If

Using Apache Maven, what is the simplest way to include /lib/ directory in the classpath in the pom.xml

2020-10-16 Thread /dev /local/ca
What is the simplest way to specify a directory (and all jars underneath this directory) to be in the maven classpath when it compiles .java classes and builds a .jar? The directory is not in my git repo or any directory under my IDE project files. I have a requirement to create a pom.xml that

How to build multiple .jars from a single /src/ tree?

2020-10-16 Thread /dev /local/ca
Using Apache Maven, I want to know the simplest way to build mutliple jar files based on the package path from a single src/ directory hierarchy I have src/com/pkg-path-one/.../ and src/com/pkg-path-two/.../ I am required to build one jar from src/pkg-path-one, and another jar from