You can have a look at the source code for Maven itself.

/Anders (mobile)

Den fre 16 okt. 2020 16:45/dev /local/ca <[email protected]> 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 <[email protected]> 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 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 projects on e.g. Github.
> >
> > /Anders
> >
> > On Fri, Oct 16, 2020 at 10:13 AM /dev /local/ca <[email protected]>
> > wrote:
> >
> > > 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
> > > src/com/pkg-path-two/.../
> > >
> > > the repo I inherited does not have the typical layout:
> src/main/java/com
> > > and so on, but starts at src/com
> > > ------------------------------
> > >
> > > I am assuming two commands would need to be run specifying a target for
> > > each jar (maybe - not sure), but having both jars built with a single
> > > command would be helpful.
> > >
> > > I am starting from ground zero with maven, so a full example of a
> pom.xml
> > > would be helpful, if anyone has one around they have used for this in
> the
> > > past.
> > >
> > > thank you
> > >
> >
>

Reply via email to