yetus-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yetus QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YETUS-524) audience-annotations can not be used as a dependency in a gradle build
Date Fri, 23 Jun 2017 18:09:00 GMT

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

Yetus QA commented on YETUS-524:
--------------------------------

| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m  9s{color} | {color:blue}
Docker mode activated. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  0s{color} |
{color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m  0s{color}
| {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} xml {color} | {color:green}  0m  3s{color} | {color:green}
The patch has no ill-formed XML file. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m  0s{color}
| {color:green} The patch does not generate ASF License warnings. {color} |
| {color:black}{color} | {color:black} {color} | {color:black}  0m 15s{color} | {color:black}
{color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=1.11.2 Server=1.11.2 Image:yetus/yetus:ca562e8 |
| JIRA Issue | YETUS-524 |
| JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12874296/YETUS-524.00.patch
|
| Optional Tests |  xml  |
| uname | Linux 952ebb3fee8e 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017
x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | nobuild |
| git revision | master / 2113cfa |
| modules | C: . U: . |
| Console output | https://builds.apache.org/job/PreCommit-YETUS-Build/593/console |
| Powered by | Apache Yetus 0.5.0-SNAPSHOT   http://yetus.apache.org |


This message was automatically generated.



> audience-annotations can not be used as a dependency in a gradle build
> ----------------------------------------------------------------------
>
>                 Key: YETUS-524
>                 URL: https://issues.apache.org/jira/browse/YETUS-524
>             Project: Yetus
>          Issue Type: Bug
>          Components: Audience Annotations
>    Affects Versions: 0.4.0
>            Reporter: Grant Henke
>             Fix For: 0.5.0
>
>         Attachments: YETUS-524.00.patch
>
>
> The Yetus audience-annotations module uses a jdk profile in the parent yetus-project
pom to define the tool.jar to use in the dependency management section:
> {code:title=audience-annotations/pom.xml}
> ...
> <dependencies>
>     <dependency>
>       <!-- Version and location set in project pom -->
>       <groupId>jdk.tools</groupId>
>       <artifactId>jdk.tools</artifactId>
>       <scope>system</scope>
>       <!-- Mark as optional so that it isn't taken transitively -->
>       <optional>true</optional>
>     </dependency>
>   </dependencies>
> ...
> {code}
> {code:title=yetus-project/pom.xml}
> ...
> <profiles>
>     <profile>
>       <id>jdk1.7</id>
>       <activation>
>         <jdk>1.7</jdk>
>       </activation>
>       <dependencyManagement>
>         <dependencies>
>           <dependency>
>             <groupId>jdk.tools</groupId>
>             <artifactId>jdk.tools</artifactId>
>             <version>1.7</version>
>             <scope>system</scope>
>             <systemPath>${java.home}/../lib/tools.jar</systemPath>
>           </dependency>
>         </dependencies>
>       </dependencyManagement>
>     </profile>
> ...
> {code}
> This causes issues when trying to download the maven dependency via a gradle project
because gradle does not support jdk profile activation and views profile activation requirements
as a reproducibility anti-pattern to be avoided. ([source|https://blog.gradle.org/maven-pom-profiles]).
> The issue seen in a gradle build is below:
> {noformat}
> > Could not resolve org.apache.yetus:audience-annotations:0.4.0.
>      Required by: ...
>       > Could not resolve org.apache.yetus:audience-annotations:0.4.0.
>          > Could not parse POM https://repo1.maven.org/maven2/org/apache/yetus/audience-annotations/0.4.0/audience-annotations-0.4.0.pom
>             > Unable to resolve version for dependency 'jdk.tools:jdk.tools:jar'
> {noformat}
> This occurs because without any default version and no jdk profile activated jdk.tools
is an invalid dependency. Given that its optional, it could simply be ignored. However, gradle
has no way to force this even if setting the transitive = false property.
> This is easily fixed by adding a default dependency when no jdk profile is activated.




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message