Ruby 为什么Buildr失败?
我在pom.xml中有这样的内容:Ruby 为什么Buildr失败?,ruby,maven,pom.xml,buildr,Ruby,Maven,Pom.xml,Buildr,我在pom.xml中有这样的内容: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.ap
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.aaa</groupId>
<artifactId>bbb</artifactId>
<version>0.0.1</version>
<packaging>war</packaging>
<name>Xxx</name>
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jboss.aop</groupId>
<artifactId>jboss-aop</artifactId>
<version>2.1.8.GA</version>
</dependency>
</dependencies>
</project>
这显然是因为URI.parse
无法解析字符串[”https://repository.jboss.org/nexus/content/groups/public-jboss/“]
因为它包含方括号和双引号
有没有办法解决这个问题
版本包括:
$ ruby --version
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
$ buildr --version
/usr/local/lib64/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/alt_system.rb:32: Use RbConfig instead of obsolete and deprecated Config.
/usr/lib64/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
Buildr 1.4.6
你能发布你的全部POM吗?我打赌你可以在别的地方找到这个罐子 如果我不得不猜测的话,我会说一个可传递的依赖依赖依赖于JBoss存储库中的工件。JBoss为各种JavaAPI提供了许多洁净室JAR。我敢打赌,您的一个可传递依赖项正在为此目的使用JBoss JAR 编辑:
更详细地说,在Ruby代码中,您使用的是JBossAOPjar中的类吗 另外,Maven允许我将URL放在CData中。。。试试这个:
<url><![CDATA[https://repository.jboss.org/nexus/content/groups/public-jboss]]></url>
另外,请尝试禁用https:
<url><![CDATA[http://repository.jboss.org/nexus/content/groups/public-jboss]]></url>
<url>http://repository.jboss.org/nexus/content/groups/public-jboss</url>
http://repository.jboss.org/nexus/content/groups/public-jboss
编辑#2:另一种解决方法,尝试在~/.m2/settings.xml文件中添加JBoss作为Repo,并将其从项目pom中删除:
<?xml version="1.0" encoding="UTF-8"?>
<settings
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>myprofile</id>
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>myprofile</activeProfile>
</activeProfiles>
</settings>
我的个人资料
jboss公共存储库组
JBoss公共Maven存储库组
https://repository.jboss.org/nexus/content/groups/public-jboss/
违约
真的
从未
真的
从未
我的个人资料
我没有使用它,因为我发出的第一个命令失败了。你知道其他任何与pom.xml格式兼容的Ruby构建工具吗?Oleg,这看起来像是Buildr中的一个bug,我认为你应该通过提交bug或询问用户列表来解决这个问题。但这是Buildr最基本的功能,我想这是Buildr的第一个用途。这就是为什么我认为是我做错了什么。。。然后将尝试用户列表,实际上使用pom文件生成构建文件并不常见。您只需执行一次,然后继续使用构建文件。您是否尝试了~/.m2/settings.xml技巧?我添加并更新了pom.xml
以演示此问题。问题不在于具体的依赖关系,而在于Build试图将包含方括号和双引号的字符串解析为URI——这可能是一个错误,只是为了彻底了解,在Ruby代码中,您是否使用jboss aop jar中的类?我不是编译Ruby代码,这是一个Java项目:)我只是想看看Buildr是否真的是Maven的一个更快的替代品(正如广告所宣传的那样)。。。我真的是在编故事!无论如何,我猜URL周围的CData没有帮助?不幸的是,用CData包装URL不会改变任何东西。。。可能这只是一个需要提交给Apache的bug
<?xml version="1.0" encoding="UTF-8"?>
<settings
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>myprofile</id>
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>myprofile</activeProfile>
</activeProfiles>
</settings>