Examples of MavenJellyContext


Examples of org.apache.maven.jelly.MavenJellyContext

    }

    void runBodyTag( Session session )
        throws JellyTagException
    {
        MavenJellyContext context = (MavenJellyContext) getContext();

        getBody().run( context, context.getXMLOutput() );
    }
View Full Code Here

Examples of org.apache.maven.jelly.MavenJellyContext

        }

        public void performAction( Session session )
            throws Exception
        {
            MavenJellyContext oldContext = (MavenJellyContext) getContext();

            //GoalToJellyScriptHousingMapper mapper = ( GoalToJellyScriptHousingMapper ) session.getAttribute(
            //PluginManager.GOAL_MAPPER );
            //JellyScriptHousing housing = mapper.getPluginHousing( getName() );
            MavenJellyContext context = housing.getProject().getContext();

            setContext( context );

            runBodyTag( session );
View Full Code Here

Examples of org.apache.maven.jelly.MavenJellyContext

        try
        {
            // Lazy goal loading
            Session session = createSession();
            MavenJellyContext baseContext = (MavenJellyContext) session.getAttribute( PluginManager.BASE_CONTEXT );
            GoalToJellyScriptHousingMapper mapper = (GoalToJellyScriptHousingMapper) session
                .getAttribute( PluginManager.GOAL_MAPPER );
            PluginManager pluginManager = (PluginManager) session.getAttribute( PluginManager.PLUGIN_MANAGER );

            Set pluginSet;
View Full Code Here

Examples of org.apache.maven.jelly.MavenJellyContext

     * @throws JellyTagException If an error occurs while executing the tag.
     */
    public void invokeBody( XMLOutput output )
        throws JellyTagException
    {
        MavenJellyContext baseContext = (MavenJellyContext) createSession().getAttribute( PluginManager.BASE_CONTEXT );

        getBody().run( baseContext, output );
    }
View Full Code Here

Examples of org.apache.maven.jelly.MavenJellyContext

    private boolean getRemoteArtifact( Artifact artifact )
        throws ChecksumVerificationException
    {
        boolean artifactFound = false;

        MavenJellyContext context = getProject().getContext();

        ProxyInfo proxyInfo = null;
        if ( context.getProxyHost() != null )
        {
            proxyInfo = new ProxyInfo();
            proxyInfo.setHost( context.getProxyHost() );
            try
            {
                proxyInfo.setPort( Integer.valueOf( context.getProxyPort() ).intValue() );
            }
            catch ( NumberFormatException e )
            {
                log.warn( "Ignoring invalid proxy port: '" + context.getProxyPort() + "'" );
            }
            proxyInfo.setUserName( context.getProxyUserName() );
            proxyInfo.setPassword( context.getProxyPassword() );
            proxyInfo.setNonProxyHosts( (String) context.getVariable( MavenConstants.PROXY_NONPROXYHOSTS ) );
            proxyInfo.setNtlmHost( (String) context.getVariable( MavenConstants.PROXY_NTLM_HOST ) );
            proxyInfo.setNtlmDomain( (String) context.getVariable( MavenConstants.PROXY_NTLM_DOMAIN ) );
        }

        String meterType = (String) context.getVariable( MavenConstants.DOWNLOAD_METER );
        if ( meterType == null )
        {
            meterType = "console";
        }

        TransferListener listener = null;

        if ( "bootstrap".equals( meterType ) )
        {
            listener = new BootstrapDownloadMeter();
        }
        else if ( "console".equals( meterType ) )
        {
            listener = new ConsoleDownloadMeter();
        }

        int count = 0;

        for ( Iterator i = context.getMavenRepoRemote().iterator(); i.hasNext(); count++ )
        {
            String remoteRepo = (String) i.next();

            Repository repository = new Repository( "repo" + count, remoteRepo.trim() );
View Full Code Here

Examples of org.apache.maven.jelly.MavenJellyContext

        // We will assume here that there might not be a project.xml file present
        // and we will create the root context from the directory gleaned from
        // the user.dir system property.
        File basedir = new File( System.getProperty( "user.dir" ) );
        MavenJellyContext c = MavenUtils.createContext( basedir );
        setRootContext( c );
        c.setXMLOutput( output );

        // This is just a start at this mode - there'll still be some output
        if ( getCli().hasOption( QUIET ) )
        {
            // A little bit of log4j specifics needed here
View Full Code Here

Examples of org.apache.maven.jelly.MavenJellyContext

        checkAttribute( plugin, "plugin" );
        checkAttribute( property, "property" );
        Project project = getMavenContext().getProject();
        try
        {
            MavenJellyContext context = project.getPluginContext( plugin );
            if ( context != null )
            {
                context.setVariable( property, value );
            }
            else
            {
                log.error( "context for plugin '" + plugin + "' in project '" + project + "' is null" );
            }
View Full Code Here

Examples of org.apache.maven.jelly.MavenJellyContext

        checkAttribute( plugin, "plugin" );
        checkAttribute( property, "property" );
        Project project = getMavenContext().getProject();
        try
        {
            MavenJellyContext context = project.getPluginContext( plugin );
            if ( context != null )
            {
                Object value = context.getVariable( property );
                getContext().setVariable( var, value );
            }
            else
            {
                log.error( "context for plugin '" + plugin + "' in project '" + project + "' is null" );
View Full Code Here

Examples of org.apache.maven.jelly.MavenJellyContext

        checkAttribute( plugin, "plugin" );
        checkAttribute( property, "property" );
        Project project = getMavenContext().getProject();
        try
        {
            MavenJellyContext context = project.getPluginContext( plugin );
            if ( context != null )
            {
                Object value = context.getVariable( property );
                getContext().setVariable( var, value );
            }
            else
            {
                log.error( "context for plugin '" + plugin + "' in project '" + project + "' is null" );
View Full Code Here

Examples of org.apache.maven.jelly.MavenJellyContext

        // 1) need to fake out maven home, so that the unpacked plugin dir in the test
        //    directory
        fakeHome = basedir + SOURCE_BASE + "maven.home";
        System.setProperty( "maven.home", fakeHome );

        MavenJellyContext context = MavenUtils.createContext( new File( basedir ) );
        assertNotNull( context );

        // 2) need to fake out maven home local
        String fakeHomeLocal = basedir + FAKE_BASE + "maven.home.local";
        new File( fakeHomeLocal ).mkdirs();
        context.setVariable( MavenConstants.MAVEN_HOME_LOCAL, fakeHomeLocal );

        // 3) Need to fake out unpacked plugins dir so that the plugins are
        //    unpacked locally in the test directory
        String fakeUnpackedPlugins = basedir + FAKE_BASE + "maven.plugin.unpacked.dir";
        new File( fakeUnpackedPlugins ).mkdirs();
        context.setVariable( MavenConstants.MAVEN_UNPACKED_PLUGINS_DIR, fakeUnpackedPlugins );

        // fake forehead up - must be done before MavenSession creation
        FileInputStream fis = new FileInputStream( basedir + SOURCE_BASE + "forehead.conf" );
        Forehead.getInstance().config( fis );
        fis.close();
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.