Package org.apache.maven.toolchain

Examples of org.apache.maven.toolchain.Toolchain


   
    private String getJavah() throws MojoExecutionException, MojoFailureException {
        String javah = null;

        // try toolchain
        Toolchain toolchain = getToolchain();
        if (toolchain != null) {
            javah = toolchain.findTool( "javah" );
        }

        // try java home
        if (javah == null) {
            File javahFile = new File( mojo.getJavaHome( mojo.getAOL() ), "bin" );
View Full Code Here


   
    //TODO remove the part with ToolchainManager lookup once we depend on
    //2.0.9 (have it as prerequisite). Define as regular component field then.
    private Toolchain getToolchain()
    {
        Toolchain toolChain = null;
        ToolchainManager toolchainManager = ((NarJavahMojo)mojo).getToolchainManager();
       
        if ( toolchainManager != null )
        {
            toolChain = toolchainManager.getToolchainFromBuildContext( "jdk", ((NarJavahMojo)mojo).getSession() );
View Full Code Here

            getLog().debug( "  " + classpathElement );

            surefireBooter.addClassPathUrl( classpathElement );
        }

        Toolchain tc = getToolchain();

        if ( tc != null )
        {
            getLog().info( "Toolchain in surefire-plugin: " + tc );
            if ( ForkConfiguration.FORK_NEVER.equals( forkMode ) )
            {
                forkMode = ForkConfiguration.FORK_ONCE;
            }
            if ( jvm != null )
            {
                getLog().warn( "Toolchains are ignored, 'executable' parameter is set to " + jvm );
            }
            else
            {
                jvm = tc.findTool( "java" ); // NOI18N
            }
        }

        if ( additionalClasspathElements != null )
        {
View Full Code Here

    // TODO remove the part with ToolchainManager lookup once we depend on
    // 3.0.9 (have it as prerequisite). Define as regular component field then.
    private Toolchain getToolchain()
    {
        Toolchain tc = null;
        try
        {
            if ( session != null ) // session is null in tests..
            {
                ToolchainManager toolchainManager =
View Full Code Here

    }


    final Toolchain getToolchain()
    {
        Toolchain tc = null;

        if ( getToolchainManager() != null )
        {
            tc = getToolchainManager().getToolchainFromBuildContext( "jdk", getSession() );
        }
View Full Code Here

        return file.getPath().replace("\\", "\\\\");
    }

    private String getJavaExecutable() throws MojoExecutionException {

        Toolchain tc = toolchainManager.getToolchainFromBuildContext("jdk", //NOI18N
                                                                     session);
        if (tc != null) {
            getLog().info("Toolchain in clojure-maven-plugin: " + tc);
            String foundExecutable = tc.findTool("java");
            if (foundExecutable != null) {
                return foundExecutable;
            } else {
                throw new MojoExecutionException("Unable to find 'java' executable for toolchain: " + tc);
            }
View Full Code Here

            exec = execFile.getAbsolutePath();
        }
       
        if ( exec == null )
        {
            Toolchain tc = getToolchain();

            // if the file doesn't exist & toolchain is null, the exec is probably in the PATH...
            // we should probably also test for isFile and canExecute, but the second one is only
            // available in SDK 6.
            if ( tc != null )
            {
                getLog().info( "Toolchain in exec-maven-plugin: " + tc );
                exec = tc.findTool( executable );
            }
            else
            {
                if ( OS.isFamilyWindows() )
                {
View Full Code Here

        this.backgroundPollingTimeout = (backgroundPollingTimeout > 0) ? backgroundPollingTimeout : Integer.MAX_VALUE;
    }

    private Toolchain getToolchain()
    {
        Toolchain tc = null;

        try
        {
            if ( session != null ) // session is null in tests..
            {
View Full Code Here

    }


    final Toolchain getToolchain()
    {
        Toolchain tc = null;

        if ( getToolchainManager() != null )
        {
            tc = getToolchainManager().getToolchainFromBuildContext( "jdk", getSession() );
        }
View Full Code Here

    protected String mainClass;

    @Override
    protected void doExecute() throws Exception {
        JavaMainCaller jcmd = null;
        Toolchain toolchain = toolchainManager.getToolchainFromBuildContext("jdk", session);
        if (StringUtils.isNotEmpty(mainClass)) {
            jcmd = new JavaMainCallerByFork(this, mainClass, MainHelper.toMultiPath(project.getTestClasspathElements()), jvmArgs, args, forceUseArgFile, toolchain);
        } else if ((launchers != null) && (launchers.length > 0)) {
            if (StringUtils.isNotEmpty(launcher)) {
                for(int i = 0; (i < launchers.length) && (jcmd == null); i++) {
View Full Code Here

TOP

Related Classes of org.apache.maven.toolchain.Toolchain

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.