ivy

Maven or Ivy for Managing Dependencies from Ant?

这一生的挚爱 提交于 2019-12-03 04:13:39
问题 I was wondering about the best way to manage projects dependencies from ant. What are the pros and cons of the Maven Ant task and of Ivy? 回答1: Since what you're wanting to do is add dependency management to an existing Ant project, that's precisely what Ivy's designed to do. Dependency management is a big part of Maven, but far from all of it. Maven is more of a project-oriented tool that does several other things in addition to dependencies. It would be worth considering if you were planning

sbt: publish to corporate Nexus repository unauthorized

£可爱£侵袭症+ 提交于 2019-12-03 04:02:19
问题 Quick resolution The required credential expects the exact realm as defined by nexus. See below how to find the one you have defined, but most certainly is "Sonatype Nexus Repository Manager". Add the rest of the details to the credentials as normal. c:/data/user/.sbt/.credentials realm=Sonatype Nexus Repository Manager host=nexus user=repouser password=password build.sbt credentials += Credentials(Path.userHome / ".sbt" / ".credentials") publishTo <<= version { v: String => val nexus = "http

Use maven repository as local ivy cache

喜欢而已 提交于 2019-12-03 03:37:58
问题 Is there any possibility to use local Maven repository (~/.m2) as local Ivy cache (~/.ivy)? They have different layouts. Sometimes I use Maven and sometimes I use SBT which uses Ivy underneath, so I have 2 copies of same libs in both Maven and Ivy. I would like to use same dir thus saving disk space and network. Thanks. 回答1: You can specify the cache and the layout of the cache by using the <cache/> Tag . I think you will have to alter the patterns for the artifacts/ivy.xml files. The Tag is

Find hidden dependencies in Ivy

若如初见. 提交于 2019-12-03 02:51:17
I'm using Apache Ivy + IvyDE for getting my project's dependencies, which are: <dependency org="com.google.guava" name="guava" rev="r08" /> <!-- logging --> <dependency org="org.slf4j" name="jcl-over-slf4j" rev="1.6.1" /> <dependency org="ch.qos.logback" name="logback-classic" rev="0.9.27" /> <!-- database --> <dependency org="org.hibernate" name="hibernate-entitymanager" rev="3.6.2.Final" /> <dependency org="org.hibernate" name="hibernate-validator" rev="4.1.0.Final" /> <dependency org="org.hibernate" name="hibernate-c3p0" rev="3.6.2.Final" /> <dependency org="mysql" name="mysql-connector

Ant target failing: Antlib or Ivy issue? [duplicate]

十年热恋 提交于 2019-12-02 22:05:09
This question already has answers here : Ivy fails to resolve a dependency, unable to find cause (5 answers) Possible Duplicate: Ivy fails to resolve a dependancy, unable to find cause I'm trying to run the following build task ( initIvy ): <?xml version="1.0" encoding="UTF-8"?> <project name="myproject-build" default="package" basedir=".." xmlns:ivy="antlib:org.apache.ivy.ant"> <property file="build/build.properties"/> <property environment="env"/> <!-- Ant library path, including all of its plugins. --> <path id="ant.lib.path"> <fileset dir="${env.ANT_HOME}/lib" includes="*.jar"/> </path> <!

Ivy: Using dynamic revisions

ぐ巨炮叔叔 提交于 2019-12-02 21:54:28
问题 I'm having problems understanding how I to use dynamic revisions of Ivy effectively in my Java projects. Currently, I have the following layout: lib-a revision: 1.0.0 status: release dependencies: none lib-b revision: 2.0.0 status: release dependencies: lib-a, rev 1.0.0 project-a revision: 3.0.0 status: release dependencies: lib-b, rev 2.0.0 project-b revision: 4.0.0 status: release dependencies: lib-b, rev 2.0.0 That means I always keep the status to release and use explicit version numbers.

How to use ivy to build a war with out copying jars to a lib directory

假装没事ソ 提交于 2019-12-02 21:21:17
My goal is have my ant build script build a war file and include the jars that ivy knows this project depends on. The best code I could come up with at the moment is the following <mkdir dir="dist/lib"/> <ivy:retrieve pattern="dist/lib/[artifact].[ext]" sync="true"/> <war destfile="dist/${ivy.module}.war" basedir="build" includes="**/*.class" webxml="${war.webxml}"> <fileset dir="${war.web}"/> <lib dir="dist/lib"/> </war> The problem with this code is it copies the jars twice. Once in to my dist/lib directory and again in to the war when it's created. It works but I can't shake the feeling

Can I use properties in an ivy.xml file to avoid repeating version numbers of dependencies?

孤街浪徒 提交于 2019-12-02 20:31:54
Here's what part of my ivy.xml looks like right now: <dependency org="org.springframework" name="org.springframework.core" rev="3.0.2.RELEASE" /> <dependency org="org.springframework" name="org.springframework.context" rev="3.0.2.RELEASE" /> <dependency org="org.springframework" name="org.springframework.jdbc" rev="3.0.2.RELEASE" /> <dependency org="org.springframework" name="org.springframework.beans" rev="3.0.2.RELEASE" /> <dependency org="org.springframework" name="org.springframework.jms" rev="3.0.2.RELEASE" /> Here's what I'd like it to look like: <dependency org="org.springframework"

Echoing out ant fileset to screen for Debugging

你。 提交于 2019-12-02 19:02:19
I have this: <ivy:buildlist reference="build-path"> <fileset dir="${root.dir}"> <include name="*/build.xml" /> <include name="controllers/*/build.xml" /> </fileset> </ivy:buildlist> <subant buildpathref="build-path"> <target name="jar.all" /> <target name="publish-local" /> </subant> I want to echo out everything that is in the "build-path" reference (for debugging some things). I have tried: <echo>${build-path}</echo> but it just echos that exact text "${build-path}" You can use the documented (honest, it's in there somewhere...) toString helper: <echo message="My build-path is ${toString

How to search public Maven/Ivy repositories for a particular class?

旧巷老猫 提交于 2019-12-02 18:52:38
There are web sites like http://mvnrepository.com/ letting to search for an "artifact" and giving a definition I can add to my project for a library to be downloaded automatically from a public repository. But this particular example (mvnrepository.com) (the only working I know actually) is by-definition limited to "search by group, artifact or description" while I would like to search by a class full name. For example I'd like to enter org.apache.commons.lang.NotImplementedException to get <dependency org="commons-lang" name="commons-lang" rev="2.6"/> (or alike) as the answer. Is there a