Note that there are some explanatory texts on larger screens.

plurals
  1. POGradle Dependency loading from maven
    primarykey
    data
    text
    <p>I am new to gradle.</p> <p>I have seen some examples about java dependency like the following example but my project will be simply a zip file. I just want to download the zip file.</p> <pre><code>apply plugin: 'java' dependencies { compile 'commons-lang:commons-lang:2.6' } </code></pre> <p>In the above example, it will automatically download the jar file. But it doesn't download my zip file if my maven repositories contains zip that mentioned in the pom.xml about that package.</p> <p>Questions: </p> <ol> <li><p>What is the flow when depend on a maven repository? It will first read the pom.xml and then download the zip file?</p></li> <li><p>How to dynamically load the dependency? e.g 'commons-lang:commons-lang:2.6' will have dependency of 'commons-lang:en:1.0" in the pom.xml. How to make it automatically load and loop the dependency list?</p></li> </ol> <p>Thanks all</p> <p>I have tried the follwoing script but it gives me error on compile but I have apply the java plugin</p> <p>My gradle file</p> <pre><code>apply plugin: 'java' repositories { mavenLocal() maven { url "http://nexus.com/myrepo/" } } dependencies { compile 'com.a.b:projectA:2.0@zip' } </code></pre> <p>I can run without problem that files downloaded are inside .m2</p> <p>Question about the transitive dependency</p> <p>I have the pom.xml like this. But it is unable to load the dependency one. It will directly go to the new pom.xml first or download zip directly if i mention sth like this?</p> <pre><code> &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;com.a.b.c&lt;/groupId&gt; &lt;artifactId&gt;base&lt;/artifactId&gt; &lt;version&gt;1.2&lt;/version&gt; &lt;type&gt;zip&lt;/type&gt; &lt;/dependency&gt; &lt;/dependencies&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload