@@ -0,0 +1,1922 @@
+/*%0A * Bach - Java Shell Builder%0A * Copyright (C) 2020 Christian Stein%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     https://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage de.sormuras.bach.project;%0A%0Aimport java.lang.module.ModuleDescriptor.Version;%0A%0A/** Bach's project model. */%0Apublic final class Project %7B%0A%0A  public static Project ofSystem() %7B%0A    var name = System.getProperty(%22bach.project.name%22, %22unnamed%22);%0A    var version = System.getProperty(%22bach.project.version%22, %221-ea%22);%0A    return of(name, version);%0A  %7D%0A%0A  public static Project of(String name, String version) %7B%0A    return of(name, Version.parse(version));%0A  %7D%0A%0A  public static Project of(String name, Version version) %7B%0A    return new Project(Base.of(), name, version);%0A  %7D%0A%0A  public Project with(Base base) %7B%0A    return new Project(base, name, version);%0A  %7D%0A%0A  public Project with(String name) %7B%0A    return new Project(base, name, version);%0A  %7D%0A%0A  public Project with(Version version) %7B%0A    return new Project(base, name, version);%0A  %7D%0A%0A  private final Base base;%0A  private final String name;%0A  private final Version version;%0A%0A  public Project(Base base, String name, Version version) %7B%0A    this.base = base;%0A    this.name = name;%0A    this.version = version;%0A  %7D%0A%0A  public Base base() %7B%0A    return base;%0A  %7D%0A%0A  public String name() %7B%0A    return name;%0A  %7D%0A%0A  public Version version() %7B%0A    return version;%0A  %7D%0A%0A  public String toNameAndVersion() %7B%0A    return name + ' ' + version;%0A  %7D%0A%7D%0A

Introduce project model