MavenProjectBuilder
Somewhere between 2.0 and 2.2, MavenProjectBuilder changed to build projects with property references in them. For example, .getBuild().getDirectory(): ${project.basedir}/target There are tests in archetype that are pretty confused by this. Can someone remind me of how to obtain an interpolated value for these items? - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: MavenProjectBuilder
To be exact, DefaultMavenProjectBuilder goes to extra trouble to end up with a 'dynamic' version of the Build, not the resolved version, and this test needs the resolved one. On Mon, Feb 2, 2015 at 12:19 PM, Benson Margulies bimargul...@gmail.com wrote: Somewhere between 2.0 and 2.2, MavenProjectBuilder changed to build projects with property references in them. For example, .getBuild().getDirectory(): ${project.basedir}/target There are tests in archetype that are pretty confused by this. Can someone remind me of how to obtain an interpolated value for these items? - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Need some help using MavenProjectBuilder/ModelBuilder
Hi I'm working on a stand-alone tool (not invoked via Maven) that currently reads POM files using the MavenXpp3Reader. Now there is a need to use interpolated models instead of the plain file content. So I started looking at MavenProjectBuilder in Maven 2.2.1 and ModelBuilder in Maven 3.0.4. After some experimenting I end up needing either Repositories (M2) or ModelResolvers (M3). Does anyone know of any examples of how to use any of these in a stand-alone tool? -- Dennis Lundberg - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Need some help using MavenProjectBuilder/ModelBuilder
On 13/02/2012, at 12:09 AM, Dennis Lundberg wrote: Hi I'm working on a stand-alone tool (not invoked via Maven) that currently reads POM files using the MavenXpp3Reader. Now there is a need to use interpolated models instead of the plain file content. So I started looking at MavenProjectBuilder in Maven 2.2.1 and ModelBuilder in Maven 3.0.4. After some experimenting I end up needing either Repositories (M2) or ModelResolvers (M3). Does anyone know of any examples of how to use any of these in a stand-alone tool? I would recommend using the M3 model builders, since that avoids hassles around the permanent memory consuming cache using in M2. But here are examples of both: M2: https://github.com/brettporter/centrepoint/blob/master/centrepoint/modules/maven-importer/src/main/java/com/effectivemaven/centrepoint/maven/repository/CentralRepositoryService.java M3: https://github.com/apache/archiva/blob/trunk/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java The tricky part is going to be getting the components instantiated, and depends on what other libraries you are using. - Brett -- Brett Porter br...@apache.org http://brettporter.wordpress.com/ http://au.linkedin.com/in/brettporter http://twitter.com/brettporter - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
RE: cvs commit: maven-components/maven-project/src/main/java/org/ apache/maven/project DefaultMavenProjectBuilder.java MavenProjectBuilder. java
Wouldn't it be better to set the default value of third parameter to false? I am not sure if we will need to have a method with 2 parameters but for compatibility with existing code imo false is better. Michal +public MavenProject build( File projectDescriptor, boolean useParentPom ) +throws ProjectBuildingException +{ +return build( project, useParentPom, true ); +} + public MavenProject build( File projectDescriptor, boolean useParentPom, boolean followTransitiveDeps ) throws ProjectBuildingException { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]