Package org.jboss.shrinkwrap.resolver.api.maven

Examples of org.jboss.shrinkwrap.resolver.api.maven.MavenWorkingSession


    @Test
    public void testSystemPropertyOverrideFromProfile() {

        System.setProperty("shrinkres-195-enable-me", "enabled");

        MavenWorkingSession session = ((MavenWorkingSessionContainer) Maven.configureResolver()
                .fromFile("target/settings/profiles/settings-property-override.xml")
                .loadPomFromFile("target/poms/test-profiles.xml")).getMavenWorkingSession();

        Properties props = session.getParsedPomFile().getProperties();

        Assert.assertThat(props.keySet(), hasItem("myproperty"));
        Assert.assertThat(props.getProperty("myproperty"), is("hello"));
    }
View Full Code Here


*/
public class CompilerPluginConfigurationTestCase {

    @Test
    public void additionalCompilerArgs() {
        MavenWorkingSession session = new MavenWorkingSessionImpl();
        LoadPomTask.loadPomFromFile("src/test/resources/poms/compiler-args.xml").execute(session);

        CompilerPluginConfiguration configuration = new CompilerPluginConfiguration(session.getParsedPomFile());
        CompilerConfiguration compilerConf = configuration.asCompilerConfiguration();
        compilerConf.setOutputLocation("target");
        String[] args = JavacCompiler.buildCompilerArguments(compilerConf, new String[0]);

        assertThat(Arrays.asList(args),
View Full Code Here

    }

    // SHRINKRES-164
    @Test
    public void compilerEncoding() {
        MavenWorkingSession session = new MavenWorkingSessionImpl();
        LoadPomTask.loadPomFromFile("src/test/resources/poms/source-encoding.xml").execute(session);

        CompilerPluginConfiguration configuration = new CompilerPluginConfiguration(session.getParsedPomFile());
        CompilerConfiguration compilerConf = configuration.asCompilerConfiguration();
        compilerConf.setOutputLocation("target");
        String[] args = JavacCompiler.buildCompilerArguments(compilerConf, new String[0]);

        assertThat(Arrays.asList(args),
View Full Code Here

    }

    // SHRINKRES-164
    @Test
    public void compilerEncodingFromProperty() {
        MavenWorkingSession session = new MavenWorkingSessionImpl();
        LoadPomTask.loadPomFromFile("src/test/resources/poms/source-encoding-property.xml").execute(session);

        CompilerPluginConfiguration configuration = new CompilerPluginConfiguration(session.getParsedPomFile());
        CompilerConfiguration compilerConf = configuration.asCompilerConfiguration();
        compilerConf.setOutputLocation("target");
        String[] args = JavacCompiler.buildCompilerArguments(compilerConf, new String[0]);

        assertThat(Arrays.asList(args),
View Full Code Here

*/
public class JarPluginConfigurationTestCase {

    @Test
    public void additionalCompilerArguments() {
        MavenWorkingSession session = new MavenWorkingSessionImpl();
        LoadPomTask.loadPomFromFile("src/test/resources/poms/jar-with-compiler-args.xml").execute(session);

        CompilerPluginConfiguration configuration = new CompilerPluginConfiguration(session.getParsedPomFile());
        CompilerConfiguration compilerConf = configuration.asCompilerConfiguration();
        compilerConf.setOutputLocation("target");
        String[] args = JavacCompiler.buildCompilerArguments(compilerConf, new String[0]);


View Full Code Here

     * @see org.jboss.shrinkwrap.resolver.api.maven.PomlessResolveStageBase#loadPomFromFile(java.io.File, java.lang.String[])
     */
    @Override
    public final EQUIPPEDRESOLVESTAGETYPE loadPomFromFile(final File pomFile, final String... profiles)
            throws IllegalArgumentException {
        final MavenWorkingSession session = this.getMavenWorkingSession();
        LoadPomTask.loadPomFromFile(pomFile, profiles).execute(session);
        return this.createNewPomEquippedResolveStage();
    }
View Full Code Here

     * java.lang.String[])
     */
    @Override
    public final EQUIPPEDRESOLVESTAGETYPE loadPomFromFile(final String pathToPomFile, final String... profiles)
            throws IllegalArgumentException {
        final MavenWorkingSession session = this.getMavenWorkingSession();
        LoadPomTask.loadPomFromFile(pathToPomFile, profiles).execute(session);
        return this.createNewPomEquippedResolveStage();
    }
View Full Code Here

     * @see org.jboss.shrinkwrap.resolver.api.maven.PomlessResolveStageBase#loadPomFromFile(java.io.File)
     */
    @Override
    public final EQUIPPEDRESOLVESTAGETYPE loadPomFromFile(final File pomFile) throws IllegalArgumentException,
            InvalidConfigurationFileException {
        final MavenWorkingSession session = this.getMavenWorkingSession();
        LoadPomTask.loadPomFromFile(pomFile).execute(session);
        return this.createNewPomEquippedResolveStage();
    }
View Full Code Here

     * @see org.jboss.shrinkwrap.resolver.api.maven.PomlessResolveStageBase#loadPomFromFile(java.lang.String)
     */
    @Override
    public final EQUIPPEDRESOLVESTAGETYPE loadPomFromFile(final String pathToPomFile) throws IllegalArgumentException,
            InvalidConfigurationFileException {
        final MavenWorkingSession session = this.getMavenWorkingSession();
        LoadPomTask.loadPomFromFile(pathToPomFile).execute(session);
        return this.createNewPomEquippedResolveStage();
    }
View Full Code Here

     * @see org.jboss.shrinkwrap.resolver.api.maven.PomlessResolveStageBase#loadPomFromClassLoaderResource(java.lang.String)
     */
    @Override
    public final EQUIPPEDRESOLVESTAGETYPE loadPomFromClassLoaderResource(final String pathToPomResource)
            throws IllegalArgumentException, InvalidConfigurationFileException {
        final MavenWorkingSession session = this.getMavenWorkingSession();
        LoadPomTask.loadPomFromClassLoaderResource(pathToPomResource).execute(session);
        return this.createNewPomEquippedResolveStage();
    }
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.resolver.api.maven.MavenWorkingSession

Copyright © 2018 www.massapicom. 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.