Package hudson

Examples of hudson.AbortException


        {
            File home = new File(mavenHome);
            if(!home.isDirectory())
            {
                if (home.exists())
                    throw new AbortException(Messages.MavenVersionCallable_MavenHomeIsNotDirectory(home));
                else
                    throw new AbortException(Messages.MavenVersionCallable_MavenHomeDoesntExist(home));
            }
            return MavenEmbedderUtils.getMavenVersion(home);
        }
        catch ( MavenEmbedderException e )
        {
View Full Code Here


            } catch (SocketTimeoutException e) {
                // failed to connect. Is the process dead?
                // if so, the error should have been provided by the launcher already.
                // so abort gracefully without a stack trace.
                if(!proc.isAlive())
                    throw new AbortException("Failed to launch Maven. Exit code = "+proc.join());
                throw e;
            }

            return new NewProcess(
                Channels.forProcess("Channel to Maven "+ Arrays.toString(cmds),
View Full Code Here

        // needs to run Maven it will pick the correct one.
        // This can happen if maven calls ANT which itself calls Maven
        // or if Maven calls itself e.g. maven-release-plugin
        MavenInstallation mvn = project.getMaven();
        if (mvn == null)
            throw new AbortException(Messages.MavenModuleSetBuild_NoMavenConfigured());

       
        mvn = mvn.forEnvironment(envs);
       
        Computer computer = Computer.currentComputer();
View Full Code Here

            try {
             
                EnvVars envVars = getEnvironment(listener);
                MavenInstallation mvn = project.getMaven();
                if(mvn==null)
                    throw new AbortException(Messages.MavenModuleSetBuild_NoMavenConfigured());

                mvn = mvn.forEnvironment(envVars).forNode(Computer.currentComputer().getNode(), listener);
               
                MavenInformation mavenInformation = getModuleRoot().act( new MavenVersionCallable( mvn.getHome() ));
               
View Full Code Here

                // Maven failed to parse POM
                e.getCause().printStackTrace(listener.error(Messages.MavenModuleSetBuild_FailedToParsePom()));
                if (project.isIncrementalBuild()) {
                    getActions().add(new NeedsFullBuildAction());
                }
                throw new AbortException();
            }
           
            boolean needsDependencyGraphRecalculation = false;

            // update the module list
View Full Code Here

                if(!pom.exists() && parentLoc.exists())
                    pom = parentLoc;
            }

            if(!pom.exists())
                throw new AbortException(Messages.MavenModuleSetBuild_NoSuchPOMFile(pom));

            if (rootPOM.startsWith("../") || rootPOM.startsWith("..\\")) {
                File wsp = new File(workspaceProper);
                              
                if (!ws.equals(wsp)) {
                    rootPOMRelPrefix = ws.getCanonicalPath().substring(wsp.getCanonicalPath().length()+1)+"/";
                } else {
                    rootPOMRelPrefix = wsp.getName() + "/";
                }
            } else {
                rootPOMRelPrefix = "";
            }           
           
            if(verbose)
                logger.println("Parsing "
             + (nonRecursive ? "non-recursively " : "recursively ")
             + pom);
     
            File settingsLoc;

            if (alternateSettings == null) {
                settingsLoc = null;
            } else if (IOUtils.isAbsolute(alternateSettings)) {
                settingsLoc = new File(alternateSettings);
            } else {
                // Check for settings.xml first in the workspace proper, and then in the current directory,
                // which is getModuleRoot().
                // This is backwards from the order the root POM logic uses, but it's to be consistent with the Maven execution logic.
                settingsLoc = new File(workspaceProper, alternateSettings);
                File mrSettingsLoc = new File(workspaceProper, alternateSettings);
                if (!settingsLoc.exists() && mrSettingsLoc.exists())
                    settingsLoc = mrSettingsLoc;
            }
            if (debug)
            {
                logger.println(Messages.MavenModuleSetBuild_SettinsgXmlAndPrivateRepository(settingsLoc,privateRepository));
            }
            if ((settingsLoc != null) && (!settingsLoc.exists())) {
                throw new AbortException(Messages.MavenModuleSetBuild_NoSuchAlternateSettings(settingsLoc.getAbsolutePath()));
            }

            try {
                MavenEmbedderRequest mavenEmbedderRequest = new MavenEmbedderRequest( listener, mavenHome.getHomeDir(),
                                                                                      profiles, properties,
View Full Code Here

       
        // make sure ~/.m2 exists to avoid http://www.nabble.com/BUG-Report-tf3401736.html
        File m2Home = new File(MavenEmbedder.userHome, ".m2");
        m2Home.mkdirs();
        if(!m2Home.exists())
            throw new AbortException("Failed to create "+m2Home);

        if (mavenEmbedderRequest.getPrivateRepository()!=null)
            mavenRequest.setLocalRepositoryPath( mavenEmbedderRequest.getPrivateRepository() );

        if (mavenEmbedderRequest.getProfiles() != null) {
View Full Code Here

                    File moduleFile = new File( basedir, modulePath );
                    if ( moduleFile.exists() && moduleFile.isDirectory() ) {
                        moduleFile = new File( basedir, modulePath + "/pom.xml" );
                    }
                    if ( !moduleFile.exists() )
                        throw new AbortException( moduleFile + " is referenced from " + project.getFile()
                            + " but it doesn't exist" );

                    String relativePath = rel;
                    if ( relativePath.length() > 0 )
                        relativePath += '/';
View Full Code Here

     *      All the other exceptions cause the stack trace to be dumped, and then
     *      the command exits with an error code.
     * @since 1.334
     */
    public ParameterValue createValue(CLICommand command, String value) throws IOException, InterruptedException {
        throw new AbortException("CLI parameter submission is not supported for the "+getClass()+" type. Please file a bug report for this");
    }
View Full Code Here

      TestResult result = parse(testResults, build, launcher, listener);

      try {
        action = new TestResultAction(build, result, listener);
      } catch (NullPointerException npe) {
        throw new AbortException(Messages.JUnitResultArchiver_BadXML(testResults));
      }
            result.freeze(action);
      if (result.getPassCount() == 0 && result.getFailCount() == 0)
        throw new AbortException(Messages.JUnitResultArchiver_ResultIsEmpty());

            // TODO: Move into JUnitParser [BUG 3123310]
      List<Data> data = new ArrayList<Data>();
      if (testDataPublishers != null) {
        for (TestDataPublisher tdp : testDataPublishers) {
View Full Code Here

TOP

Related Classes of hudson.AbortException

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.