You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl Heinz Marbaise (JIRA)" <ji...@apache.org> on 2018/07/19 20:46:00 UTC

[jira] [Comment Edited] (MDEP-623) Need to be able to tell Maven to not bother trying to download particular sources jars

    [ https://issues.apache.org/jira/browse/MDEP-623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16549833#comment-16549833 ] 

Karl Heinz Marbaise edited comment on MDEP-623 at 7/19/18 8:45 PM:
-------------------------------------------------------------------

Sorry to say that but you seemed to be misunderstanding the concept here. The build only takes binaries (jar's) as dependencies and will never use source packages nor download them cause they are not needed. If you like to debug use the IDE which can simply being configured to do so..

So coming to your point about: Based on your example pom you have told Maven to download the sources so as [~michael-o] already described: Where is the issue? Just do not download source packages during a build where it is never needed...which means remove the usage of maven-dependency-plugin as in your example...

Another question: Why are trying to download the source package during your build? If you have repository manager in your company which I hope you have this is useless. The first time someone will try to get them via the IDE they will be downloaded to the repository manager and cached there..during the build of your product they are simply not needed...

So the final answer would be: Removed the maven-dependency-plugin with the request to download source packages during your build...except you have other reasons which you haven't expressed yet...

This will drop down your build time...

In the end we could see that as an issue in the maven-dependency-plugin in sources goal which might need an improvement...but I can't recommend to download source jars during the build...


was (Author: khmarbaise):
Sorry to say that but you seemed to be misunderstanding the concept here. The build only takes binaries (jar's) as dependencies and will never use source packages nor download them cause they are not needed. If you like to debug use the IDE which can simply being configured to do so..

So coming to your point about: Based on your example pom you have told Maven to download the sources so as [~michael-o] already described: Where is the issue? Just do not download source packages during a build where it is never needed...which means remove the usage of maven-dependency-plugin as in your example...

Another question: Why are trying to download the source package during your build? If you have repository manager in your company which I hope you have this is useless. The first time someone will try to get them via the IDE they will be downloaded to the repository manager and cached there..during the build of your product they are simply not needed...

So the final answer would be: Removed the maven-dependency-plugin with the request to download source packages during your build...except you have other reasons which you haven't expressed yet...

This will drop down your build time...

> Need to be able to tell Maven to not bother trying to download particular sources jars
> --------------------------------------------------------------------------------------
>
>                 Key: MDEP-623
>                 URL: https://issues.apache.org/jira/browse/MDEP-623
>             Project: Maven Dependency Plugin
>          Issue Type: Improvement
>          Components: sources
>            Reporter: Jim Showalter
>            Priority: Major
>         Attachments: pom.xml
>
>
> Sources jars are optional, so Maven has no way of knowing if a project decided to publish a sources jar. Even if the code and released jar hasn't changed since 1998, somebody might edit the build pom to generate a sources jar.
> This causes Maven to attempt to fetch non-existent sources jars in perpetuity.
> Maven waits several seconds when attempting to fetch a sources jar before giving up.
> We have 142 sourceless jars on our build path.
> The wait time multiplied by 142 winds up adding 11 minutes to our builds.
> We don't want to shut off sources jars, because, when they exist, developers use them to step through code. But we don't want Maven to keep trying to download sources jars we know don't exist and are pretty sure will never exist.
> Something like a section in settings.xml for ignoreSourcesJars that allowed us to list the ones to ignore would be great.
> I'm happy to help with this if someone can point me to where in the code a change like this needs to be made.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)