Dear Maven Developers,

first of all, thank you for your work on Maven!
Secondly, I apologize in advance in case this is not the appropriate
channel or I miss something.

I am using maven-embedder 3.9.6 and tweaked a copy of MavenCli to
access the MavenSession and retrieve runtime information from a Maven
plugin.

I am doing this because I need access to objects created inside the
plugin from a Java application through access to the MavenSession.

I experienced two issues while debugging and comparing with Maven
Invoker and the Maven command line.

Before adding issues I wanted to contact you and see if
a) MavenEmbedder is still under active development (I've seen this
asked the bug tracker before)?
b) A better way exists to achieve my goal? (Preferably without copying
and adjusting Maven code)
c) You are maybe already aware of the issues? (I didn't find them in
the bug tracker)

Depending on your reply I'd happily add an issue with all the
information I have.

Here are the issues I am facing:

1. When running "mvn clean package" through MavenCli on a multi-module
project, the call to "mavenProject.getCompileClasspathElements()" does
not return the jars,
but only the path to target/classes. When debugging the same with
Maven's Invoker the paths to jars are provided.

2. When running "mvn clean package" through MavenCli on (the fairly
large) Spring Cloud Data Flow project
(https://github.com/spring-cloud/spring-cloud-dataflow),
using tag:  “v2.10.2” it fails because it misses a class
'DataAccessException' which is required by a plugin. My naive
understanding of the error message makes me think
if a parent ClassLoader wasn't passed to ClassWorld? Here's the
relevant stacktrace:

15:54:10.385 [main] ERROR org.apache.maven.cli.MavenCli -- Failed to
execute goal 
org.springframework.cloud:spring-cloud-dataflow-apps-metadata-plugin:1.0.4:aggregate-metadata
(aggregate-metadata) on project
spring-cloud-dataflow-single-step-batch-job:
Execution aggregate-metadata of goal
org.springframework.cloud:spring-cloud-dataflow-apps-metadata-plugin:1.0.4:aggregate-metadata
failed:
A required class was missing while executing
org.springframework.cloud:spring-cloud-dataflow-apps-metadata-plugin:1.0.4:aggregate-metadata:
org/springframework/dao/DataAccessException


and further down:
import: Entry[import from realm ClassRealm[maven.api, parent: null]]
Does "parent: null" indicate a missing parent classlaoder for
ClassWorld resulting in the cnf?

Thank you in advance!

Best,
Fabian Krüger

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

Reply via email to