Package org.codehaus.enunciate.main

Examples of org.codehaus.enunciate.main.ClientLibraryArtifact


    }
    else {
      info("Skipping C code generation because everything appears up-to-date.");
    }

    ClientLibraryArtifact artifactBundle = new ClientLibraryArtifact(getName(), "objc.client.library", "Objective C Client Library");
    NamedFileArtifact sourceHeader = new NamedFileArtifact(getName(), "objc.client.h", new File(getGenerateDir(), label + ".h"));
    sourceHeader.setPublic(false);
    sourceHeader.setArtifactType(ArtifactType.sources);
    NamedFileArtifact sourceImpl = new NamedFileArtifact(getName(), "objc.client.m", new File(getGenerateDir(), label + ".m"));
    sourceImpl.setPublic(false);
    sourceImpl.setArtifactType(ArtifactType.sources);
    String description = readResource("library_description.fmt"); //read in the description from file
    artifactBundle.setDescription(description);
    artifactBundle.addArtifact(sourceHeader);
    artifactBundle.addArtifact(sourceImpl);
    if (isSeparateCommonCode()) {
      NamedFileArtifact commonSourceHeader = new NamedFileArtifact(getName(), "objc.common.client.h", new File(getGenerateDir(), "enunciate-common.h"));
      commonSourceHeader.setPublic(false);
      commonSourceHeader.setArtifactType(ArtifactType.sources);
      commonSourceHeader.setDescription("Common header needed for all projects.");
      NamedFileArtifact commonSourceImpl = new NamedFileArtifact(getName(), "objc.common.client.m", new File(getGenerateDir(), "enunciate-common.m"));
      commonSourceImpl.setPublic(false);
      commonSourceImpl.setArtifactType(ArtifactType.sources);
      commonSourceImpl.setDescription("Common implementation code needed for all projects.");
      artifactBundle.addArtifact(commonSourceHeader);
      artifactBundle.addArtifact(commonSourceImpl);
    }
    getEnunciate().addArtifact(artifactBundle);
  }
View Full Code Here


    if (!enunciate.isUpToDateWithSources(buildDir)) {
      buildDir.mkdirs();
      File bundle = new File(buildDir, getBundleFileName());
      enunciate.zip(bundle, getGenerateDir());

      ClientLibraryArtifact artifactBundle = new ClientLibraryArtifact(getName(), "php.client.library", "PHP Client Library");
      artifactBundle.setPlatform("PHP");
      NamedFileArtifact sourceScript = new NamedFileArtifact(getName(), "php.client", bundle);
      sourceScript.setArtifactType(ArtifactType.binaries); //binaries and sources are the same thing in php
      sourceScript.setPublic(false);
      String description = readResource("library_description.fmt"); //read in the description from file
      artifactBundle.setDescription(description);
      artifactBundle.addArtifact(sourceScript);
      getEnunciate().addArtifact(artifactBundle);
    }
  }
View Full Code Here

    }
    else {
      info("Skipping C code generation because everything appears up-to-date.");
    }

    ClientLibraryArtifact artifactBundle = new ClientLibraryArtifact(getName(), "c.client.library", "C Client Library");
    NamedFileArtifact sourceScript = new NamedFileArtifact(getName(), "c.client", new File(getGenerateDir(), getSourceFileName()));
    sourceScript.setArtifactType(ArtifactType.sources);
    sourceScript.setPublic(false);
    String description = readResource("library_description.fmt"); //read in the description from file
    artifactBundle.setDescription(description);
    artifactBundle.addArtifact(sourceScript);
    if (isSeparateCommonCode()) {
      NamedFileArtifact commonSourceHeader = new NamedFileArtifact(getName(), "c.common.client", new File(getGenerateDir(), "enunciate-common.c"));
      commonSourceHeader.setPublic(false);
      commonSourceHeader.setArtifactType(ArtifactType.sources);
      commonSourceHeader.setDescription("Common code needed for all projects.");
      artifactBundle.addArtifact(commonSourceHeader);
    }
    getEnunciate().addArtifact(artifactBundle);
  }
View Full Code Here

    Enunciate enunciate = new Enunciate(getAllJavaFiles(getSamplesDir()));
    enunciate.setConfig(config);
    enunciate.setTarget(Enunciate.Target.BUILD);
    enunciate.setRuntimeClasspath(getInAPTClasspath());
    module.setBase(enunciate.createTempDir().getAbsolutePath());
    ClientLibraryArtifact artifact1 = new ClientLibraryArtifact("module1", "1", "lib1") {

      @Override
      public void exportTo(File file, Enunciate enunciate) throws IOException {
        //no-op
      }
    };
    artifact1.setDescription("my <b>marked up</b> description for artifact 1");

    NamedFileArtifact file = new NamedFileArtifact(null, null, new File("1.1.xml"));
    file.setDescription("my description 1.1");
    artifact1.addArtifact(file);
    file = new NamedFileArtifact(null, null, new File("1.2.xml"));
    file.setDescription("my description 1.2");
    artifact1.addArtifact(file);

    ClientLibraryArtifact artifact2 = new ClientLibraryArtifact("module2", "2", "lib2") {
      @Override
      public void exportTo(File file, Enunciate enunciate) throws IOException {
        //no-op
      }
    };
    artifact2.setDescription("my <b>marked up</b> description for artifact 2");
    file = new NamedFileArtifact(null, null, new File("2.1.xml"));
    file.setDescription("my description 2.1");
    artifact2.addArtifact(file);
    file = new NamedFileArtifact(null, null, new File("2.2.xml"));
    file.setDescription("my description 2.2");
    artifact2.addArtifact(file);

    enunciate.addArtifact(artifact1);
    enunciate.addArtifact(artifact2);
    enunciate.execute();
View Full Code Here

    }
    else {
      info("Skipping Ruby code generation because everything appears up-to-date.");
    }

    ClientLibraryArtifact artifactBundle = new ClientLibraryArtifact(getName(), "ruby.client.library", "Ruby Client Library");
    artifactBundle.setPlatform("Ruby");
    NamedFileArtifact sourceScript = new NamedFileArtifact(getName(), "ruby.client", new File(getGenerateDir(), getSourceFileName()));
    sourceScript.setArtifactType(ArtifactType.binaries); //binaries and sources are the same thing in ruby
    sourceScript.setPublic(false);
    String description = readResource("library_description.fmt"); //read in the description from file
    artifactBundle.setDescription(description);
    artifactBundle.addArtifact(sourceScript);
    getEnunciate().addArtifact(artifactBundle);
  }
View Full Code Here

      else {
        info("Skipping creation of the Java client source jar as everything appears up-to-date...");
      }
    }

    ClientLibraryArtifact artifactBundle = new ClientLibraryArtifact(getName(), "java.client.library", "Java Client Library");
    artifactBundle.setPlatform("Java (Version 5+)");
    artifactBundle.addAlias("jaxws.client.library");
    //read in the description from file:
    artifactBundle.setDescription(readResource("library_description.fmt"));
    if (clientJarFile != null) {
      NamedFileArtifact binariesJar = new NamedFileArtifact(getName(), "java.client.library.binaries", clientJarFile);
      binariesJar.addAlias("jaxws.client.library.binaries");
      binariesJar.setDescription("The binaries for the Java client library.");
      binariesJar.setPublic(false);
      binariesJar.setArtifactType(ArtifactType.binaries);
      artifactBundle.addArtifact(binariesJar);
      enunciate.addArtifact(binariesJar);
    }

    if (clientSourcesJarFile != null) {
      NamedFileArtifact sourcesJar = new NamedFileArtifact(getName(), "java.client.library.sources", clientSourcesJarFile);
      sourcesJar.addAlias("jaxws.client.library.sources");
      sourcesJar.setDescription("The sources for the Java client library.");
      sourcesJar.setPublic(false);
      sourcesJar.setArtifactType(ArtifactType.sources);
      artifactBundle.addArtifact(sourcesJar);
      enunciate.addArtifact(sourcesJar);
    }

    if (clientJarFile != null || clientSourcesJarFile != null) {
      enunciate.addArtifact(artifactBundle);
    }

    if (isGenerateJsonJar()) {
      File jsonClientJarFile = null;
      if (!isDisableCompile()) {
        jsonClientJarFile = new File(getBuildDir(), jsonJarName);
        if (!enunciate.isUpToDate(getJsonClientCompileDir(), jsonClientJarFile)) {
          if (isBundleSourcesWithClasses()) {
            enunciate.zip(jsonClientJarFile, getJsonClientCompileDir(), getJsonClientGenerateDir());
          }
          else {
            enunciate.zip(jsonClientJarFile, getJsonClientCompileDir());
          }
        }
        else {
          info("Skipping creation of Java JSON client jar as everything appears up-to-date...");
        }
      }

      File jsonClientSourcesJarFile = null;
      if (!isBundleSourcesWithClasses()) {
        jsonClientSourcesJarFile = new File(getBuildDir(), jsonJarName.replaceFirst("\\.jar", "-sources.jar"));
        if (!enunciate.isUpToDate(getJsonClientGenerateDir(), jsonClientSourcesJarFile)) {
          enunciate.zip(jsonClientSourcesJarFile, getJsonClientGenerateDir());
        }
        else {
          info("Skipping creation of the Java JSON client source jar as everything appears up-to-date...");
        }
      }

      artifactBundle = new ClientLibraryArtifact(getName(), "java.json.client.library", "Java JSON Client Library");
      artifactBundle.setPlatform("Java (Version 5+)");
      //read in the description from file:
      artifactBundle.setDescription(readResource("json_library_description.fmt"));
      if (jsonClientJarFile != null) {
        NamedFileArtifact binariesJar = new NamedFileArtifact(getName(), "java.json.client.library.binaries", jsonClientJarFile);
        binariesJar.setDescription("The binaries for the Java JSON client library.");
        binariesJar.setPublic(false);
        binariesJar.setArtifactType(ArtifactType.binaries);
        artifactBundle.addArtifact(binariesJar);
        enunciate.addArtifact(binariesJar);
      }

      if (jsonClientSourcesJarFile != null) {
        NamedFileArtifact sourcesJar = new NamedFileArtifact(getName(), "java.json.client.library.sources", jsonClientSourcesJarFile);
        sourcesJar.setDescription("The sources for the Java JSON client library.");
        sourcesJar.setPublic(false);
        sourcesJar.setArtifactType(ArtifactType.sources);
        artifactBundle.addArtifact(sourcesJar);
        enunciate.addArtifact(sourcesJar);
      }

      if (jsonClientJarFile != null || jsonClientSourcesJarFile != null) {
        enunciate.addArtifact(artifactBundle);
View Full Code Here

TOP

Related Classes of org.codehaus.enunciate.main.ClientLibraryArtifact

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.