Package ng.packaging

Class SourceProject

java.lang.Object
ng.packaging.SourceProject

public class SourceProject extends Object
Source for packaging of a WO build (Application or framework)
  • Field Details

  • Constructor Details

    • SourceProject

      public SourceProject(org.apache.maven.project.MavenProject mavenProject, String woresourcesFolderName)
  • Method Details

    • dependencies

      public Collection<Dependency> dependencies()
      Returns:
      Dependencies of this project
    • woresourcesFolderName

      public String woresourcesFolderName()
      Returns:
      The name of the WO bundle resources folder
    • principalClassName

      public String principalClassName()
      Returns:
      In the case of applications, this is the main class. In the case of frameworks, this is the framework's principalClass
    • name

      public String name()
      Returns:
      Name of the WebObjects project as specified in build.properties Note that if we eventually want to support projects without build.properties, mavenProject().getArtifactId() might be an acceptable replacement value here
    • jvmOptions

      public String jvmOptions()
      Returns:
      String of arguments to pass on to the generated launch scripts' JVM CHECKME: We're currently assuming JDK>=17 and adding the required parameters for that. A nicer course of action might be to check the targeted java version and adding parameters as required. Or not do anything at all and make the user do it. Explicit good, magic bad. // Hugi 2022-09-28
    • version

      public String version()
      Returns:
      Version of the project, as specified in the pom file.
    • jarPath

      public Path jarPath()
      Returns:
      The path to the jar file from the inital compilation/packaging of the project java sources Including this as a part of "SourceProject" might look strange but note that SourceProject represents a WO project after maven's jar plugin has done it's job.
    • type

      public SourceProject.Type type()
      Returns:
      The type of the project
    • componentsPath

      public Path componentsPath()
      Returns:
      Path to source components
    • woresourcesPath

      public Path woresourcesPath()
      Returns:
      Path to source woresources
    • webServerResourcesPath

      public Path webServerResourcesPath()
      Returns:
      Path to source webserver-resources
    • targetJarNameForWOA

      public String targetJarNameForWOA()
      Returns:
      The name of the JAR file that will contain the compiled application/framework sources (which was built by maven's own package goal before we started the WOA assembly)