Package org.apache.tools.ant

Examples of org.apache.tools.ant.Project.addReference()


                    }
                } else if (key.equals("id")) {
                    if (value != null) {
                        // What's the difference between id and name ?
                        if (!context.isIgnoringProjectTag()) {
                            project.addReference(value, project);
                        }
                    }
                } else if (key.equals("basedir")) {
                    if (!context.isIgnoringProjectTag()) {
                        baseDir = value;
View Full Code Here


        project.setUserProperty("ant.file", buildFile.getAbsolutePath());
        project.setUserProperty("targetDirectory", targetDirectory.getAbsolutePath());
        project.init();

        ProjectHelper helper = ProjectHelper.getProjectHelper();
        project.addReference("ant.projecthelper", helper);
        helper.parse(project, buildFile);

        project.executeTarget(project.getDefaultTarget());

        return targetDirectory;
View Full Code Here

            antProject.addBuildListener(antLogger);
            antProject.setBaseDir(mavenProject.getBasedir());
            Path p = new Path(antProject);
            p.setPath(StringUtils.join(mavenProject.getArtifacts().iterator(),
                    File.pathSeparator));
            antProject.addReference("maven.dependency.classpath", p);
            p = new Path(antProject);
            p.setPath(StringUtils.join(mavenProject
                    .getCompileClasspathElements().iterator(),
                    File.pathSeparator));
            antProject.addReference("maven.compile.classpath", p);
View Full Code Here

            antProject.addReference("maven.dependency.classpath", p);
            p = new Path(antProject);
            p.setPath(StringUtils.join(mavenProject
                    .getCompileClasspathElements().iterator(),
                    File.pathSeparator));
            antProject.addReference("maven.compile.classpath", p);
            p = new Path(antProject);
            p.setPath(StringUtils.join(mavenProject
                    .getRuntimeClasspathElements().iterator(),
                    File.pathSeparator));
            antProject.addReference("maven.runtime.classpath", p);
View Full Code Here

            antProject.addReference("maven.compile.classpath", p);
            p = new Path(antProject);
            p.setPath(StringUtils.join(mavenProject
                    .getRuntimeClasspathElements().iterator(),
                    File.pathSeparator));
            antProject.addReference("maven.runtime.classpath", p);
            p = new Path(antProject);
            p.setPath(StringUtils.join(mavenProject.getTestClasspathElements()
                    .iterator(), File.pathSeparator));
            antProject.addReference("maven.test.classpath", p);
            List artifacts = getArtifacts();
View Full Code Here

                    File.pathSeparator));
            antProject.addReference("maven.runtime.classpath", p);
            p = new Path(antProject);
            p.setPath(StringUtils.join(mavenProject.getTestClasspathElements()
                    .iterator(), File.pathSeparator));
            antProject.addReference("maven.test.classpath", p);
            List artifacts = getArtifacts();
            List list = new ArrayList(artifacts.size());
            File file;
            for (Iterator i = artifacts.iterator(); i.hasNext(); list.add(file
                    .getPath())) {
View Full Code Here

                    throw new DependencyResolutionRequiredException(a);
            }

            p = new Path(antProject);
            p.setPath(StringUtils.join(list.iterator(), File.pathSeparator));
            antProject.addReference("maven.plugin.classpath", p);
            getLog().info("Executing tasks");
            antTasks.execute();
            getLog().info("Executed tasks");
        } catch (Exception e) {
            throw new MojoExecutionException("Error executing ant tasks", e);
View Full Code Here

    p.setUserProperty("ant.file", buildFile.getAbsolutePath());
    p.init();

    // execute the ant target
    ProjectHelper helper = ProjectHelper.getProjectHelper();
    p.addReference("ant.projectHelper", helper);
    p.addBuildListener(new Log4jListener());
    helper.parse(p, buildFile);

    p.setProperty("jdbc.driver", "mysql-connector-java-5.1.0-bin.jar");
    p.setProperty("main.class", "MolgenisOnMysqlServer");
View Full Code Here

        if (taskClasspath==null || taskClasspath.size()==0) {
            throw new BuildException("no classpath given");
        }
        Project project = getProject();
        AntClassLoader loader = new AntClassLoader(makeRoot(),true);
        project.addReference(name,loader);
    }
   
    private RootLoader makeRoot() {
        String[] list = taskClasspath.list();
        LoaderConfiguration lc = new LoaderConfiguration();
View Full Code Here

      antProject.addBuildListener(antLogger);
      antProject.setBaseDir(mavenProject.getBasedir());
      Path p = new Path(antProject);
      p.setPath(StringUtils.join(mavenProject.getArtifacts().iterator(),
          File.pathSeparator));
      antProject.addReference("maven.dependency.classpath", p);
      p = new Path(antProject);
      p.setPath(StringUtils.join(mavenProject
          .getCompileClasspathElements().iterator(),
          File.pathSeparator));
      antProject.addReference("maven.compile.classpath", p);
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.