Package org.moxie

Examples of org.moxie.Pom


      Collection<File> files = repositoryCache.getFiles("." + org.moxie.Constants.POM);
      IndexWriter writer = getIndexWriter(repository);

      for (File pomFile : files) {
        try {
          Pom pom = PomReader.readPom(moxieCache, pomFile);
          String date = DateTools.timeToString(pomFile.lastModified(), Resolution.MINUTE);

          Document doc = new Document();
          doc.add(new Field(FIELD_PACKAGING, pom.packaging, Store.YES, Index.NOT_ANALYZED_NO_NORMS));
          doc.add(new Field(FIELD_GROUPID, pom.groupId, Store.YES, Index.ANALYZED));
View Full Code Here


   */
  private void incrementalIndex(File pomFile) {
    try {
      String repository = config.getRepositoryId(pomFile);
      IMavenCache cache = config.getMavenCache(repository);
      Pom pom = PomReader.readPom(cache, pomFile);
     
      delete(repository, pom);
     
      IndexWriter writer = getIndexWriter(repository);

View Full Code Here

        getConsole().separator();
        getConsole().log(getProject().getProperty("ant.version"));
        getConsole().log("Moxie Build Toolkit version " + Toolkit.getVersion() + " compiled on " + Toolkit.getBuildDate());
      }

      Pom pom = build.getPom();
     
      // push all pom properties into project
      Map<String,String> properties = pom.getProperties();
      for (Map.Entry<String, String> entry : properties.entrySet()) {
        getProject().setProperty(entry.getKey(), entry.getValue());
      }

      if (isVerbose()) {
View Full Code Here

  }

  public void execute() {
    Build build = getBuild();
   
    Pom pom = build.getPom(tags);
   
    if (!StringUtils.isEmpty(name)) {
      pom.name = name;
    }
    if (!StringUtils.isEmpty(description)) {
      pom.description = description;
    }
    if (!StringUtils.isEmpty(artifactId)) {
      pom.artifactId = artifactId;
    }
   
    if (!allowSnapshots && pom.isSnapshot()) {
      // do not deploy snapshots into the repository
      return;
    }
   
    Dependency asDependency = new Dependency(pom.getCoordinates());
    IMavenCache artifactCache = getArtifactCache(pom.isSnapshot());
    File cacheRoot = artifactCache.getRootFolder();
    File artifactFile = artifactCache.getArtifact(asDependency, asDependency.extension);
    File artifactDir = artifactFile.getParentFile();
    File sourceDir = build.getConfig().getTargetDirectory();
   
View Full Code Here

  }
 
  public void execute() {
    Build build = getBuild();
   
    Pom pom = build.getPom();
    if (!allowSnapshots && pom.isSnapshot()) {
      // do not install snapshots into the repository
      return;
    }
   
    Dependency asDependency = new Dependency(pom.getCoordinates());
    IMavenCache cache = getArtifactCache(pom.isSnapshot());
    File artifactFile = cache.getArtifact(asDependency, asDependency.extension);
    File artifactDir = artifactFile.getParentFile();
    File sourceDir = build.getConfig().getTargetDirectory();
   
    titleClass(pom.artifactId + "-" + pom.version);
View Full Code Here

      sb.append(getConsole().scope(scope, dependencies.size()));
      sb.append('\n');
      long totalArtifactsSize = 0;
      for (Dependency dep : dependencies) {
        Pom depPom = build.getSolver().getPom(dep);
        File artifact = build.getSolver().getArtifact(dep);
        if (artifact != null && artifact.exists()) {
          totalArtifactsSize += artifact.length();
        }
        sb.append(getConsole().dependencyReport(dep, depPom, artifact));
View Full Code Here

        return toHtml(map, "artifact.html");
      }
    }
       
    // list of files/folders
    Pom pom = getApplication().readPom(file);
    map.put("pom", pom);
    map.put("dependencies", getDependencies(pom));
    map.put("isRemoteRepository", isRemote);
    map.put("repositoryUrl", getRepositoryUrl());
    map.put("repositoryNote", getRepositoryNote(pom));
View Full Code Here

  @Test
  public void testParsing1() throws IOException, MaxmlException {
    Dependency dep = new Dependency("org.eclipse.jetty:jetty-ajp:7.4.2.v20110526");
    Solver solver = solve(dep);
    Pom pom = solver.getPom(dep);
    assertEquals("org.eclipse.jetty", pom.groupId);
    assertEquals("7.4.2.v20110526", pom.version);
  }
View Full Code Here

TOP

Related Classes of org.moxie.Pom

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.