Correct way to include javax.validation sources with ivy

At first I’ve copied this dependency line:

<dependency org="javax.validation" name="validation-api"
rev="1.0.0.GA" conf="build,ide -> default,sources" />

from uitest project in
repository
. There are similar dependencies in other files.

For some reason this didn’t work. There was no source jar in build classpath even though there was also no ivy resolution error.

From some old (2011)
post
I’ve found that the dependency should look like following:

<dependency org="javax.validation" name="validation-api" rev="1.0.0.GA">
<artifact name="validation-api"/>
<artifact name="validation-api" m:classifier="sources"/>
</dependency>

and this one seems to work.

So which one is correct ? Does onyone know why first dependency line does not work ?