private DefaultVersionsHelper createHelper( String rulesUri, ArtifactMetadataSource metadataSource ) throws MojoExecutionException { final DefaultWagonManager wagonManager = new DefaultWagonManager() { public Wagon getWagon( Repository repository ) throws UnsupportedProtocolException, WagonConfigurationException { return new FileWagon(); } }; DefaultVersionsHelper helper = new DefaultVersionsHelper( new DefaultArtifactFactory(), new DefaultArtifactResolver(), metadataSource, new ArrayList(), new ArrayList(), new DefaultArtifactRepository( "", "", new DefaultRepositoryLayout() ), wagonManager, new Settings(), "", rulesUri, mock( Log.class ), mock( MavenSession.class ), new DefaultPathTranslator()); return helper; }
private VersionsHelper createHelper( String rulesUri, ArtifactMetadataSource metadataSource ) throws MojoExecutionException { final DefaultWagonManager wagonManager = new DefaultWagonManager() { public Wagon getWagon( Repository repository ) throws UnsupportedProtocolException, WagonConfigurationException { return new FileWagon(); } }; VersionsHelper helper = new DefaultVersionsHelper( new DefaultArtifactFactory(), new DefaultArtifactResolver(), metadataSource, new ArrayList(), new ArrayList(), new DefaultArtifactRepository( "", "", new DefaultRepositoryLayout() ), wagonManager, new Settings(), "", rulesUri, mock( Log.class ), mock( MavenSession.class ), new DefaultPathTranslator()); return helper; }
public NBPluginParameterExpressionEvaluator( MavenProject project, Settings settings, Map<? extends String,? extends String> systemProperties, Map<? extends String,? extends String> userProperties) { this.pathTranslator = new DefaultPathTranslator(); this.systemProperties = systemProperties; this.userProperties = userProperties; this.project = project; this.settings = settings; String bsdir = null; if ( project != null ) { File projectFile = project.getBasedir(); // this should always be the case for non-super POM instances... if ( projectFile != null ) { bsdir = projectFile.getAbsolutePath(); } } if ( bsdir == null ) { bsdir = System.getProperty( "user.dir" ); } this.basedir = bsdir; }
public static MavenModel interpolateAndAlignModel(MavenModel model, File basedir) throws RemoteException { Model result = MavenModelConverter.toNativeModel(model); result = doInterpolate(result, basedir); PathTranslator pathTranslator = new DefaultPathTranslator(); pathTranslator.alignToBaseDirectory(result, basedir); return MavenModelConverter.convertModel(result, null); }
public static MavenModel interpolateAndAlignModel(MavenModel model, File basedir) throws RemoteException { Model result = Maven2ModelConverter.toNativeModel(model); result = doInterpolate(result, basedir); PathTranslator pathTranslator = new DefaultPathTranslator(); pathTranslator.alignToBaseDirectory(result, basedir); return Maven2ModelConverter.convertModel(result, null); }
private void interpolateProject() throws InitializationException, Exception, ModelInterpolationException { StringSearchModelInterpolator interpolator = new StringSearchModelInterpolator(new DefaultPathTranslator()); interpolator.enableLogging(new PlexusLoggerAdapter(embedder.getLogger())); interpolator.initialize(); ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration(); config.setLocalRepository(getLocalRepository()); config.setGlobalProfileManager(getProfileManager()); interpolator.interpolate(project.getModel(), project.getBasedir(), config, logger.isDebugEnabled()); }
public CustomMaven3ModelInterpolator(DefaultPathTranslator pathTranslator) { super(pathTranslator); }
public CustomModelInterpolator(DefaultPathTranslator pathTranslator) { super(pathTranslator); }
public HibernateExpressionEvaluator( MavenSession session ) { super( session, new MojoExecution( new MojoDescriptor() ), new DefaultPathTranslator(), null, session.getCurrentProject(), session.getExecutionProperties() ); }