Answer the question
In order to leave comments, you need to log in
Java library dependency on another library, compilation and distribution
Good afternoon.
I am writing a small open source library in Java, I use Ant to build it. There was such a plan question about compilation and distribution.
My library depends on another library (jsoup html parser) which is required when compiling. There are such options:
1. Put the jsoup jar file in my repository.
Cons: extra binary in the repository.
2. Expect that the user has a jsoup of a specific version when compiling.
Cons: may not be present.
And also how to reflect this in build.xml in this case?
Wanted to know what is the standard practice.
It is also interesting how in this case to distribute the compiled assembly of your library - drag jsoup with you or expect that the user has it?
Answer the question
In order to leave comments, you need to log in
Use maven and the dependency will be pulled out by the user! Ant is already bad manners.
I agree with dborovikov's comment about maven, but if you really need ant, I recommend looking at ivy .
PS Dependency for jsoup can be searched at search.maven.org
If you really want ant, but you need dependencies, you can look towards maven.apache.org/ant-tasks/index.html
Then even when building with ant, libraries can be downloaded during compilation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question