- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我必须将一组依赖项镜像到我公司本地的 Ivy 存储库。
我目前需要发布 Hibernate Spatial 4.0-M1
.在我的 Eclipse 项目中,如果启用远程存储库,我只能解决 Ivy 依赖项 <ibiblio name="hibernate-spatial" m2compatible="true" root="http://www.hibernatespatial.org/repository"/>
(并从 dependencies.xml
中排除一些依赖项),其他开发人员没有这些依赖项,因为他们只能从 LAN 中检索。
所以我最终将 JAR 放入发布目录,使用适当的 Ant 任务将 HS 官方 POM 转换为 Ivy,最后我得到了以下 dependencies.xml
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="1.0" xmlns:m="http://ant.apache.org/ivy/maven">
<info organisation="org.hibernate"
module="hibernate-spatial"
revision="4.0-M1"
status="release"
publication="20130904175525"
>
<description homepage="" />
</info>
<configurations>
<conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/>
<conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/>
<conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths."/>
<conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
<conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/>
<conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." extends="runtime"/>
<conf name="system" visibility="public" description="this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository."/>
<conf name="sources" visibility="public" description="this configuration contains the source artifact of this module, if any."/>
<conf name="javadoc" visibility="public" description="this configuration contains the javadoc artifact of this module, if any."/>
<conf name="optional" visibility="public" description="contains all optional dependencies"/>
</configurations>
<publications>
<artifact name="hibernate-spatial" type="jar" ext="jar" conf="compile"/>
</publications>
<dependencies>
<dependency org="jaxen" name="jaxen" rev="1.1" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="junit" name="junit" rev="4.8.2" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="commons-logging" name="commons-logging-api" rev="99.0-does-not-exist" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.1" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="postgresql" name="postgresql" rev="8.4-701.jdbc4" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.slf4j" name="jcl-over-slf4j" rev="1.6.1" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="javax.validation" name="validation-api" rev="1.0.0.GA" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="dom4j" name="dom4j" rev="1.6.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<!--<dependency org="org.postgis" name="postgis-jdbc" rev="1.5.3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>-->
<dependency org="org.hibernate" name="hibernate-validator" rev="4.2.0.Final" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="org.slf4j" name="slf4j-api" rev="1.6.1" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="commons-dbcp" name="commons-dbcp" rev="1.4" force="true" conf="test->runtime(*),master(*)"/>
<!--<dependency org="org.jboss.logging" name="jboss-logging" rev="3.1.0.CR2" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>-->
<dependency org="com.fasterxml" name="classmate" rev="0.5.4" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="commons-logging" name="commons-logging" rev="99.0-does-not-exist" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="org.jboss" name="jandex" rev="1.0.3.Final" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="org.hibernate" name="hibernate-core" rev="4.0.0.Final" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.hibernate" name="hibernate-testing" rev="4.0.0.Final" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="com.vividsolutions" name="jts" rev="1.12" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.h2database" name="h2" rev="1.2.145" force="true" conf="test->runtime(*),master(*)"/>
<!--<dependency org="javassist" name="javassist" rev="3.12.1.GA" force="true" conf="test->runtime(*),master(*)"/>-->
</dependencies>
</ivy-module>
我运行以下 Ant 任务:
<target name="ivy-local-release" depends="ivy-config" description="Locally publish a file">
<ivy:resolve />
<ivy:publish artifactspattern="${ivy.install.dir}/publish/[artifact]-[revision].[ext]" resolver="local" status="release" overwrite="true" />
</target>
我得到以下输出:
ivy-config:
[ivy:configure] :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ ::
[ivy:configure] :: loading settings :: file = C:\Program Files (x86)\Ivy\ivy-settings.xml
ivy-local-release:
[ivy:resolve] :: resolving dependencies :: org.hibernate#hibernate-spatial;4.0-M1
[ivy:resolve] confs: [default, master, compile, provided, runtime, test, system, sources, javadoc, optional]
[ivy:resolve] found postgresql#postgresql;8.4-701.jdbc4 in maven2
[ivy:resolve] found dom4j#dom4j;1.6.1 in local
[ivy:resolve] found xml-apis#xml-apis;1.0.b2 in maven2
[ivy:resolve] found org.hibernate#hibernate-core;4.0.0.Final in maven2
[ivy:resolve] found commons-collections#commons-collections;3.2.1 in local
[ivy:resolve] found antlr#antlr;2.7.7 in local
[ivy:resolve] found org.jboss.spec.javax.transaction#jboss-transaction-api_1.1_spec;1.0.0.Final in local
[ivy:resolve] found org.hibernate.javax.persistence#hibernate-jpa-2.0-api;1.0.1.Final in maven2
[ivy:resolve] found org.jboss.logging#jboss-logging;3.1.0.CR2 in maven2
[...]
[ivy:resolve] ==== jboss: tried
[ivy:resolve] https://repository.jboss.org/nexus/content/repositories/releases/gnu-getopt/getopt/1.0.13/getopt-1.0.13.pom
[ivy:resolve] -- artifact gnu-getopt#getopt;1.0.13!getopt.jar:
[ivy:resolve] https://repository.jboss.org/nexus/content/repositories/releases/gnu-getopt/getopt/1.0.13/getopt-1.0.13.jar
[ivy:resolve] ==== shared: tried
[ivy:resolve] R:/repository/gnu-getopt/getopt/1.0.13/ivys/ivy.xml
[ivy:resolve] -- artifact gnu-getopt#getopt;1.0.13!getopt.jar:
[ivy:resolve] R:/repository/gnu-getopt/getopt/1.0.13/jars/getopt.jar
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: UNRESOLVED DEPENDENCIES ::
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: commons-logging#commons-logging-api;99.0-does-not-exist: not found
[ivy:resolve] :: commons-logging#commons-logging;99.0-does-not-exist: not found
[ivy:resolve] :: commons-httpclient#commons-httpclient;3.1-jbossorg-1: not found
[ivy:resolve] :: org.hornetq#hornetq-core;working@antonioanzivino: not found
[ivy:resolve] :: org.jboss.netty#netty;working@antonioanzivino: not found
[ivy:resolve] :: jacorb#jacorb;2.3.1jboss.patch01-brew: not found
[ivy:resolve] :: jacorb#idl;2.3.1jboss.patch01-brew: not found
[ivy:resolve] :: org.jboss.logmanager#jboss-logmanager;working@antonioanzivino: not found
[ivy:resolve] :: org.jboss.integration#jboss-transaction-spi;working@antonioanzivino: not found
[ivy:resolve] :: org.jboss.spec.javax.ejb#jboss-ejb-api_3.1_spec;working@antonioanzivino: not found
[ivy:resolve] :: org.jboss.spec.javax.servlet#jboss-servlet-api_3.0_spec;working@antonioanzivino: not found
[ivy:resolve] :: ${project.parent.groupId}#jboss-logging-generator;1.0.0.Beta6: not found
[ivy:resolve] :: org.jboss.ws#jbossws-api;1.0.0-SNAPSHOT: not found
[ivy:resolve] :: gnu-getopt#getopt;1.0.13: not found
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]
[ivy:resolve]
[ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
BUILD FAILED
我在 ivy-settings.xml
中使用了以下解析器配置
<resolvers>
<filesystem name="shared" >
<ivy pattern="${ivy.shared.default.root}/${ivy.shared.default.ivy.pattern}" />
<artifact pattern="${ivy.shared.default.root}/${ivy.shared.default.artifact.pattern}" />
</filesystem>
<ibiblio name="maven2" m2compatible="true"/>
<ibiblio name="geotools" m2compatible="true" root="http://download.osgeo.org/webdav/geotools"/>
<ibiblio name="hibernate-spatial" m2compatible="true" root="http://www.hibernatespatial.org/repository"/>
<ibiblio name="jboss" m2compatible="true" root="https://repository.jboss.org/nexus/content/repositories/releases/"/>
<ibiblio name="mavenjava" m2compatible="true" root="http://download.java.net/maven/2" />
</resolvers>
<resolvers>
<chain name="default" returnFirst="false">
<resolver ref="local" />
<resolver ref="maven2" />
<resolver ref="geotools" />
<resolver ref="hibernate-spatial" />
<resolver ref="jboss" />
<resolver ref="shared" />
</chain>
</resolvers>
奇怪的是,当我运行ivy:resolve
时,我可以解决所有的依赖关系。在我的本地项目上。
我想在发布新 Artifact 时递归地发布对本地 Ivy 存储库的依赖项。如何做到这一点?
最佳答案
它必须 Ivy 吗?在内部托管依赖项的更好选择是设置 Maven 存储库管理器,如 Nexus .然后将从自动检索 Maven Central 等外部存储库并在本地缓存。
如果您决定使用 Ivy ,我建议您查看 ivy install task .
关于java - 将 Maven Artifact 发布到本地 Ivy 存储库,递归地及其依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18634590/
对于 Nexus 中的 Artifact ,我想找出类路径,即该 Artifact 是针对哪个 Artifact 的哪个版本构建的。当然,解析pom会给出一些提示,但由于我们有父POM、依赖管理等,这
我想将库部署到公司的远程存储库。 这是我第一次要将库项目部署到远程存储库。 我收到以下错误消息: org.sonatype.aether.transfer.ArtifactNotFoundExcept
在我们的 Artifact 上,我们有POM文件为 commons-lang commons-lang 2.6 4.0.0 commons-lang commons-la
我们使用 Maven 来构建我们的项目,并使用 Nexus 作为存储库管理器。 有没有办法知道一个 Artifact 在哪里是另一个 Artifact 的依赖项? 例如,我们想知道我们的发布存储库中的
我已经重新初始化了我的 pom.xml,但是我得到了: ArtifactDescriptorException: Failed to read artifact descriptor for org.
将maven Android 项目导入eclipse 时出现以下错误: Could not update project assistance configuration me.gladwell.
假设,ArtifactA 依赖于 ArtifactB,ArtifactC 也依赖于 ArtifactB 我知道“mvn dependency plugin”可以帮助列出项目/Artifact 的依赖项
在我的 Maven 构建结束时,一个用于此明确目的的模块从各种其他模块收集 Artifact ,并使用 Assembly 插件将它们压缩到一个存档中。完成后,它会使用 Deploy 插件将它们部署到
我有一个我正在尝试构建的相对较新的项目。 Gradle 同步正常,但每当我尝试构建时,都会收到如下错误: Execution failed for task ':app:kaptGenerateStu
我在 Azure DevOps 中设置了 Gradle 构建,它在 Azure DevOps git 存储库中编译代码,然后将生成的 JAR(作为 Maven Artifact )发布到 Azure
提出这个问题的另一种方式是: 如何验证maven使用 Azure 进行项目 personal access token这样Maven构建就可以下载artifacts发表于Azure Artifacts
提出这个问题的另一种方式是: 如何验证maven使用 Azure 进行项目 personal access token这样Maven构建就可以下载artifacts发表于Azure Artifacts
这与具有类似错误的现有问题有点不同 - 我不认为这是重复的。 我有项目 A,我使用 mvn clean install 在本地成功构建并安装了该项目。 我验证了director中存在jar和pom~/
我有一个包含此存储库的 Artifact 服务器 发布 锁定版本 我必须将一些 Artifact (大约 50.000 个)从版本移至锁定版本... 我需要识别具有精确版本的 Artifact : 例
我正在升级一个拥有 3000 多个 java maven 项目和 repos 的庞大系统,从 Java 7 部署到 Java 8。我们将尝试一次迁移部分系统,这意味着一些 Artifact 会使用 j
所以我遇到了一个错误 Failed to read artifact descriptor对于已部署到我本地 Nexus 的插件。我检查了 Nexus 上的 pom。 这个插件依赖于 Maven 2.
在 Azure DevOps 中,我们有 Download/Publish构建工件任务和 Download/Publish管道工件任务。 构建工件任务和管道工件任务之间有什么区别,我们什么时候会选择一
我有一个由 Maven 管理的原始 java webapp(因此会生成一个 WAR 文件),我们称它为 webapp。 我喜欢保持其 Maven 配置不变,但有时我需要通过操作其内容(或以任何方式对其
我有一个 Artifact abc,它有一些测试。我的存储库中有不同版本的 abc。我现在希望能够针对项目的“旧版本”运行最新的测试。 我试图将 Artifact 本身添加到测试依赖项中,但这(当然)
我目前有一个用 Maven 构建的 Java 测试库,并作为 jar 分发。我的项目依赖于一个非常常见的库 (Objectweb ASM),而且我遇到了一些问题,即类路径中已经存在较早且不兼容的 AS
我是一名优秀的程序员,十分优秀!