On Sun, 09 Dec 2018 13:44:52 +0100, Andres Almiray
wrote:
Hi Laird,
Thanks, this all is very useful :-)
One more thing, if I needed to read the contents of a settings.xml file,
I
suppose there's a similar API that make this work?
Of course, better give you the complete overview :) :
ht
Hi Laird,
Thanks, this all is very useful :-)
One more thing, if I needed to read the contents of a settings.xml file, I
suppose there's a similar API that make this work?
Best,
Andres
---
Java Champion; Groovy Enthusiast
JCP EC Associate Seat
http://andr
On Sat, Dec 8, 2018 at 12:58 PM Oliver Drotbohm wrote:
>
> If it's about pure XML parsing and tweaking the information and building the
> model is not required, XmlBeam [0] is a lightweight alternative to map the
> entire file to a Java object. We use that in the Spring Data release
> automatio
I forgot to mention: if you want to do this all "by hand", i.e. not rely on
JSR 330 containers, you want to look here (
https://maven.apache.org/resolver/apidocs/index.html?org/eclipse/aether/impl/DefaultServiceLocator.html)
and work backwards.
Best,
Laird
--
https://about.me/lairdnelson
On Sat,
This is all near and dear to my heart.
First, some terminology clearing up: the Maven internals rely on a JSR-330
implementation (javax.inject.*), not CDI (javax.enterprise.inject.*). CDI
is a JSR-330 implementation, but so is Guice, HK2, etc. I believe that the
internals of Maven rely on Guice,
On Sat, 08 Dec 2018 21:52:16 +0100, Andres Almiray
wrote:
So far so good, I can parse POM files and read data. This works fine as
long as I don't have to access a parent POM.
@Robert: I suspect your first suggestion may be needed in order to
resolve
parent POM files as artifacts, isn't th
So far so good, I can parse POM files and read data. This works fine as
long as I don't have to access a parent POM.
@Robert: I suspect your first suggestion may be needed in order to resolve
parent POM files as artifacts, isn't that right?
Best,
Andres
--
Ah, you might be lucky with this solution :)
On Sat, 08 Dec 2018 19:20:59 +0100, Andres Almiray
wrote:
Looks like I found the answer to instantiating the ModelBuilder
new DefaultModelBuilderFactory().newInstance()
From the javadoc:
* A factory to create model builder instances when
Hi Andres,
this is what you need to do:
@Inject
private ModelBuilder builder;
(or with @Requiment when using only plexus annotations)
This means you need your code to run in a CDI container. If you use
Sisu[1] you can mix Plexus and JSR330 annotations.
Maven & JSR-330[2] Should explain mos
Looks like I found the answer to instantiating the ModelBuilder
new DefaultModelBuilderFactory().newInstance()
>From the javadoc:
* A factory to create model builder instances when no dependency injection
is available. Note: This class is
* only meant as a utility for developers that want
HI Oliver,
Nice! However that approach may require mapping all possible elements,
including plugins and more. The ModelBuilder should take care of that,
isn't it?
Cheers,
Andres
---
Java Champion; Groovy Enthusiast
JCP EC Associate Seat
http://andresalmira
If it's about pure XML parsing and tweaking the information and building the
model is not required, XmlBeam [0] is a lightweight alternative to map the
entire file to a Java object. We use that in the Spring Data release
automation. Declare an interface containing accessors backed by XPath
expr
Thank you Robert!
It looks like org.apache.maven.model.Model.DefaultModelBuilder provides the
behavior I need given this method found in its contract
ModelBuildingResult build( ModelBuildingRequest request )
throws ModelBuildingException;
ModelBuildingResult gives me access to the raw
The ModelBuilder[1] is what you are looking for, and yes it does a LOT :)
Be aware that it is using CDI, so to make use of it you'll need sisu/guice
too.
Robert
[1] https://maven.apache.org/ref/3.6.0/maven-model-builder/
On Sat, 08 Dec 2018 18:20:51 +0100, Andres Almiray
wrote:
Of cou
Of course.
This is definitely not a plugin project. My goal is to have an in-memory
representation of the POM as defined by a source pom.xml, to later
transform/enrich it and write it back.
As a side effect this tool can calculate statics on usage patterns and
recommend some others.
Best,
Andres
Il sab 8 dic 2018, 18:09 Andres Almiray ha scritto:
> Hello everyone,
>
> I have the need of building a model based on the data defined in a pom.xml
> file.
> What would be the best way to read, parse, and obtain such model using
> standard Maven APIs?
>
Could you given some more context?
I gue
Hello everyone,
I have the need of building a model based on the data defined in a pom.xml
file.
What would be the best way to read, parse, and obtain such model using
standard Maven APIs?
Best,
Andres
---
Java Champion; Groovy Enthusiast
JCP EC Associate
Hope this helps,
Dan
-Original Message-
From: Andrew Pennebaker [mailto:apenneba...@42six.com]
Sent: Tuesday, September 17, 2013 12:55 PM
To: Maven Issues
Subject: Maven parsing pom.xml incorrectly
I'm using Thrift in my Maven project, compiling my .thrift code to .java as
part of th
"==gen" with note at the start of the comment along the
> lines of "all instances of == within this comment must be changed to --
> when uncommenting".
>
> Hope this helps,
>
> Dan
>
> -Original Message-----
> From: Andrew Pennebaker [mailto:apen
Hi Andrew:
Unfortunately, that's in the XML spec, not Maven. '--' is not permitted
in comments. I'm not aware of any workaround, though I'd be interested
to hear one. Putting the line that contains the offending '--' does not
work.
Sorry,
Greg.
On Wed, 2013-09-18 at 04:59, Dennis Lundberg w
This mailing list is used only for automated responses from our issue tracker.
Please use us...@maven.apache.org instead.
On Tue, Sep 17, 2013 at 6:55 PM, Andrew Pennebaker
wrote:
> I'm using Thrift in my Maven project, compiling my .thrift code to .java as
> part of the generate-sources step. To
21 matches
Mail list logo