buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kafka liu (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BUILDR-617) pom exclusions do not work well
Date Fri, 25 Nov 2011 07:50:41 GMT

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

kafka liu commented on BUILDR-617:
----------------------------------

Found the problem in pom.rb, pls help to fix it.

line 98 should be: exclusions = dep["exclusions"].first["exclusion"] rescue nil
line 101 should be: exclusions.find {|ex| dep.index("#{ex['groupId'].first}:#{ex['artifactId'].first}:")
== 0}
                
> pom exclusions do not work well
> -------------------------------
>
>                 Key: BUILDR-617
>                 URL: https://issues.apache.org/jira/browse/BUILDR-617
>             Project: Buildr
>          Issue Type: Bug
>          Components: Dependency management
>    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
>              Labels: maven
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Project POM:
> <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.demo</groupId>
>   <artifactId>demo</artifactId>
>   <version>0.0.1-SNAPSHOT</version>
>   <packaging>jar</packaging>
>   <name>demo</name>
>   <url>http://maven.apache.org</url>
>   <properties>
>   	<spring.version>3.0.6.RELEASE</spring.version>
>     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>   </properties>
>   <dependencies>
> 	<dependency> 
> 	        <groupId>log4j</groupId> 
> 	        <artifactId>log4j</artifactId> 
> 	        <version>1.2.15</version>
> 	        <scope>compile</scope>
> 	        <exclusions> 
>                 <exclusion>
>                 	<groupId>javax.mail</groupId>
>                 	<artifactId>mail</artifactId>
>                 </exclusion> 
>                 <exclusion>
>                 	<groupId>javax.jms</groupId>
>                 	<artifactId>jms</artifactId>
>                 </exclusion> 
>                 <exclusion>
>                 	<groupId>com.sun.jdmk</groupId>
>                 	<artifactId>jmxtools</artifactId>
>                 </exclusion> 
>                 <exclusion>
>                 	<groupId>com.sun.jmx</groupId>
>                 	<artifactId>jmxri</artifactId>
>                 </exclusion> 
> 	        </exclusions> 
> 	</dependency>   
>   </dependencies>
> </project>
> And the buildfile:
> VERSION_NUMBER = '0.0.1-SNAPSHOT'
> define "demo", :group => 'com.demo', :version => VERSION_NUMBER do
>   package :jar
>   
>   pom = POM.load "pom.xml"
>   puts "#{pom.dependencies.inspect}"
> end
> When I run buildr compile, will be received such output:
> ["log4j:log4j:jar:1.2.15", "javax.mail:mail:jar:1.4", "javax.activation:activation:jar:1.1",
"javax.jms:jms:jar:1.1", "com.sun.jdmk:jmxtools:jar:1.2.1", "com.sun.jmx:jmxri:jar:1.2.1"]
> Compiling demo
> Completed in 0.018s
> It seems that some jars are not excluded.

--
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

        

Mime
View raw message