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-897) Incorrect usage of Maven profile
Date Sun, 24 Nov 2019 13:40:00 GMT

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

Yetus QA commented on YETUS-897:
--------------------------------

| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  2m 43s{color} | {color:blue}
Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} dupname {color} | {color:green}  0m  0s{color} |
{color:green} No case conflicting files found. {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:orange}-0{color} | {color:orange} test4tests {color} | {color:orange}  0m  0s{color}
| {color:orange} The patch doesn't appear to include any new or modified tests. Please justify
why no new tests are needed for this patch. Also please list what manual steps were performed
to verify this patch. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 46s{color}
| {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m  9s{color} |
{color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 11s{color} |
{color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m  9s{color}
| {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m  8s{color} |
{color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m  8s{color} | {color:green}
the patch passed {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  1s{color} | {color:green}
The patch has no ill-formed XML file. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m  8s{color} |
{color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  0m  7s{color} | {color:green}
audience-annotations in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m  7s{color}
| {color:green} The patch does not generate ASF License warnings. {color} |
| {color:black}{color} | {color:black} {color} | {color:black}  5m 52s{color} | {color:black}
{color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/yetus-github-multibranch/job/PR-78/1/artifact/out/Dockerfile
|
| GITHUB PR | https://github.com/apache/yetus/pull/78 |
| JIRA Issue | YETUS-897 |
| Optional Tests | dupname asflicense javac javadoc unit xml compile |
| uname | Linux fa67c3c634a0 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018
x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | precommit/src/main/shell/personality/yetus.sh |
| git revision | master / bb1900a |
| Default Java | 1.8.0_222 |
|  Test Results | https://builds.apache.org/job/yetus-github-multibranch/job/PR-78/1/testReport/
|
| Max. process+thread count | 99 (vs. ulimit of 2000) |
| modules | C: audience-annotations-component/audience-annotations U: audience-annotations-component/audience-annotations
|
| Console output | https://builds.apache.org/job/yetus-github-multibranch/job/PR-78/1/console
|
| versions | git=2.7.4 maven=3.3.9 |
| Powered by | Apache Yetus 0.12.0-SNAPSHOT https://yetus.apache.org |


This message was automatically generated.



> Incorrect usage of Maven profile
> --------------------------------
>
>                 Key: YETUS-897
>                 URL: https://issues.apache.org/jira/browse/YETUS-897
>             Project: Yetus
>          Issue Type: Bug
>          Components: Audience Annotations
>            Reporter: Martin Todorov
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Hi,
> A transitive dependency of our Gradle project requires {{compile group: 'org.apache.yetus',
name: 'audience-annotations', version: '0.10.0'}}. It appears we may be hitting a [bug in
Gradle|https://github.com/gradle/gradle/issues/10058] in that it quite possibly doesn't handle
{{system}}-scoped and {{optional}} dependencies properly.
> I had a look at your project's {{pom.xml}} files and there are actually issues with
it as well.
> Consider the following snippet:
> {code:java}
>   <profiles>
>     <profile>
>       <id>jdk1.8</id>
>       <activation>
>         <jdk>(,1.8]</jdk>
>       </activation>
>       <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>
>     </profile>
>   </profiles>
>   <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}
> What's the point in both having the {{jdk.tools}} dependencies define in a profile and
then also in the main {{<dependencies/>}} section? If you move this dependency into
the profile and remove the one from the main {{<dependencies/>}} section, and make the
profile activated via a system property, or activate it through your {{settings.xml}} via
the {{activeProfile}} section, this should be okay.
> I agree that theoretically, this is bad Maven practice, because it breaks build portability,
but on the other hand, you're already breaking build portability by declaring a {{system}}-scoped
dependency.
> Is it really necessary to depend on the {{tools.jar}}? If you're using a JDK to build
the code, you should always have it on your classpath? What seems to be the issue that you're
trying to solve, (which I appear to be missing)?
> I haven't gone through all of your project's {{pom.xml}} files, but I suspect the same
fix might be required elsewhere as well.
> Please, advise!
> Many thanks in advance!
> Kind regards,
> Martin



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message