Closed GoogleCodeExporter closed 9 years ago
IvyIDEA will already do this automatically. The detection is based on the
artifact type and can be configured on the IvyIDEA configuration screen,
perhaps your sources/javadocs type aren't configured there?
Original comment by maarten....@gmail.com
on 26 Jan 2012 at 11:24
[deleted comment]
It could very likely be me but I am not sure how. I really haven't changed
anything from the default settings so I would figure it would automatically
work but it is not. I ran a simple test. I took one dependency, joda-time, a
library I know to have sources working and cleared it from my ivy cache. I then
went and resolved the dependencies using IvyIDEA and it only downloaded the jar
in the cache. The source jar was not downloaded. Here are the ivy file,
settings file, and IvyIDEA artifact types I have configured.
Ivy File
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="com.example" module="exampleivy" status="integration">
</info>
<configurations>
<conf name="compile"/>
</configurations>
<dependencies>
<dependency org="joda-time" name="joda-time" rev="2.0" conf="compile->default"/>
</dependencies>
</ivy-module>
Ivy Settings file
<?xml version="1.0" encoding="UTF-8"?>
<ivysettings>
<settings defaultResolver="main"/>
<resolvers>
<ibiblio name="maven-central" m2compatible="true"/>
<ibiblio name="java.net" m2compatible="true" root="http://download.java.net/maven/2/"/>
<chain name="main" dual="true">
<resolver ref="maven-central"/>
<resolver ref="java.net"/>
</chain>
</resolvers>
</ivysettings>
IvyIDEA settings:
jar, mar, sar, war, ear, ejb, bundle, test-jar
source, src, sources, srcs
javadoc, doc, docs, apidoc, apidocs, documentation, documents
Original comment by viper2...@gmail.com
on 28 Jan 2012 at 3:12
For maven modules, Ivy will put the sources jar in the 'sources' configuration,
so if you want IvyIDEA to attach the sources, you have to tell Ivy to download
the sources configuration as well:
<dependency org="joda-time" name="joda-time" rev="2.0"
conf="compile->default,sources"/>
Original comment by maarten....@gmail.com
on 28 Jan 2012 at 6:33
Thanks for the reply. I had a feeling you were going to mention this. :-) Your
explanation is why I posted the issue. The IvyDE plugin for Eclipse handles
this slightly differently. It will download and attach the sources of the jars
regardless of the configuration/scope you have provided in your file. They make
the assumption that since you are inside of the IDE it would make sense to have
the sources attached.
Original comment by viper2...@gmail.com
on 30 Jan 2012 at 4:39
ok, I'll reopen the issue
Original comment by maarten....@gmail.com
on 1 Feb 2012 at 11:49
Thanks for hearing me out. Much appreciated.
Original comment by viper2...@gmail.com
on 2 Feb 2012 at 2:53
The eclipse plugin also seems to automatically download the sources/javadocs
for transitive dependencies. duplicating that behavior for ivyidea would be
great.
Original comment by JamesK...@gmail.com
on 28 Mar 2013 at 5:02
Here's a patch I did a while ago that retrieves sources/javadocs even if they
aren't selected by an Ivy configuration. It's based on what IvyDE does. Hope it
helps.
Original comment by bene.nz
on 12 Apr 2013 at 5:05
Attachments:
Is this issue fix?
Original comment by plv....@gmail.com
on 17 Jun 2013 at 5:11
The fix provided works for me.
Original comment by nat...@gmail.com
on 17 Jun 2013 at 6:20
The patch worked for me as well.
Original comment by sbhus...@etsy.com
on 5 Sep 2013 at 2:43
Using <ivy:resolve type="source"/> all sources are downloaded to the cache.
Just need to add them in the library settings as the jars.
Original comment by a...@burmeister-teltow.de
on 15 Oct 2013 at 12:06
To the maintainer: I've been using custom builds of the plugin with this patch
for the past few months so that all sources are available. There haven't been
any problems.
When can we have this in a release? Thank you :)
Original comment by shik...@schmizz.net
on 27 Jan 2014 at 5:15
Thanks for pinging me about this issue.
I was unaware there was a patch available.
I'll try to take a look at it.
Is it still valid against latest SVN trunk?
Original comment by maarten....@gmail.com
on 29 Jan 2014 at 9:37
Original comment by maarten....@gmail.com
on 29 Jan 2014 at 9:38
Yes, it is still valid and applies cleanly
Original comment by shik...@schmizz.net
on 30 Jan 2014 at 5:37
This issue was closed by revision r279.
Original comment by maarten....@gmail.com
on 12 Feb 2014 at 10:05
I've applied the patch. I've also made this behaviour configurable in the
IvyIDEA settings (enabled by default). It would be great if someone could give
it a try before I publish a new release.
Original comment by maarten....@gmail.com
on 12 Feb 2014 at 10:06
works for me! thanks, looking forward to the release
Original comment by shik...@schmizz.net
on 13 Feb 2014 at 8:00
Seems good for me.
Original comment by viper2...@gmail.com
on 21 Feb 2014 at 3:05
Original issue reported on code.google.com by
viper2...@gmail.com
on 24 Jan 2012 at 5:29