Displaying #maven-dev/2017-05-02.log:

Tue May 2 09:57:28 2017  aheritier:Joined the channel
Tue May 2 10:41:58 2017  olamy:Joined the channel
Tue May 2 10:55:09 2017  stephenc:Joined the channel
Tue May 2 14:50:19 2017  aheritier:Joined the channel
Tue May 2 18:25:59 2017  rfscholte:Joined the channel
Tue May 2 19:24:09 2017  Michael-O:Joined the channel
Tue May 2 19:24:55 2017  Michael-O:rfscholte, are you there?
Tue May 2 19:25:21 2017  rfscholte:yep
Tue May 2 19:31:24 2017  Michael-O:Joined the channel
Tue May 2 19:37:21 2017  rfscholte:Michael-O: ?
Tue May 2 19:39:12 2017  Michael-O:Do you have an opinion on this proposal: https://issues.apache.org/jira/browse/MSHARED-437?focusedCommentId=15974769&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15974769?
Tue May 2 19:43:22 2017  rfscholte:of course, I should ;)
Tue May 2 19:43:40 2017  rfscholte:let me try to verify those ITs first
Tue May 2 19:44:00 2017  Michael-O:I cannot really judge wether ResitoryUtils is a better way. I don't want to make a blind change.
Tue May 2 19:44:05 2017  Michael-O:Thank you!
Tue May 2 19:47:05 2017  Michael-O:I will try to update locally and see wether MDEP ITs run properly
Tue May 2 19:48:07 2017  rfscholte:I'm getting a build success on that github repo project...
Tue May 2 19:49:19 2017  Michael-O:Seriously?
Tue May 2 19:49:21 2017  Michael-O:I had a failure
Tue May 2 19:51:20 2017  Michael-O:I'll rerun
Tue May 2 19:56:55 2017  Michael-O:rfscholte, did you checkout branch demonstrate-tree-bug?
Tue May 2 19:57:10 2017  rfscholte:no
Tue May 2 19:57:27 2017  rfscholte:develop branch
Tue May 2 19:57:37 2017  rfscholte:I'll switch
Tue May 2 19:57:48 2017  Michael-O:INFO] -------------------------------------------------
Tue May 2 19:57:49 2017  Michael-O:[INFO] Build Summary:
Tue May 2 19:57:49 2017  Michael-O:[INFO] Passed: 7, Failed: 4, Errors: 0, Skipped: 0
Tue May 2 19:57:49 2017  Michael-O:[INFO] -------------------------------------------------
Tue May 2 19:57:49 2017  Michael-O:[ERROR] The following builds failed:
Tue May 2 19:57:49 2017  Michael-O:[ERROR] * buck-bom-managed-optional-transitive-dependencies\pom.xml
Tue May 2 19:57:51 2017  Michael-O:[ERROR] * buck-managed-optional-transitive-dependencies\pom.xml
Tue May 2 19:57:53 2017  Michael-O:[ERROR] * buck-optional-single-dependency\pom.xml
Tue May 2 19:57:57 2017  Michael-O:[ERROR] * buck-optional-transitive-dependencies\pom.xml
Tue May 2 19:57:59 2017  Michael-O:[INFO] -------------------------------------------------
Tue May 2 19:59:01 2017  rfscholte:yes, now I have the same result
Tue May 2 19:59:18 2017  Michael-O:OK, great
Tue May 2 20:08:23 2017  rfscholte:I don't understand the last line of Arlo's comment. we ARE using RepositoryUtils.toArtifact(Dependency)
Tue May 2 20:08:38 2017  Michael-O:I just added "mavenArtifact.setOptional( dep.isOptional() );" and have two failures less
Tue May 2 20:09:11 2017  Michael-O:Not in: Maven3DependencyGraphBuilder
Tue May 2 20:09:18 2017  Michael-O:only in 31
Tue May 2 20:10:24 2017  Michael-O:I have applied this one locally:
Tue May 2 20:10:25 2017  Michael-O:Index: src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven31DependencyGraphBuilder.java
Tue May 2 20:10:25 2017  Michael-O:===================================================================
Tue May 2 20:10:25 2017  Michael-O:--- src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven31DependencyGraphBuilder.java (revision 1791413)
Tue May 2 20:10:26 2017  Michael-O:+++ src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven31DependencyGraphBuilder.java (working copy)
Tue May 2 20:10:29 2017  Michael-O:@@ -92,7 +92,7 @@
Tue May 2 20:10:31 2017  Michael-O: throws DependencyGraphBuilderException
Tue May 2 20:10:33 2017  Michael-O: {
Tue May 2 20:10:35 2017  Michael-O: MavenProject project = buildingRequest.getProject();
Tue May 2 20:10:37 2017  Michael-O:-
Tue May 2 20:10:39 2017  Michael-O:+
Tue May 2 20:10:41 2017  Michael-O: RepositorySystemSession session =
Tue May 2 20:10:43 2017  Michael-O: (RepositorySystemSession) Invoker.invoke( buildingRequest, "getRepositorySession" );
Tue May 2 20:10:45 2017  Michael-O:@@ -184,14 +184,15 @@
Tue May 2 20:10:47 2017  Michael-O: private Artifact getDependencyArtifact( Dependency dep )
Tue May 2 20:10:49 2017  Michael-O: {
Tue May 2 20:10:51 2017  Michael-O: org.eclipse.aether.artifact.Artifact artifact = dep.getArtifact();
Tue May 2 20:10:53 2017  Michael-O:-
Tue May 2 20:10:57 2017  Michael-O:+
Tue May 2 20:10:59 2017  Michael-O: try
Tue May 2 20:11:01 2017  Michael-O: {
Tue May 2 20:11:03 2017  Michael-O: Artifact mavenArtifact = (Artifact) Invoker.invoke( RepositoryUtils.class, "toArtifact",
Tue May 2 20:11:05 2017  Michael-O: org.eclipse.aether.artifact.Artifact.class, artifact );
Tue May 2 20:11:07 2017  Michael-O:-
Tue May 2 20:11:09 2017  Michael-O:+
Tue May 2 20:11:11 2017  Michael-O: mavenArtifact.setScope( dep.getScope() );
Tue May 2 20:11:13 2017  Michael-O:-
Tue May 2 20:11:15 2017  Michael-O:+ mavenArtifact.setOptional( dep.isOptional() );
Tue May 2 20:11:17 2017  Michael-O:+
Tue May 2 20:11:19 2017  Michael-O: return mavenArtifact;
Tue May 2 20:11:21 2017  Michael-O: }
Tue May 2 20:11:23 2017  Michael-O: catch ( DependencyGraphBuilderException e )
Tue May 2 20:11:27 2017  Michael-O:Index: src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven3DependencyGraphBuilder.java
Tue May 2 20:11:29 2017  Michael-O:===================================================================
Tue May 2 20:11:31 2017  Michael-O:--- src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven3DependencyGraphBuilder.java (revision 1791413)
Tue May 2 20:11:34 2017  Michael-O:+++ src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven3DependencyGraphBuilder.java (working copy)
Tue May 2 20:11:37 2017  Michael-O:@@ -171,10 +171,11 @@
Tue May 2 20:11:39 2017  Michael-O: private Artifact getDependencyArtifact( Dependency dep )
Tue May 2 20:11:41 2017  Michael-O: {
Tue May 2 20:11:43 2017  Michael-O: Artifact mavenArtifact = RepositoryUtils.toArtifact( dep.getArtifact() );
Tue May 2 20:11:45 2017  Michael-O:-
Tue May 2 20:11:47 2017  Michael-O:+
Tue May 2 20:11:49 2017  Michael-O: mavenArtifact.setScope( dep.getScope() );
Tue May 2 20:11:51 2017  Michael-O:-
Tue May 2 20:11:53 2017  Michael-O:- return mavenArtifact;
Tue May 2 20:11:57 2017  Michael-O:+ mavenArtifact.setOptional( dep.isOptional() );
Tue May 2 20:11:59 2017  Michael-O:+
Tue May 2 20:12:01 2017  Michael-O:+ return mavenArtifact;
Tue May 2 20:12:03 2017  Michael-O: }
Tue May 2 20:12:05 2017  Michael-O: private DependencyNode buildDependencyNode( DependencyNode parent, org.sonatype.aether.graph.DependencyNode node,
Tue May 2 20:13:34 2017  rfscholte:I should extend http://maven.apache.org/shared/maven-artifact-transfer/comparison.html with scopes and optional
Tue May 2 20:13:58 2017  rfscholte:IMHO these are dependency specific, not artifact specific
Tue May 2 20:14:31 2017  rfscholte:but I think for now your fix is okay
Tue May 2 20:17:02 2017  Michael-O:It does not fully fix the issue
Tue May 2 20:18:00 2017  Michael-O:Is this a shortcomming in our code or just a misuse of the API?
Tue May 2 20:18:06 2017  Michael-O:library*?
Tue May 2 20:18:52 2017  rfscholte:The Artifact interface also contains Dependency-code
Tue May 2 20:19:10 2017  rfscholte:If there is one interface hard to change, it's Artifact
Tue May 2 20:19:26 2017  Michael-O:This doesn't make sense judging by your table, right?
Tue May 2 20:20:19 2017  rfscholte:private Artifact getDependencyArtifact( Dependency dep )
Tue May 2 20:20:42 2017  rfscholte:this method should transform from Aether Dependency to Maven Dependency
Tue May 2 20:21:21 2017  Michael-O:Btw, MDEP ITs do all pass
Tue May 2 20:21:37 2017  Michael-O:Has Aether the notion of optional?
Tue May 2 20:21:57 2017  rfscholte:yes
Tue May 2 20:23:56 2017  rfscholte:if MDEP ITs pass, then this case wasn't covered
Tue May 2 20:26:50 2017  Michael-O:Should this be a MDEP IT or MSHARED IT?
Tue May 2 20:27:12 2017  rfscholte:good point
Tue May 2 20:27:44 2017  rfscholte:Let's stay close to the source, so MSHARED
Tue May 2 20:28:01 2017  Michael-O:here is the dep:tree output:
Tue May 2 20:28:02 2017  Michael-O:[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ buck-bom-managed-optional-transitive-dependencies ---
Tue May 2 20:28:02 2017  Michael-O:[INFO] de.evosec:buck-bom-managed-optional-transitive-dependencies:jar:1.0.0-SNAPSHOT
Tue May 2 20:28:02 2017  Michael-O:[INFO] \- com.mysema.querydsl:querydsl-core:jar:3.4.3:compile
Tue May 2 20:28:02 2017  Michael-O:[INFO] +- com.google.guava:guava:jar:17.0:compile
Tue May 2 20:28:03 2017  Michael-O:[INFO] +- com.google.code.findbugs:jsr305:jar:2.0.3:compile
Tue May 2 20:28:05 2017  Michael-O:[INFO] +- com.mysema.commons:mysema-commons-lang:jar:0.2.4:compile
Tue May 2 20:28:07 2017  Michael-O:[INFO] \- com.infradna.tool:bridge-method-annotation:jar:1.13:compile
Tue May 2 20:28:11 2017  Michael-O:optional is gone here
Tue May 2 20:28:22 2017  Michael-O:either toString is wrong or it really does not work
Tue May 2 20:29:37 2017  rfscholte:Artifact.toString?
Tue May 2 20:29:43 2017  Michael-O:This is MDEP 2.8
Tue May 2 20:29:46 2017  Michael-O:here is trunk:
Tue May 2 20:29:46 2017  Michael-O:aultDependencyCollector.transformTime=0}
Tue May 2 20:29:47 2017  Michael-O:[DEBUG] de.evosec:buck-bom-managed-optional-transitive-dependencies:jar:1.0.0-SNAPSHOT
Tue May 2 20:29:47 2017  Michael-O:[DEBUG] com.mysema.querydsl:querydsl-core:jar:3.4.3:compile
Tue May 2 20:29:47 2017  Michael-O:[DEBUG] com.google.guava:guava:jar:17.0:compile (version managed from 14.0) (optionality managed from false)
Tue May 2 20:29:48 2017  Michael-O:[DEBUG] com.google.code.findbugs:jsr305:jar:2.0.3:compile (version managed from 1.3.9) (optionality managed from false)
Tue May 2 20:29:51 2017  Michael-O:[DEBUG] com.mysema.commons:mysema-commons-lang:jar:0.2.4:compile
Tue May 2 20:29:53 2017  Michael-O:[DEBUG] com.infradna.tool:bridge-method-annotation:jar:1.13:compile
Tue May 2 20:29:57 2017  Michael-O:[INFO] de.evosec:buck-bom-managed-optional-transitive-dependencies:jar:1.0.0-SNAPSHOT
Tue May 2 20:29:59 2017  Michael-O:[INFO] \- com.mysema.querydsl:querydsl-core:jar:3.4.3:compile (optional)
Tue May 2 20:30:01 2017  Michael-O:[INFO] +- com.google.guava:guava:jar:17.0:compile
Tue May 2 20:30:03 2017  Michael-O:[INFO] +- com.google.code.findbugs:jsr305:jar:2.0.3:compile
Tue May 2 20:30:05 2017  Michael-O:[INFO] +- com.mysema.commons:mysema-commons-lang:jar:0.2.4:compile (optional)
Tue May 2 20:30:07 2017  Michael-O:[INFO] \- com.infradna.tool:bridge-method-annotation:jar:1.13:compile (optional)
Tue May 2 20:30:09 2017  Michael-O:[INFO] ------------------------------------------------------------------------
Tue May 2 20:30:52 2017  Michael-O:As you can see, the tree itself looks fine: (optionality managed from false)
Tue May 2 20:31:07 2017  rfscholte:org.apache.maven.shared.dependency.graph.internal.DefaultDependencyNode.toNodeString()
Tue May 2 20:32:59 2017  rfscholte:AFAIK optional is not managed, not sure where that is coming from
Tue May 2 20:38:50 2017  Michael-O:I am looking at this right now: https://repo1.maven.org/maven2/com/mysema/querydsl/querydsl-core/3.4.3/querydsl-core-3.4.3.pom
Tue May 2 20:48:04 2017  Michael-O:rfscholte, I just checked the effective POM. I think we have two issues here: unprecise documentation of optional (https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html) and confusing/contradicting output from debug and dependency tree
Tue May 2 20:48:30 2017  Michael-O:Since guava and JSR305 are imported from the Spring POM, the management wins and kills the optional flag
Tue May 2 20:48:42 2017  Michael-O:I do not know wether this is intented
Tue May 2 20:48:47 2017  Michael-O:intended*
Tue May 2 20:52:18 2017  rfscholte:https://issues.apache.org/jira/browse/MNG-5227 ?
Tue May 2 20:52:48 2017  rfscholte:https://issues.apache.org/jira/browse/MNG-5935
Tue May 2 20:54:20 2017  Michael-O:LEt me have a look
Tue May 2 20:54:21 2017  rfscholte:For direct managed dependencies I don't like optional, but for transitive it should be respected
Tue May 2 20:55:49 2017  Michael-O:It looks the the latter. It is pretty much the case Arlo has.
Tue May 2 20:57:34 2017  rfscholte:MNG-5935 is a candidate for 3.5.1 for me, requires to be seconded first
Tue May 2 21:00:07 2017  Michael-O:I am confused by the fix: https://github.com/ChristianSchulte/maven/commit/3494c28426b8dd5711b730d622ba98d603caeda6#diff-3ceb8295d112c768889a4d34eee1c32d
Tue May 2 21:00:28 2017  Michael-O:It is a small change, but does this really help....?
Tue May 2 21:01:08 2017  rfscholte:and no test...
Tue May 2 21:02:01 2017  rfscholte:I know there's a difference for optional between Sonatype and Eclipse. first return primitive boolean, latter object Boolean
Tue May 2 21:02:14 2017  Michael-O:damn boolean primitive and object
Tue May 2 21:02:17 2017  Michael-O:this is really stupid
Tue May 2 21:02:25 2017  Michael-O:we should not have three states for boolean
Tue May 2 21:03:43 2017  rfscholte:well, in this case I prefer three states because you can discover if its value was there by default of set/managed
Tue May 2 21:04:39 2017  rfscholte:*or
Tue May 2 21:05:29 2017  Michael-O:but it should lead to such issues and where is the difference for you between null and false?
Tue May 2 21:05:33 2017  Michael-O:It there any?
Tue May 2 21:05:38 2017  Michael-O:Doesn't null imply false?
Tue May 2 21:07:13 2017  rfscholte:right, AFAIK it should result in false.
Tue May 2 21:08:05 2017  rfscholte:but for auditing/analyzing it's good to know where that value is coming from
Tue May 2 21:10:12 2017  Michael-O:#getOptional is used only once throughout resolver
Tue May 2 21:10:29 2017  Michael-O:#isOptional() prevails
Tue May 2 21:11:32 2017  Michael-O:...well I still don't get Christian's patch...
Tue May 2 21:12:33 2017  Michael-O:Why doesn't he simply call "dependency.getOptional()"
Tue May 2 21:37:15 2017  rfscholte:I agree
Tue May 2 21:37:59 2017  rfscholte:for me it's enough for today

Comments