> Anyway, shade is doing mostly what I want, except I cannot seem to configure
> it to include classes from a sibling module in Maven.

If you have it set up as a dependency, it should "just work."

> My structure is something like
>
> parent/pom.xml
> service-module/pom.xml
> common-module/pom.xml
> client-module/pom.xml

It is not clear to me if your parent directory is a sibling of
service-module and the others and thus all the pom.xml files are on
the same "level." If so, this is not how I would generally expect it
to be set up. Instead, you would have a parent directory and then
inside of that you would have the various modules.

> I want the service-module.jar to contain the classes from common-module, but
> can't figure out how. I tried putting the coordinates of common-module into
> my service-module/pom.xml, but Maven complains because it cannot find
> common-module in any repository.

First, you are probably not running from the parent. This should work
if you are running from the parent and have your multimodule project
set up properly.

Second, you can get around this by running "mvn install" in
common-module, and then try building the shaded jar in service-module
again. It will use the jar contents that are in your local repo cache,
not from the sibling directory.

Hopefully you are using snapshot versions while sorting out these
issues. Versions are important and it is typical for someone new to
Maven to not fully appreciate that once versioned (with anything
except a Snapshot version), an artifact must never change. Versioned
artifacts are immutable in Maven.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to