![]() ![]() The "publish" target is worthy of special note it pushes the built jar into a local location where it can be picked up by other module builds. Note how ivy configurations are used to control the classpaths. Ivy configurations are used to classify and group dependencies.No need to commit them into your source code repository. ![]() Dependencies get downloaded automatically from Maven Central. Lists the 3rd party dependencies that the module has. The "clean-all" task is useful for ensuring the build is sweaky clean :-) Ivy will cache downloaded 3rd party dependencies.Contains logic to ensure the ivy jar dependency is installed if missing.A single module called "app" which is dependency of the "server" module ├── build.xml The ivy plugin provides this feature to ANT. So how is this done using ANT? Well you'll need to embrace another Maven concept, dependency management. This approach creates clean separation between modules and means you don't need to build the entire project when working on one sub-module. This jar file is then a dependency of the other modules that consume its classes. Each module creates and publishes a jar file to the "local" repository. My personal preference is to emulate how Maven does it. Multi module builds are difficult because there are no standards, each build author have his own approach to solving this problem. Compiling server to D:\work\test\ant-test2\server\build using classpath: D:\work\test\ant-test2\app\build Compiling to D:\work\test\ant-test2\app\build Compiling server to D:\work\test\ant-test2\server\build using classpath: D:\work\test\ant-test2\server\buildĭesired output: Buildfile: D:\work\test\ant-test2\server\build.xml Compiling to D:\work\test\ant-test2\server\build Output: Buildfile: D:\work\test\ant-test2\server\build.xml Could you please explain in a more simple way? Code snippet to clarify question little bit. How to make ant resolve app locations relatively to app and server locations relatively to server. But it resolves classpath relatively to server and not to app because of import issues. When I compile server I want to include class files from app into the build. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |