You are using the << notation. It adds dependencies to the API_DEPS array.

Here is a small reproduction:

irb(main):001:0> myarray = []
=> []
irb(main):002:0> mydeps = myarray << "foo"
=> ["foo"]
irb(main):003:0> mydeps
=> ["foo"]
irb(main):004:0> myarray
=> ["foo"]


> On May 3, 2021, at 9:35 PM, Robin Garner <robin.gar...@gmail.com> wrote:
> 
> Attached sample buildfile (apologies for the size), but the significant part 
> is reasonably concise.
> 
> On 4/5/21 2:20 pm, Antoine Toulme wrote:
>> Do you think you could recreate this situation with a test case? It might be 
>> easy to decide which dependencies to include in the pom.
>> 
>>> On May 3, 2021, at 9:18 PM, Robin Garner <robin.gar...@gmail.com> wrote:
>>> 
>>> I have a project that comprises a dozen or so subprojects.  The eventual
>>> web app has on the order of 200 dependencies, but at the 'low end' of the
>>> subprojects there's an API jar file that by rights should have exactly one
>>> dependency.
>>> 
>>> When I upload the API artifact to nexus, the pom.xml that is generated
>>> contains the complete set of project dependencies, not simply the API
>>> dependencies.
>>> 
>>> Some trial and error shows that the sub-project's dependency list is used
>>> for compiling and running unit tests, but POM generation and eclipse
>>> .classpath generation seem to use the union of all the subproject
>>> dependencies.
>>> 
>>> Is this a bug ?  I'm currently working around the issue using the
>>> 'pom.content' method to hand-build the exported pom.xml file, but IWBNI
>>> there was a better way.
>>> 
>>> 
>>> I'm running buildr 1.5.8 on ruby 2.4.
>>> 
>>> Thanks in advance,
>>> Robin
> <buildfile.txt>

Reply via email to