2

I've got this in my 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.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>

running buildr results in this:

$ buildr -v compile
/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.
To use Buildr you need a buildfile. Do you want me to create one?:
1. From Maven2 POM file
2. From directory structure
3. Cancel
?  1
Downloading org.jboss.aop:jboss-aop:pom:2.1.8.GA
Buildr aborted!
URI::InvalidURIError : bad URI(is not URI?): ["https://repository.jboss.org/nexus/content/groups/public-jboss/"]

That's obviously because URI.parse can't parse String ["https://repository.jboss.org/nexus/content/groups/public-jboss/"] because it contains square brackets and double quotes.

Is there any way to fix that?

Versions are:

$ 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
8
  • I'm not using it, since it failed on the first command that I issued. Do you know any other Ruby build tool compatible with pom.xml format? Dec 3, 2011 at 22:33
  • Oleg, this looks like a bug in Buildr and I think you should bring this up by filing a bug or asking the user list. Dec 9, 2011 at 18:26
  • But that's the most basic functionality that one could expect from Buildr, I guess it's the first thing that Buildr is being used for. That is why I thought it was me doing something wrong... will try the user list then, thanks Dec 10, 2011 at 10:29
  • It's actually not very common to use a pom file to generate a Buildfile. You do it once and then keep using the Buildfile. Jan 2, 2012 at 8:39
  • did you try the ~/.m2/settings.xml trick? Jan 25, 2012 at 16:25

1 Answer 1

1

Can you post your entire POM? I bet you can locate the jar somewhere else.

If I had to guess, I'm going to say a transitive dependency is relying on an artifact from the JBoss repository. JBoss hosts a lot of clean room jars for various Java APIs. I bet one of your transitive dependencies is using the JBoss jars for this purpose.

EDIT: Just to be thorough, in your Ruby code, are you using classes from the jboss-aop jar?

Also, Maven allows me to put the URL in CData... try this:

<url><![CDATA[https://repository.jboss.org/nexus/content/groups/public-jboss]]></url>

Also, try disabled https:

<url><![CDATA[http://repository.jboss.org/nexus/content/groups/public-jboss]]></url>
<url>http://repository.jboss.org/nexus/content/groups/public-jboss</url>

EDIT #2: Another workaround, try adding JBoss as a Repo in your ~/.m2/settings.xml file and removing it from your project 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>
6
  • I've added and updated pom.xml to demonstrate the problem. The problem is not with specific dependency but rather the fact that Build tries to parse a String containing square brackets and double quotes as a URI -- which could be a bug Jan 18, 2012 at 9:12
  • Just to be thorough, in your Ruby code, are you using classes from the jboss-aop jar? Jan 18, 2012 at 15:38
  • I'm not compiling Ruby code, that's a Java project :) I just wanted to see if Buildr was really a faster drop-in replacement for Maven (as it's being advertised). Jan 18, 2012 at 19:12
  • OH lol. Somehow I read ruby in your description... I really was making things up! Anyway, I'm guessing the CData around the URLs didn't help? Jan 18, 2012 at 20:06
  • Unfortunately wrapping URL with CDATA doesn't change anything... Probably it's just a bug that needs to be submitted to Apache Jan 20, 2012 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.