You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "kafka liu (Commented) (JIRA)" <ji...@apache.org> on 2011/12/01 02:41:39 UTC

[jira] [Commented] (BUILDR-618) pom properties feature does not support hierarchy

    [ https://issues.apache.org/jira/browse/BUILDR-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13160558#comment-13160558 ] 

kafka liu commented on BUILDR-618:
----------------------------------

Pls refer to such rspec test: 

describe Buildr::POM do
  before do
    repositories.remote = 'http://example.com'
    @app = 'group:app:jar:1.0'
    write artifact(@app).pom.to_s, <<-XML
<project>
  <properties>
    <a.version>${b.version}</a.version>
    <b.version>1.1</b.version>
  </properties>
  <artifactId>app</artifactId>
  <groupId>group</groupId>
  <dependencies>
    <dependency>
      <artifactId>library</artifactId>
      <groupId>org.example</groupId>
      <version>${a.version}</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <groupId>javax.mail</groupId>
          <artifactId>mail</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>
XML
    @library = 'org.example:library:jar:1.1'
    write artifact(@library).pom.to_s, <<-XML
<project>
  <artifactId>app</artifactId>
  <groupId>group</groupId>
  <dependencies>
    <dependency>
      <artifactId>mail</artifactId>
      <groupId>javax.mail</groupId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <artifactId>foo</artifactId>
      <groupId>org.example</groupId>
      <version>2.0</version>
    </dependency>
  </dependencies>
</project>
XML
  end

  it 'should respect exclusions when computing transitive dependencies' do
    pom = POM.load(artifact(@app).pom)
    specs = {"a.version"=>"1.1", "b.version"=>"1.1", "project.groupId"=>"group", "pom.groupId"=>"group", "groupId"=>"group", "project.artifactId"=>"app", "pom.artifactId"=>"app", "artifactId"=>"app"}
    pom.properties.should eql(specs)
  end
end
                
> pom properties feature does not support hierarchy
> -------------------------------------------------
>
>                 Key: BUILDR-618
>                 URL: https://issues.apache.org/jira/browse/BUILDR-618
>             Project: Buildr
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 1.4.6
>         Environment: jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_26) [Windows 7-amd64-java]
>            Reporter: kafka liu
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> It seems that buildr does not support such properties setting in pom.xml.
> Since many artifacts, such as cxf-parent, are using such setting, it will block the build process.
> <project>
>   <properties>
>     <a.version>${b.version}</a.version>
>     <b.version>1.1</b.version>
>   </properties>
>   <artifactId>app</artifactId>
>   <groupId>group</groupId>
>   <dependencies>
>     <dependency>
>       <artifactId>library</artifactId>
>       <groupId>org.example</groupId>
>       <version>${a.version}</version>
>       <scope>runtime</scope>
>       <exclusions>
>         <exclusion>
>           <groupId>javax.mail</groupId>
>           <artifactId>mail</artifactId>
>         </exclusion>
>       </exclusions>
>     </dependency>
>   </dependencies>
> </project>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira