[jbosstools-issues] [JBoss JIRA] (JBIDE-15332) why are skipRequirements controlling download of normal maven dependencies ?

Max Rydahl Andersen (JIRA) issues at jboss.org
Thu Nov 26 09:53:00 EST 2015


    [ https://issues.jboss.org/browse/JBIDE-15332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134355#comment-13134355 ] 

Max Rydahl Andersen commented on JBIDE-15332:
---------------------------------------------

>both download-maven-plugin and maven-dependency-plugin have cache mechanism that makes that a single file is >downloaded only twice.

Yes, that saves time for the download but not for unzipping of the runtime. That continuously happen and what really makes the process slow. 

>For "runtime" bundles (such as forge, livereload...) consuming jars and zips to work propertly, we never want to skip the >download of their inner parts. Then, for those, we can simply unset/remove the skip property or force it to false, so we're >sure whenever they build their runtime are copied where necessary (and fetched if necessary).

These are what I call *normal* dependencies and should just always work and no pom doing these should need to do special things (like listing skip stuff at all - the default should just work imo)

>For "tests" bundles, I believe (I'm less sure) that it's about the same: whenever one is going to run the tests, the the artifacts >need to be downloaded. 

Often just once; and don't need to be unzipped for quick builds runs.

>So I believe we can set in such bundles (or in their parent pom in component/tests for better >factorization) skip=skipTests. >Since maven-download-plugin already provides the mdep.skip property and download-maven-plugin provides a >download.plugin.skip properties, here are the concrete step I suggest:

>Remove the skipRequirements in parent pom https://github.com/jbosstools/jbosstools-build/blob/master/parent/pom.xml#L46

I think having a standard property name for it makes sense IMO

 > Remove default setting of skip on line 509 and 519
  >  In components/tests/pom.xml for components that have test requiring runtimes,

YES! This is the actual bug/problem IMO. That we tie a global property into the skip/disable of these plugins that are used for more than just runtime requirements downloads for testing.

> add
 >   <properties>
  >    <mdep.skip>${skipTests}</mdep.skip>
   >   <download.plugin.skip>${skipTests}</download.plugin.skip>
   > </properties>
I would make this:


{code:shell}
 <properties>
   <mdep.skip>${skipRequirements}</mdep.skip>
    <download.plugin.skip>${skipRequirements}</download.plugin.skip>
   </properties>
{code}

Then you can still do "mvn verify -DskipRequirements=true" and you will have a faster test run.


> why are skipRequirements controlling download of normal maven dependencies ?
> ----------------------------------------------------------------------------
>
>                 Key: JBIDE-15332
>                 URL: https://issues.jboss.org/browse/JBIDE-15332
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: build
>    Affects Versions: 4.2.0.Beta1
>            Reporter: Max Rydahl Andersen
>            Assignee: Mickael Istria
>            Priority: Minor
>              Labels: f2f2014
>             Fix For: LATER
>
>
> I stumbled on [~dgolovin]'s patch for livreload at https://github.com/jbosstools/jbosstools-livereload/pull/54/files
> This is not the first time i've seen skip having to be enabled for plain normal mvn dependencies.
> skipRequirements are supposed to only cover big downloads (like EAP, jboss etc.) - things done via non-maven download mechanism.
> Why is this applied to mvn dependency downloads ? 
> The culprit for needing this line is at:
> https://github.com/jbosstools/jbosstools-build/blob/master/parent/pom.xml#L397
> and a bugzilla (*not* jira?!) is referenced as the reason for this back in 2012: https://github.com/jbosstools/jbosstools-build/commit/2e18baaf88e0cd73b3b99885658e00789e8fd198
> I understand why the explicit google download plugin (why is there two versions used btw?) but why is skipTests controlling normal mvn dependency download ? Which requirements are using this for download ?



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jbosstools-issues mailing list