Examples of PathTranslator


Examples of io.apigee.trireme.core.internal.PathTranslator

        if (Platform.get().isWindows()) {
            System.out.println("Mount is currently not supported on Windows");
            return;
        }
        File realFile = new File("./target/test-classes/global/foo.txt");
        PathTranslator trans = new PathTranslator("./target/test-classes");
        trans.mount("/opt", new File("./target/test-classes/global"));
        File globalFile = trans.translate("/opt/foo.txt");
        assertTrue(globalFile.exists());
        assertEquals(trimPath(realFile.getCanonicalPath()),
                     trimPath(globalFile.getCanonicalPath()));
    }
View Full Code Here

Examples of io.apigee.trireme.core.internal.PathTranslator

        if (Platform.get().isWindows()) {
            System.out.println("Mount is currently not supported on Windows");
            return;
        }
        File realFile = new File("./target/test-classes/global/foo.txt");
        PathTranslator trans = new PathTranslator();
        trans.mount("/opt", new File("./target/test-classes/global"));
        File globalFile = trans.translate("/opt/foo.txt");
        assertTrue(globalFile.exists());
        assertEquals(realFile.getCanonicalPath(), globalFile.getCanonicalPath());
    }
View Full Code Here

Examples of io.apigee.trireme.core.internal.PathTranslator

    {
        if (Platform.get().isWindows()) {
            System.out.println("Mount is currently not supported on Windows");
            return;
        }
        PathTranslator trans = new PathTranslator();
        trans.mount("/opt", new File("./target/test-classes/global"));
        trans.mount("/usr/local/lib", new File("./target"));

        File realFile = new File("./target/test-classes/global/foo.txt");
        File globalFile = trans.translate("/opt/foo.txt");
        assertTrue(globalFile.exists());
        assertEquals(realFile.getCanonicalPath(), globalFile.getCanonicalPath());

        realFile = new File("./target/test-classes/logback.xml");
        globalFile = trans.translate("/usr/local/lib/test-classes/logback.xml");
        assertTrue(globalFile.exists());
        assertEquals(realFile.getCanonicalPath(), globalFile.getCanonicalPath());
    }
View Full Code Here

Examples of org.apache.maven.model.path.PathTranslator

    }

    protected ModelInterpolator newModelInterpolator()
    {
        UrlNormalizer urlNormalizer = newUrlNormalizer();
        PathTranslator pathTranslator = newPathTranslator();
        return new StringSearchModelInterpolator().setPathTranslator( pathTranslator ).setUrlNormalizer( urlNormalizer );
    }
View Full Code Here

Examples of org.apache.maven.model.path.PathTranslator

    }

    protected ModelInterpolator newModelInterpolator()
    {
        UrlNormalizer normalizer = newUrlNormalizer();
        PathTranslator pathTranslator = newPathTranslator();
        return new StringSearchModelInterpolator().setPathTranslator( pathTranslator ).setUrlNormalizer( normalizer );
    }
View Full Code Here

Examples of org.apache.maven.project.path.PathTranslator

        model.setBuild( build );
       
        build.setDirectory( "${project.basedir}/target" );
        build.setOutputDirectory( "${project.build.directory}/classes" );
       
        PathTranslator translator = new DefaultPathTranslator();
        ModelInterpolator interpolator = createInterpolator( translator );
       
        File basedir = new File( System.getProperty( "java.io.tmpdir" ), "base" );
       
        String value = interpolator.interpolate( "${project.build.outputDirectory}/foo", model, basedir, new DefaultProjectBuilderConfiguration(), true );
View Full Code Here

Examples of org.apache.maven.project.path.PathTranslator

            artifact.getClassifier();
            artifactCtl.setReturnValue( null, MockControl.ZERO_OR_MORE );

            pathTranslatorCtl = MockControl.createControl( PathTranslator.class );
            PathTranslator pt = (PathTranslator) pathTranslatorCtl.getMock();

            Model model = new Model();

            Build build = new Build();
            build.setDirectory( "target" );
View Full Code Here

Examples of org.apache.maven.project.path.PathTranslator

        model.setBuild( build );
       
        build.setDirectory( "${project.basedir}/target" );
        build.setOutputDirectory( "${project.build.directory}/classes" );
       
        PathTranslator translator = new DefaultPathTranslator();
        ModelInterpolator interpolator = createInterpolator( translator );
       
        File basedir = new File( System.getProperty( "java.io.tmpdir" ), "base" );
       
        String value = interpolator.interpolate( "${project.build.outputDirectory}/foo", model, basedir, new DefaultProjectBuilderConfiguration(), true );
View Full Code Here

Examples of org.apache.maven.project.path.PathTranslator

            artifact.getClassifier();
            artifactCtl.setReturnValue( null, MockControl.ZERO_OR_MORE );

            pathTranslatorCtl = MockControl.createControl( PathTranslator.class );
            PathTranslator pt = (PathTranslator) pathTranslatorCtl.getMock();

            Model model = new Model();

            Build build = new Build();
            build.setDirectory( "target" );
View Full Code Here

Examples of org.apache.maven.project.path.PathTranslator

            artifact.getClassifier();
            artifactCtl.setReturnValue( null, MockControl.ZERO_OR_MORE );

            pathTranslatorCtl = MockControl.createControl( PathTranslator.class );
            PathTranslator pt = (PathTranslator) pathTranslatorCtl.getMock();

            Model model = new Model();

            Build build = new Build();
            build.setDirectory( "target" );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.