- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我没有构建 Java 项目的经验,我正在尝试为 Solr 构建一个分词器(可在此处找到:https://github.com/LucidWorks/auto-phrase-tokenfilter)。我在编译期间收到有关无法解析的依赖项的错误。缺少的依赖项是 org.reSTLet 和 org.reSTLet.servlet。这些的存储库在这里:http://maven.restlet.com/org/restlet/jee/org.restlet/2.1.1/ . Ant/Ivy/Maven 似乎在 repo1.maven.org 上寻找 reSTLet 依赖项。我不确定如何让 Ivy 在正确的位置查找这些内容。
我尝试手动下载 reSTLet,但不确定将 jar 文件放在哪里。它看起来像/usr/share/maven-repository/中的某个地方,但我没有运气把它们放在那里,而且我不确定如果我把它们放在里面,ant/ivy/maven 是否会在那里寻找无论如何都是正确的地方。
如有任何帮助或指导,我们将不胜感激。
这是构建输出:
root@solrtest:/usr/src/auto-phrase-tokenfilter# ant
Buildfile: /usr/src/auto-phrase-tokenfilter/build.xml
init:
ivy-download:
ivy-init:
ivy-resolve:
[ivy:resolve] :: Apache Ivy 2.3.0 - 20130110142753 :: http://ant.apache.org/ivy/ ::
[ivy:resolve] :: loading settings :: file = /usr/src/auto-phrase-tokenfilter/ivy/ivy-settings.xml
[ivy:resolve] :: resolving dependencies :: com.lucidworks.demo#autophrase-tokenfilter;working@solrtest
[ivy:resolve] confs: [default, compile, test]
[ivy:resolve] found org.apache.lucene#lucene-analyzers-common;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-core;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-codecs;4.10.3 in central
[ivy:resolve] found org.apache.solr#solr-core;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-analyzers-kuromoji;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-analyzers-phonetic;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-expressions;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-grouping;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-highlighter;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-join;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-memory;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-misc;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-queries;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-queryparser;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-spatial;4.10.3 in central
[ivy:resolve] found org.apache.lucene#lucene-suggest;4.10.3 in central
[ivy:resolve] found org.apache.solr#solr-solrj;4.10.3 in central
[ivy:resolve] found commons-io#commons-io;2.3 in central
[ivy:resolve] found org.apache.httpcomponents#httpclient;4.3.1 in central
[ivy:resolve] found org.apache.httpcomponents#httpcore;4.3 in central
[ivy:resolve] found org.apache.httpcomponents#httpmime;4.3.1 in central
[ivy:resolve] found org.apache.zookeeper#zookeeper;3.4.6 in central
[ivy:resolve] found org.codehaus.woodstox#wstx-asl;3.2.7 in central
[ivy:resolve] found org.noggit#noggit;0.5 in central
[ivy:resolve] found org.slf4j#slf4j-api;1.7.6 in central
[ivy:resolve] found com.carrotsearch#hppc;0.5.2 in central
[ivy:resolve] found com.google.guava#guava;14.0.1 in central
[ivy:resolve] found com.google.protobuf#protobuf-java;2.5.0 in central
[ivy:resolve] found com.googlecode.concurrentlinkedhashmap#concurrentlinkedhashmap-lru;1.2 in central
[ivy:resolve] found com.spatial4j#spatial4j;0.4.1 in central
[ivy:resolve] found commons-cli#commons-cli;1.2 in central
[ivy:resolve] found commons-codec#commons-codec;1.9 in central
[ivy:resolve] found commons-configuration#commons-configuration;1.6 in central
[ivy:resolve] found commons-fileupload#commons-fileupload;1.2.1 in central
[ivy:resolve] found commons-lang#commons-lang;2.6 in central
[ivy:resolve] found dom4j#dom4j;1.6.1 in central
[ivy:resolve] found joda-time#joda-time;2.2 in central
[ivy:resolve] found log4j#log4j;1.2.17 in central
[ivy:resolve] found org.antlr#antlr-runtime;3.5 in central
[ivy:resolve] found org.apache.hadoop#hadoop-annotations;2.2.0 in central
[ivy:resolve] found org.apache.hadoop#hadoop-auth;2.2.0 in central
[ivy:resolve] found org.apache.hadoop#hadoop-common;2.2.0 in central
[ivy:resolve] found org.apache.hadoop#hadoop-hdfs;2.2.0 in central
[ivy:resolve] found org.eclipse.jetty#jetty-continuation;8.1.10.v20130312 in central
[ivy:resolve] found org.eclipse.jetty#jetty-deploy;8.1.10.v20130312 in central
[ivy:resolve] found org.eclipse.jetty#jetty-http;8.1.10.v20130312 in central
[ivy:resolve] found org.eclipse.jetty#jetty-io;8.1.10.v20130312 in central
[ivy:resolve] found org.eclipse.jetty#jetty-jmx;8.1.10.v20130312 in central
[ivy:resolve] found org.eclipse.jetty#jetty-security;8.1.10.v20130312 in central
[ivy:resolve] found org.eclipse.jetty#jetty-server;8.1.10.v20130312 in central
[ivy:resolve] found org.eclipse.jetty#jetty-servlet;8.1.10.v20130312 in central
[ivy:resolve] found org.eclipse.jetty#jetty-util;8.1.10.v20130312 in central
[ivy:resolve] found org.eclipse.jetty#jetty-webapp;8.1.10.v20130312 in central
[ivy:resolve] found org.eclipse.jetty#jetty-xml;8.1.10.v20130312 in central
[ivy:resolve] found org.eclipse.jetty.orbit#javax.servlet;3.0.0.v201112011016 in central
[ivy:resolve] found org.ow2.asm#asm;4.1 in central
[ivy:resolve] found org.ow2.asm#asm-commons;4.1 in central
[ivy:resolve] found org.apache.lucene#lucene-test-framework;4.10.3 in central
[ivy:resolve] found com.carrotsearch.randomizedtesting#junit4-ant;2.1.6 in central
[ivy:resolve] found com.carrotsearch.randomizedtesting#randomizedtesting-runner;2.1.6 in central
[ivy:resolve] found junit#junit;4.10 in central
[ivy:resolve] found org.apache.ant#ant;1.8.2 in central
[ivy:resolve] found org.apache.solr#solr-test-framework;4.10.3 in central
[ivy:resolve] :: resolution report :: resolve 8098ms :: artifacts dl 47ms
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| default | 59 | 0 | 0 | 0 || 57 | 0 |
| compile | 59 | 0 | 0 | 0 || 57 | 0 |
| test | 65 | 0 | 0 | 0 || 63 | 0 |
---------------------------------------------------------------------
[ivy:resolve]
[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: WARNINGS
[ivy:resolve] module not found: org.restlet.jee#org.restlet;2.1.1
[ivy:resolve] ==== central: tried
[ivy:resolve] http://repo1.maven.org/maven2/org/restlet/jee/org.restlet/2.1.1/org.restlet-2.1.1.pom
[ivy:resolve] -- artifact org.restlet.jee#org.restlet;2.1.1!org.restlet.jar:
[ivy:resolve] http://repo1.maven.org/maven2/org/restlet/jee/org.restlet/2.1.1/org.restlet-2.1.1.jar
[ivy:resolve] module not found: org.restlet.jee#org.restlet.ext.servlet;2.1.1
[ivy:resolve] ==== central: tried
[ivy:resolve] http://repo1.maven.org/maven2/org/restlet/jee/org.restlet.ext.servlet/2.1.1/org.restlet.ext.servlet-2.1.1.pom
[ivy:resolve] -- artifact org.restlet.jee#org.restlet.ext.servlet;2.1.1!org.restlet.ext.servlet.jar:
[ivy:resolve] http://repo1.maven.org/maven2/org/restlet/jee/org.restlet.ext.servlet/2.1.1/org.restlet.ext.servlet-2.1.1.jar
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: UNRESOLVED DEPENDENCIES ::
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: org.restlet.jee#org.restlet;2.1.1: not found
[ivy:resolve] :: org.restlet.jee#org.restlet.ext.servlet;2.1.1: not found
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]
[ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
BUILD FAILED
/usr/src/auto-phrase-tokenfilter/build.xml:115: impossible to resolve dependencies:
resolve failed - see output for details
Total time: 9 seconds
build.xml:
<project name="auto-phrase-tokenfilter" default="dist" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant" >
<description>Builds Autophrasing Token Filter</description>
<!-- set global properties for this build -->
<property name="build.dir" location="build"/>
<property name="dist.dir" location="dist"/>
<property name="build.lib.dir" value="${basedir}/build-lib"/>
<property name="src.dir" location="src/main/java"/>
<property name="classes.dir" location="${build.dir}/java" />
<property name="test.dir" location="src/test" />
<property name="test.classes.dir" location="${build.dir}/test" />
<property name="ivy.dir" location="${basedir}/ivy"/>
<property name="ivy.dep.file" location="ivy.xml" />
<property name="ivy.version" value="2.3.0"/>
<property name="ivy.lib.dir" location="${build.lib.dir}/ivy/lib" />
<property name="project.name" value="${ant.project.name}" />
<property name="version.number" value="1.0"/>
<!-- change this to include ivy download dest -->
<target name="set-classpaths" depends="ivy-retrieve" >
<path id="compile-classpath" >
<fileset dir="${ivy.lib.dir}/compile" includes="*.jar"/>
</path>
<path id="test-classpath">
<fileset dir="${ivy.lib.dir}/test" includes="*.jar"/>
</path>
</target>
<target name="init">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build.dir}"/>
<mkdir dir="${classes.dir}"/>
<mkdir dir="${test.classes.dir}"/>
</target>
<target name="compile" depends="init,ivy-retrieve,set-classpaths" description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src.dir}" destdir="${classes.dir}" includeantruntime="false" >
<classpath>
<fileset dir="${ivy.lib.dir}" includes="compile/*.jar" />
</classpath>
</javac>
</target>
<target name="compile-test" depends="compile" >
<javac srcdir="${test.dir}" destdir="${test.classes.dir}" includeantruntime="false" >
<classpath>
<fileset dir="${ivy.lib.dir}" includes="test/*.jar" />
<pathelement location="${classes.dir}" />
</classpath>
</javac>
</target>
<target name="dist" depends="compile,test" description="generate the distribution" >
<!-- Create the distribution directory -->
<ivy:resolve/>
<mkdir dir="${classes.dir}"/>
<jar jarfile="${dist.dir}/${project.name}-${version.number}.jar" basedir="${classes.dir}"/>
<!-- Add JavaDocs -->
</target>
<target name="clean" description="clean up" >
<!-- Delete the ${build.dir} and ${dist.dir} directory trees -->
<ivy:cleancache/>
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${ivy.lib.dir}"/>
</target>
<target name="test" depends="compile,compile-test">
<echo message=""/>
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<formatter usefile="false" type="plain"/>
<classpath>
<path refid="test-classpath"/>
<pathelement location="${classes.dir}"/>
<pathelement location="${test.classes.dir}" />
</classpath>
<assertions>
<enable/>
</assertions>
<test name="com.lucidworks.analysis.TestAutoPhrasingTokenFilter"/>
</junit>
</target>
<!-- Ivy -->
<condition property="ivy.jar.exists">
<or>
<available file="${build.lib.dir}/ivy-${ivy.version}.jar"/>
<isset property="offline"/>
</or>
</condition>
<target name="ivy-download" unless="ivy.jar.exists">
<mkdir dir="${build.lib.dir}"/>
<get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar"
dest="${build.lib.dir}/ivy-${ivy.version}.jar"
usetimestamp="true"/>
</target>
<target name="ivy-init" depends="ivy-download" unless="skip.ivy" description="initialize ivy">
<path id="ivy.lib.path">
<fileset dir="${build.lib.dir}" includes="ivy-${ivy.version}.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
<ivy:settings file="${ivy.dir}/ivy-settings.xml"/>
</target>
<target name="ivy-resolve" depends="ivy-init" >
<ivy:resolve />
</target>
<target name="ivy-retrieve" depends="ivy-resolve" >
<ivy:retrieve pattern="${ivy.lib.dir}/[conf]/[artifact]-[revision].[ext]" sync="true" />
</target>
</project>
ivy/ivy-settings.xml:
<ivysettings>
<settings defaultResolver="central"/>
<resolvers>
<ibiblio name="central" m2compatible="true"/>
</resolvers>
</ivysettings>
最佳答案
以下是我最终为解决依赖性问题所做的工作。我不确定我配置的模块行中的哪一行是获取依赖项的行。链就是这样做的——它将按照指定的顺序处理存储库。
<ivysettings>
<settings defaultResolver="my-chain"/>
<resolvers>
<chain name="my-chain">
<ibiblio name="restlet" m2compatible="true" root="http://maven.restlet.com"/>
<ibiblio name="central" m2compatible="true"/>
</chain>
</resolvers>
<modules>
<module organization="org.restlet.jee" resolver="restlet"/>
<module organization="restlet" resolver="restlet"/>
<module organization="org.restlet" resolver="restlet"/>
</modules>
</ivysettings>
关于Java Ivy/Maven 为 LucidWorks auto-phrase-tokenizer 构建依赖解析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30630227/
我在 gobject 上阅读了一个维基百科页面,上面写着, Depending only on GLib and libc, GObject is a cornerstone of GNOME and
如何注册一个依赖属性,其值是使用另一个依赖属性的值计算的? 由于 .NET 属性包装器在运行时被 WPF 绕过,因此不应在 getter 和 setter 中包含逻辑。解决方案通常是使用 Proper
我一直在尝试将 ActionbarSherlock maven 依赖项添加到我的项目中 com.actionbarsherlock library 4.2.0 在我的 po
http://tutorials.jenkov.com/ood/understanding-dependencies.html#whatis说(强调我的): Whenever a class A us
我对所有这些魔法有点不清楚。 据我了解,依赖属性是从 DependencyObject 继承的,因此存储值: 如果分配了值(在本地字典中),则在实例本身中 或者如果未指定值,则从指向父元素的链接中获取
我刚刚更新了在 ASP.NET Framework 4.5.2 版上运行的 MVC Web 应用程序。我正在使用 Twilio 发送 SMS 消息: var twilio = new TwilioRe
我刚刚发现了一件令人生畏的事情。 spring 依赖坐标有两个版本。 项目依赖于 spring mvc 和 spring flow。有两组并行的依赖项。 Spring MVC 具有以下方案的依赖项
我正在尝试包含 的 maven 依赖项 org.jacorb jacorb 2.3.1 依赖已解决,但它导致另一个依赖 picocontainer 出现问题: [ERROR
我正在尝试在 Haskell 项目中包含特定版本的库。该库是住宿加早餐型的(用于 martix 操作),但我需要特定的 0.4.3 版本,该版本修复了乘法实现的错误。 所以,我的 stack.yaml
有谁知道如何制作依赖的 UIPickerView.例如,当我选择组件一的第 2 行时,组件二的标题会发生变化吗? 我在互联网上查找过,没有真正的答案,我尝试过使用 if 和 switch 语句,但它们
我正在编写一个用于验收测试的项目,由于各种原因,这依赖于另一个打包为 WAR 的项目。我已成功使用 maven-dependency-plugin 解压 WAR,但无法让我的项目包含解压的 WEB-I
或多或少我在 session 上大量构建我的网站(特别是重定向用户等),我很好奇这是否是一种危险的做法。禁用浏览器 cookie 保存的用户的大致比例是多少?我愿意接受任何建议:) 谢谢 最佳答案 s
开始玩 Scala futures,我被依赖的 futures 困住了。 让我们举个例子。我搜索地点并获得 Future[Seq[Place]]。对于这些地点中的每一个,我搜索最近的地铁站(该服务返回
或多或少我在 session 上大量构建我的网站(特别是重定向用户等),我很好奇这是否是一种危险的做法。禁用浏览器 cookie 保存的用户的大致比例是多少?我愿意接受任何建议:) 谢谢 最佳答案 s
我有一个二进制文件,需要一些 *.so 文件才能执行。现在,当我尝试在一些旧机器上执行它时,它会显示 /lib/libc.so.6: version `GLIBC_2.4' not found 如何将
我尝试使用 Dygraph 来表示图表,我在 https://github.com/danvk/dygraphs 中找到了代码,但是它有太多的依赖文件,我觉得很烦人。是否有一个文件可以容纳所有必需的
我正在处理一个 javascript 文件,该文件 a) 声明一个具有函数的对象,并且 b) 使用它期望在外部声明的散列调用该对象的 init 函数。我的 Jasmine 规范提示它找不到哈希,因为它
最近我一直在学习 Angular 并且进展顺利,但是关于依赖注入(inject)的一些事情我仍然不清楚。 是否有任何理由在我的 app.js 文件中声明我的应用程序的其他部分(服务、 Controll
考虑一个名为 foo 的表,它有 id (PRIMARY & AUTO_INCREMENT) 列。我正在向该表中插入一行,挑战从此时开始。 $db->query("INSERT INTO `foo`
我正在使用级联下拉 jquery 插件。 (https://github.com/dnasir/jquery-cascading-dropdown) 我有两个下拉菜单。 “客户端”和“站点”。 根据您
我是一名优秀的程序员,十分优秀!