2
0
Fork 0
mirror of https://github.com/ethauvin/bld.git synced 2025-04-24 15:57:11 -07:00

Implements #52 : command line enhancements for project creation

This commit is contained in:
Geert Bevin 2024-11-16 18:23:10 -05:00
parent 6c2a9acf1c
commit 66f7d180b9
21 changed files with 1421 additions and 1326 deletions

View file

@ -22,16 +22,16 @@ import static rife.bld.dependencies.Scope.test;
* @since 1.9
*/
public class AppProjectBlueprint extends Project {
public AppProjectBlueprint(File work, String packageName, String projectName) {
this(work, packageName, projectName, new VersionNumber(0,0,1));
public AppProjectBlueprint(File work, String packageName, String projectName, String baseName) {
this(work, packageName, projectName, baseName, new VersionNumber(0,0,1));
}
public AppProjectBlueprint(File work, String packageName, String projectName, VersionNumber versionNumber) {
public AppProjectBlueprint(File work, String packageName, String projectName, String baseName, VersionNumber versionNumber) {
workDirectory = work;
pkg = packageName;
name = projectName;
mainClass = packageName + "." + StringUtils.capitalize(projectName) + "Main";
mainClass = packageName + "." + baseName + "Main";
version = versionNumber;
downloadSources = true;

View file

@ -21,16 +21,16 @@ import static rife.bld.dependencies.Repository.SONATYPE_SNAPSHOTS;
* @since 1.5.20
*/
public class BaseProjectBlueprint extends Project {
public BaseProjectBlueprint(File work, String packageName, String projectName) {
this(work, packageName, projectName, new VersionNumber(0,0,1));
public BaseProjectBlueprint(File work, String packageName, String projectName, String baseName) {
this(work, packageName, projectName, baseName, new VersionNumber(0,0,1));
}
public BaseProjectBlueprint(File work, String packageName, String projectName, VersionNumber versionNumber) {
public BaseProjectBlueprint(File work, String packageName, String projectName, String baseName, VersionNumber versionNumber) {
workDirectory = work;
pkg = packageName;
name = projectName;
mainClass = packageName + "." + StringUtils.capitalize(projectName) + "Main";
mainClass = packageName + "." + baseName + "Main";
version = versionNumber;
downloadSources = true;

View file

@ -22,16 +22,16 @@ import static rife.bld.dependencies.Scope.test;
* @since 1.6
*/
public class LibProjectBlueprint extends Project {
public LibProjectBlueprint(File work, String packageName, String projectName) {
this(work, packageName, projectName, new VersionNumber(0,0,1));
public LibProjectBlueprint(File work, String packageName, String projectName, String baseName) {
this(work, packageName, projectName, baseName, new VersionNumber(0,0,1));
}
public LibProjectBlueprint(File work, String packageName, String projectName, VersionNumber versionNumber) {
public LibProjectBlueprint(File work, String packageName, String projectName, String baseName, VersionNumber versionNumber) {
workDirectory = work;
pkg = packageName;
name = projectName;
mainClass = packageName + "." + StringUtils.capitalize(projectName) + "Lib";
mainClass = packageName + "." + baseName + "Lib";
version = versionNumber;
downloadSources = true;

View file

@ -23,16 +23,16 @@ import static rife.bld.dependencies.Scope.*;
* @since 1.5
*/
public class Rife2ProjectBlueprint extends WebProject {
public Rife2ProjectBlueprint(File work, String packageName, String projectName) {
this(work, packageName, projectName, new VersionNumber(0,0,1));
public Rife2ProjectBlueprint(File work, String packageName, String projectName, String baseName) {
this(work, packageName, projectName, baseName, new VersionNumber(0,0,1));
}
public Rife2ProjectBlueprint(File work, String packageName, String projectName, VersionNumber versionNumber) {
public Rife2ProjectBlueprint(File work, String packageName, String projectName, String baseName, VersionNumber versionNumber) {
workDirectory = work;
pkg = packageName;
name = projectName;
mainClass = packageName + "." + StringUtils.capitalize(projectName) + "Site";
mainClass = packageName + "." + baseName + "Site";
uberJarMainClass = mainClass + "Uber";
version = versionNumber;

View file

@ -21,9 +21,10 @@ public class CreateAppHelp implements CommandHelp {
public String getDescription(String topic) {
return StringUtils.replace("""
Creates a new Java application project.
Usage : ${topic} <package> <name>
Usage : ${topic} <package> <name> <base>
package The package of the project to create
name The name of the project to create""", "${topic}", topic);
name The name of the project to create
base The base name for generated project classes""", "${topic}", topic);
}
}

View file

@ -21,9 +21,10 @@ public class CreateBaseHelp implements CommandHelp {
public String getDescription(String topic) {
return StringUtils.replace("""
Creates a new Java baseline project.
Usage : ${topic} <package> <name>
Usage : ${topic} <package> <name> <base>
package The package of the project to create
name The name of the project to create""", "${topic}", topic);
name The name of the project to create
base The base name for generated project classes""", "${topic}", topic);
}
}

View file

@ -21,10 +21,11 @@ public class CreateHelp implements CommandHelp {
public String getDescription(String topic) {
return StringUtils.replace("""
Creates a new project from multiple choice.
Usage : ${topic} <type> <package> <name>
Usage : ${topic} <type> <package> <name> <base>
type The type of project to create (app, base, lib, rife2)
package The package of the project to create
name The name of the project to create""", "${topic}", topic);
name The name of the project to create
base The base name for generated project classes""", "${topic}", topic);
}
}

View file

@ -21,9 +21,10 @@ public class CreateLibHelp implements CommandHelp {
public String getDescription(String topic) {
return StringUtils.replace("""
Creates a new Java library project.
Usage : ${topic} <package> <name>
Usage : ${topic} <package> <name> <base>
package The package of the project to create
name The name of the project to create""", "${topic}", topic);
name The name of the project to create
base The base name for generated project classes""", "${topic}", topic);
}
}

View file

@ -21,9 +21,10 @@ public class CreateRife2Help implements CommandHelp {
public String getDescription(String topic) {
return StringUtils.replace("""
Creates a new RIFE2 web application project.
Usage : ${topic} <package> <name>
Usage : ${topic} <package> <name> <base>
package The package of the project to create
name The name of the project to create""", "${topic}", topic);
name The name of the project to create
base The base name for generated project classes""", "${topic}", topic);
}
}

View file

@ -26,11 +26,13 @@ import java.util.List;
* @since 1.5
*/
public abstract class AbstractCreateOperation<T extends AbstractCreateOperation<T, P>, P extends Project> extends AbstractOperation<AbstractCreateOperation<T, P>> {
private String packageName_;
private String projectName_;
private String baseName_;
final String templateBase_;
File workDirectory_ = new File(System.getProperty("user.dir"));
String packageName_;
String projectName_;
boolean downloadDependencies_;
P project_;
@ -98,10 +100,11 @@ public abstract class AbstractCreateOperation<T extends AbstractCreateOperation<
// standard names
projectClassName_ = StringUtils.capitalize(project_.name());
projectBuildName_ = projectBuildClassName(projectClassName_);
projectMainName_ = projectMainClassName(projectClassName_);
projectMainUberName_ = projectMainUberClassName(projectClassName_);
projectTestName_ = projectTestClassName(projectClassName_);
var base_name = baseName();
projectBuildName_ = projectBuildClassName(base_name);
projectMainName_ = projectMainClassName(base_name);
projectMainUberName_ = projectMainUberClassName(base_name);
projectTestName_ = projectTestClassName(base_name);
// create the main project structure
ideaDirectory_ = new File(project_.workDirectory(), ".idea");
@ -375,14 +378,18 @@ public abstract class AbstractCreateOperation<T extends AbstractCreateOperation<
public T fromArguments(List<String> arguments) {
String package_name = null;
String project_name = null;
String base_name = null;
if (!arguments.isEmpty()) {
package_name = arguments.remove(0);
}
if (!arguments.isEmpty()) {
project_name = arguments.remove(0);
}
if ((package_name == null || project_name == null) && System.console() == null) {
throw new OperationOptionException("ERROR: Expecting the package and project names as the arguments.");
if (!arguments.isEmpty()) {
base_name = arguments.remove(0);
}
if ((package_name == null || project_name == null || base_name == null) && System.console() == null) {
throw new OperationOptionException("ERROR: Expecting the package, project and base names as the arguments.");
}
if (package_name == null || package_name.isEmpty()) {
@ -391,16 +398,30 @@ public abstract class AbstractCreateOperation<T extends AbstractCreateOperation<
} else {
System.out.println("Using package name: " + package_name);
}
if (project_name == null || project_name.isEmpty()) {
System.out.println("Please enter a project name (for instance: myapp):");
System.out.println("Please enter a project name (for instance: my-app):");
project_name = System.console().readLine();
} else {
System.out.println("Using project name: " + project_name);
}
if (base_name == null || base_name.isEmpty()) {
var default_base_name = generateBaseName(project_name);
System.out.println("Please enter the base name for generated project classes (default: " + default_base_name + "):");
base_name = System.console().readLine();
if (base_name == null || base_name.trim().isEmpty()) {
base_name = default_base_name;
System.out.println("Using base name: " + base_name);
}
} else {
System.out.println("Using base name: " + base_name);
}
return workDirectory(new File(System.getProperty("user.dir")))
.packageName(package_name)
.projectName(project_name)
.baseName(base_name)
.downloadDependencies(true);
}
@ -445,7 +466,6 @@ public abstract class AbstractCreateOperation<T extends AbstractCreateOperation<
throw new OperationOptionException("ERROR: The package name is invalid.");
}
packageName_ = name;
return (T) this;
}
@ -462,10 +482,26 @@ public abstract class AbstractCreateOperation<T extends AbstractCreateOperation<
throw new OperationOptionException("ERROR: The project name should not be blank.");
}
if (!ValidityChecks.checkJavaIdentifier(projectName_)) {
throw new OperationOptionException("ERROR: The project name is invalid.");
return (T) this;
}
/**
* Provides the base name for the project classes to generate.
*
* @param name the base name
* @return this operation instance
* @since 2.2
*/
public T baseName(String name) {
baseName_ = StringUtils.trim(name);
if (baseName_.isEmpty()) {
throw new OperationOptionException("ERROR: The base name should not be blank.");
}
projectName_ = name;
if (!ValidityChecks.checkJavaIdentifier(baseName_)) {
throw new OperationOptionException("ERROR: The base name is invalid.");
}
return (T) this;
}
@ -513,6 +549,33 @@ public abstract class AbstractCreateOperation<T extends AbstractCreateOperation<
return projectName_;
}
static String generateBaseName(String projectName) {
if (projectName != null) {
var base_name = projectName.trim();
base_name = StringUtils.filterAsIdentifier(base_name);
base_name = StringUtils.capitalize(base_name);
return base_name;
}
return null;
}
/**
* Retrieves the base name for the project classes to generate.
* <p>
* If no base name was provided, one will be generated from the project name.
*
* @return the base name
* @since 2.2
*/
public String baseName() {
if (baseName_ == null || baseName_.isEmpty()) {
return generateBaseName(projectName());
}
return baseName_;
}
/**
* Retrieves whether dependencies will be downloaded at project creation.
*

View file

@ -21,6 +21,6 @@ public class CreateAppOperation extends AbstractCreateOperation<CreateAppOperati
}
protected Project createProjectBlueprint() {
return new AppProjectBlueprint(new File(workDirectory(), projectName()), packageName(), projectName());
return new AppProjectBlueprint(new File(workDirectory(), projectName()), packageName(), projectName(), baseName());
}
}

View file

@ -21,6 +21,6 @@ public class CreateBaseOperation extends AbstractCreateOperation<CreateBaseOpera
}
protected Project createProjectBlueprint() {
return new BaseProjectBlueprint(new File(workDirectory(), projectName()), packageName(), projectName());
return new BaseProjectBlueprint(new File(workDirectory(), projectName()), packageName(), projectName(), baseName());
}
}

View file

@ -21,7 +21,7 @@ public class CreateLibOperation extends AbstractCreateOperation<CreateLibOperati
}
protected Project createProjectBlueprint() {
return new LibProjectBlueprint(new File(workDirectory(), projectName()), packageName(), projectName());
return new LibProjectBlueprint(new File(workDirectory(), projectName()), packageName(), projectName(), baseName());
}
protected String projectMainClassName(String projectClassName) {

View file

@ -33,6 +33,7 @@ public class CreateOperation {
String type = null;
String package_name = null;
String project_name = null;
String base_name = null;
if (!arguments.isEmpty()) {
type = arguments.remove(0);
}
@ -42,8 +43,11 @@ public class CreateOperation {
if (!arguments.isEmpty()) {
project_name = arguments.remove(0);
}
if ((type == null || package_name == null || project_name == null) && System.console() == null) {
throw new OperationOptionException("ERROR: Expecting the type, package and project names as the arguments.");
if (!arguments.isEmpty()) {
base_name = arguments.remove(0);
}
if ((package_name == null || project_name == null || base_name == null) && System.console() == null) {
throw new OperationOptionException("ERROR: Expecting the package, project and base names as the arguments.");
}
if (type == null || type.isEmpty()) {
@ -87,21 +91,34 @@ public class CreateOperation {
if (project_name == null || project_name.isEmpty()) {
String name_example;
if (LIB.equals(type)) {
name_example = "mylib";
name_example = "my-lib";
} else if (RIFE2.equals(type)) {
name_example = "mywebapp";
name_example = "my-webapp";
} else {
name_example = "myapp";
name_example = "my-app";
}
System.out.printf("Please enter a project name (for instance: %s):%n", name_example);
System.out.println("Please enter a project name (for instance: " + name_example + ")");
project_name = System.console().readLine();
} else {
System.out.println("Using project name: " + project_name);
}
if (base_name == null || base_name.isEmpty()) {
var default_base_name = AbstractCreateOperation.generateBaseName(project_name);
System.out.println("Please enter the base name for generated project classes (default: " + default_base_name + "):");
base_name = System.console().readLine();
if (base_name == null || base_name.trim().isEmpty()) {
base_name = default_base_name;
System.out.println("Using base name: " + base_name);
}
} else {
System.out.println("Using base name: " + base_name);
}
return create_operation.workDirectory(new File(System.getProperty("user.dir")))
.packageName(package_name)
.projectName(project_name)
.baseName(base_name)
.downloadDependencies(true);
}
}

View file

@ -27,14 +27,14 @@ public class CreateRife2Operation extends AbstractCreateOperation<CreateRife2Ope
}
protected Rife2ProjectBlueprint createProjectBlueprint() {
return new Rife2ProjectBlueprint(new File(workDirectory(), projectName()), packageName(), projectName());
return new Rife2ProjectBlueprint(new File(workDirectory(), projectName()), packageName(), projectName(), baseName());
}
@Override
protected void executeConfigure() {
super.executeConfigure();
projectMainName_ = projectClassName_ + "Site";
projectMainName_ = baseName() + "Site";
projectMainUberName_ = projectMainName_ + "Uber";
srcMainWebappCssDirectory_ = new File(project_.srcMainWebappDirectory(), "css");
srcMainWebappWebInfDirectory_ = new File(project_.srcMainWebappDirectory(), "WEB-INF");

View file

@ -1 +1 @@
2.1.1-SNAPSHOT
2.2.0-SNAPSHOT

View file

@ -65,165 +65,166 @@ public class TestCreateAppOperation {
var create_operation = new CreateAppOperation()
.workDirectory(tmp)
.packageName("com.example")
.projectName("myapp")
.projectName("my-app")
.baseName("MyApp")
.downloadDependencies(true);
create_operation.execute();
assertTrue(Pattern.compile("""
/myapp
/myapp/\\.gitignore
/myapp/\\.idea
/myapp/\\.idea/app\\.iml
/myapp/\\.idea/bld\\.iml
/myapp/\\.idea/libraries
/myapp/\\.idea/libraries/bld\\.xml
/myapp/\\.idea/libraries/compile\\.xml
/myapp/\\.idea/libraries/runtime\\.xml
/myapp/\\.idea/libraries/test\\.xml
/myapp/\\.idea/misc\\.xml
/myapp/\\.idea/modules\\.xml
/myapp/\\.idea/runConfigurations
/myapp/\\.idea/runConfigurations/Run Main\\.xml
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
/myapp/\\.vscode
/myapp/\\.vscode/launch\\.json
/myapp/\\.vscode/settings\\.json
/myapp/bld
/myapp/bld\\.bat
/myapp/lib
/myapp/lib/bld
/myapp/lib/bld/bld-wrapper\\.jar
/myapp/lib/bld/bld-wrapper\\.properties
/myapp/lib/compile
/myapp/lib/compile/modules
/myapp/lib/provided
/myapp/lib/provided/modules
/myapp/lib/runtime
/myapp/lib/runtime/modules
/myapp/lib/test
/myapp/lib/test/apiguardian-api-1\\.1\\.2-sources\\.jar
/myapp/lib/test/apiguardian-api-1\\.1\\.2\\.jar
/myapp/lib/test/junit-jupiter-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-5\\.11\\.0\\.jar
/myapp/lib/test/junit-jupiter-api-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-api-5\\.11\\.0\\.jar
/myapp/lib/test/junit-jupiter-engine-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-engine-5\\.11\\.0\\.jar
/myapp/lib/test/junit-jupiter-params-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-params-5\\.11\\.0\\.jar
/myapp/lib/test/junit-platform-commons-1\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-platform-commons-1\\.11\\.0\\.jar
/myapp/lib/test/junit-platform-console-standalone-1\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-platform-console-standalone-1\\.11\\.0\\.jar
/myapp/lib/test/junit-platform-engine-1\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-platform-engine-1\\.11\\.0\\.jar
/myapp/lib/test/modules
/myapp/lib/test/opentest4j-1\\.3\\.0-sources\\.jar
/myapp/lib/test/opentest4j-1\\.3\\.0\\.jar
/myapp/src
/myapp/src/bld
/myapp/src/bld/java
/myapp/src/bld/java/com
/myapp/src/bld/java/com/example
/myapp/src/bld/java/com/example/MyappBuild\\.java
/myapp/src/bld/resources
/myapp/src/main
/myapp/src/main/java
/myapp/src/main/java/com
/myapp/src/main/java/com/example
/myapp/src/main/java/com/example/MyappMain\\.java
/myapp/src/main/resources
/myapp/src/main/resources/templates
/myapp/src/test
/myapp/src/test/java
/myapp/src/test/java/com
/myapp/src/test/java/com/example
/myapp/src/test/java/com/example/MyappTest\\.java
/myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
/my-app
/my-app/\\.gitignore
/my-app/\\.idea
/my-app/\\.idea/app\\.iml
/my-app/\\.idea/bld\\.iml
/my-app/\\.idea/libraries
/my-app/\\.idea/libraries/bld\\.xml
/my-app/\\.idea/libraries/compile\\.xml
/my-app/\\.idea/libraries/runtime\\.xml
/my-app/\\.idea/libraries/test\\.xml
/my-app/\\.idea/misc\\.xml
/my-app/\\.idea/modules\\.xml
/my-app/\\.idea/runConfigurations
/my-app/\\.idea/runConfigurations/Run Main\\.xml
/my-app/\\.idea/runConfigurations/Run Tests\\.xml
/my-app/\\.vscode
/my-app/\\.vscode/launch\\.json
/my-app/\\.vscode/settings\\.json
/my-app/bld
/my-app/bld\\.bat
/my-app/lib
/my-app/lib/bld
/my-app/lib/bld/bld-wrapper\\.jar
/my-app/lib/bld/bld-wrapper\\.properties
/my-app/lib/compile
/my-app/lib/compile/modules
/my-app/lib/provided
/my-app/lib/provided/modules
/my-app/lib/runtime
/my-app/lib/runtime/modules
/my-app/lib/test
/my-app/lib/test/apiguardian-api-1\\.1\\.2-sources\\.jar
/my-app/lib/test/apiguardian-api-1\\.1\\.2\\.jar
/my-app/lib/test/junit-jupiter-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-5\\.11\\.0\\.jar
/my-app/lib/test/junit-jupiter-api-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-api-5\\.11\\.0\\.jar
/my-app/lib/test/junit-jupiter-engine-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-engine-5\\.11\\.0\\.jar
/my-app/lib/test/junit-jupiter-params-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-params-5\\.11\\.0\\.jar
/my-app/lib/test/junit-platform-commons-1\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-platform-commons-1\\.11\\.0\\.jar
/my-app/lib/test/junit-platform-console-standalone-1\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-platform-console-standalone-1\\.11\\.0\\.jar
/my-app/lib/test/junit-platform-engine-1\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-platform-engine-1\\.11\\.0\\.jar
/my-app/lib/test/modules
/my-app/lib/test/opentest4j-1\\.3\\.0-sources\\.jar
/my-app/lib/test/opentest4j-1\\.3\\.0\\.jar
/my-app/src
/my-app/src/bld
/my-app/src/bld/java
/my-app/src/bld/java/com
/my-app/src/bld/java/com/example
/my-app/src/bld/java/com/example/MyAppBuild\\.java
/my-app/src/bld/resources
/my-app/src/main
/my-app/src/main/java
/my-app/src/main/java/com
/my-app/src/main/java/com/example
/my-app/src/main/java/com/example/MyAppMain\\.java
/my-app/src/main/resources
/my-app/src/main/resources/templates
/my-app/src/test
/my-app/src/test/java
/my-app/src/test/java/com
/my-app/src/test/java/com/example
/my-app/src/test/java/com/example/MyAppTest\\.java
/my-app/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
var compile_operation = new CompileOperation().fromProject(create_operation.project());
compile_operation.execute();
assertTrue(compile_operation.diagnostics().isEmpty());
assertTrue(Pattern.compile("""
/myapp
/myapp/\\.gitignore
/myapp/\\.idea
/myapp/\\.idea/app\\.iml
/myapp/\\.idea/bld\\.iml
/myapp/\\.idea/libraries
/myapp/\\.idea/libraries/bld\\.xml
/myapp/\\.idea/libraries/compile\\.xml
/myapp/\\.idea/libraries/runtime\\.xml
/myapp/\\.idea/libraries/test\\.xml
/myapp/\\.idea/misc\\.xml
/myapp/\\.idea/modules\\.xml
/myapp/\\.idea/runConfigurations
/myapp/\\.idea/runConfigurations/Run Main\\.xml
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
/myapp/\\.vscode
/myapp/\\.vscode/launch\\.json
/myapp/\\.vscode/settings\\.json
/myapp/bld
/myapp/bld\\.bat
/myapp/build
/myapp/build/main
/myapp/build/main/com
/myapp/build/main/com/example
/myapp/build/main/com/example/MyappMain\\.class
/myapp/build/test
/myapp/build/test/com
/myapp/build/test/com/example
/myapp/build/test/com/example/MyappTest\\.class
/myapp/lib
/myapp/lib/bld
/myapp/lib/bld/bld-wrapper\\.jar
/myapp/lib/bld/bld-wrapper\\.properties
/myapp/lib/compile
/myapp/lib/compile/modules
/myapp/lib/provided
/myapp/lib/provided/modules
/myapp/lib/runtime
/myapp/lib/runtime/modules
/myapp/lib/test
/myapp/lib/test/apiguardian-api-1\\.1\\.2-sources\\.jar
/myapp/lib/test/apiguardian-api-1\\.1\\.2\\.jar
/myapp/lib/test/junit-jupiter-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-5\\.11\\.0\\.jar
/myapp/lib/test/junit-jupiter-api-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-api-5\\.11\\.0\\.jar
/myapp/lib/test/junit-jupiter-engine-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-engine-5\\.11\\.0\\.jar
/myapp/lib/test/junit-jupiter-params-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-params-5\\.11\\.0\\.jar
/myapp/lib/test/junit-platform-commons-1\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-platform-commons-1\\.11\\.0\\.jar
/myapp/lib/test/junit-platform-console-standalone-1\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-platform-console-standalone-1\\.11\\.0\\.jar
/myapp/lib/test/junit-platform-engine-1\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-platform-engine-1\\.11\\.0\\.jar
/myapp/lib/test/modules
/myapp/lib/test/opentest4j-1\\.3\\.0-sources\\.jar
/myapp/lib/test/opentest4j-1\\.3\\.0\\.jar
/myapp/src
/myapp/src/bld
/myapp/src/bld/java
/myapp/src/bld/java/com
/myapp/src/bld/java/com/example
/myapp/src/bld/java/com/example/MyappBuild\\.java
/myapp/src/bld/resources
/myapp/src/main
/myapp/src/main/java
/myapp/src/main/java/com
/myapp/src/main/java/com/example
/myapp/src/main/java/com/example/MyappMain\\.java
/myapp/src/main/resources
/myapp/src/main/resources/templates
/myapp/src/test
/myapp/src/test/java
/myapp/src/test/java/com
/myapp/src/test/java/com/example
/myapp/src/test/java/com/example/MyappTest\\.java
/myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
/my-app
/my-app/\\.gitignore
/my-app/\\.idea
/my-app/\\.idea/app\\.iml
/my-app/\\.idea/bld\\.iml
/my-app/\\.idea/libraries
/my-app/\\.idea/libraries/bld\\.xml
/my-app/\\.idea/libraries/compile\\.xml
/my-app/\\.idea/libraries/runtime\\.xml
/my-app/\\.idea/libraries/test\\.xml
/my-app/\\.idea/misc\\.xml
/my-app/\\.idea/modules\\.xml
/my-app/\\.idea/runConfigurations
/my-app/\\.idea/runConfigurations/Run Main\\.xml
/my-app/\\.idea/runConfigurations/Run Tests\\.xml
/my-app/\\.vscode
/my-app/\\.vscode/launch\\.json
/my-app/\\.vscode/settings\\.json
/my-app/bld
/my-app/bld\\.bat
/my-app/build
/my-app/build/main
/my-app/build/main/com
/my-app/build/main/com/example
/my-app/build/main/com/example/MyAppMain\\.class
/my-app/build/test
/my-app/build/test/com
/my-app/build/test/com/example
/my-app/build/test/com/example/MyAppTest\\.class
/my-app/lib
/my-app/lib/bld
/my-app/lib/bld/bld-wrapper\\.jar
/my-app/lib/bld/bld-wrapper\\.properties
/my-app/lib/compile
/my-app/lib/compile/modules
/my-app/lib/provided
/my-app/lib/provided/modules
/my-app/lib/runtime
/my-app/lib/runtime/modules
/my-app/lib/test
/my-app/lib/test/apiguardian-api-1\\.1\\.2-sources\\.jar
/my-app/lib/test/apiguardian-api-1\\.1\\.2\\.jar
/my-app/lib/test/junit-jupiter-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-5\\.11\\.0\\.jar
/my-app/lib/test/junit-jupiter-api-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-api-5\\.11\\.0\\.jar
/my-app/lib/test/junit-jupiter-engine-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-engine-5\\.11\\.0\\.jar
/my-app/lib/test/junit-jupiter-params-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-params-5\\.11\\.0\\.jar
/my-app/lib/test/junit-platform-commons-1\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-platform-commons-1\\.11\\.0\\.jar
/my-app/lib/test/junit-platform-console-standalone-1\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-platform-console-standalone-1\\.11\\.0\\.jar
/my-app/lib/test/junit-platform-engine-1\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-platform-engine-1\\.11\\.0\\.jar
/my-app/lib/test/modules
/my-app/lib/test/opentest4j-1\\.3\\.0-sources\\.jar
/my-app/lib/test/opentest4j-1\\.3\\.0\\.jar
/my-app/src
/my-app/src/bld
/my-app/src/bld/java
/my-app/src/bld/java/com
/my-app/src/bld/java/com/example
/my-app/src/bld/java/com/example/MyAppBuild\\.java
/my-app/src/bld/resources
/my-app/src/main
/my-app/src/main/java
/my-app/src/main/java/com
/my-app/src/main/java/com/example
/my-app/src/main/java/com/example/MyAppMain\\.java
/my-app/src/main/resources
/my-app/src/main/resources/templates
/my-app/src/test
/my-app/src/test/java
/my-app/src/test/java/com
/my-app/src/test/java/com/example
/my-app/src/test/java/com/example/MyAppTest\\.java
/my-app/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
var check_result = new StringBuilder();
new RunOperation()
@ -247,62 +248,63 @@ public class TestCreateAppOperation {
var create_operation = new CreateAppOperation()
.workDirectory(tmp)
.packageName("org.stuff")
.projectName("yourthing");
.projectName("your-thing")
.baseName("YourThing");
create_operation.execute();
assertEquals("""
/yourthing
/yourthing/.gitignore
/yourthing/.idea
/yourthing/.idea/app.iml
/yourthing/.idea/bld.iml
/yourthing/.idea/libraries
/yourthing/.idea/libraries/bld.xml
/yourthing/.idea/libraries/compile.xml
/yourthing/.idea/libraries/runtime.xml
/yourthing/.idea/libraries/test.xml
/yourthing/.idea/misc.xml
/yourthing/.idea/modules.xml
/yourthing/.idea/runConfigurations
/yourthing/.idea/runConfigurations/Run Main.xml
/yourthing/.idea/runConfigurations/Run Tests.xml
/yourthing/.vscode
/yourthing/.vscode/launch.json
/yourthing/.vscode/settings.json
/yourthing/bld
/yourthing/bld.bat
/yourthing/lib
/yourthing/lib/bld
/yourthing/lib/bld/bld-wrapper.jar
/yourthing/lib/bld/bld-wrapper.properties
/yourthing/lib/compile
/yourthing/lib/compile/modules
/yourthing/lib/provided
/yourthing/lib/provided/modules
/yourthing/lib/runtime
/yourthing/lib/runtime/modules
/yourthing/lib/test
/yourthing/lib/test/modules
/yourthing/src
/yourthing/src/bld
/yourthing/src/bld/java
/yourthing/src/bld/java/org
/yourthing/src/bld/java/org/stuff
/yourthing/src/bld/java/org/stuff/YourthingBuild.java
/yourthing/src/bld/resources
/yourthing/src/main
/yourthing/src/main/java
/yourthing/src/main/java/org
/yourthing/src/main/java/org/stuff
/yourthing/src/main/java/org/stuff/YourthingMain.java
/yourthing/src/main/resources
/yourthing/src/main/resources/templates
/yourthing/src/test
/yourthing/src/test/java
/yourthing/src/test/java/org
/yourthing/src/test/java/org/stuff
/yourthing/src/test/java/org/stuff/YourthingTest.java
/yourthing/src/test/resources""",
/your-thing
/your-thing/.gitignore
/your-thing/.idea
/your-thing/.idea/app.iml
/your-thing/.idea/bld.iml
/your-thing/.idea/libraries
/your-thing/.idea/libraries/bld.xml
/your-thing/.idea/libraries/compile.xml
/your-thing/.idea/libraries/runtime.xml
/your-thing/.idea/libraries/test.xml
/your-thing/.idea/misc.xml
/your-thing/.idea/modules.xml
/your-thing/.idea/runConfigurations
/your-thing/.idea/runConfigurations/Run Main.xml
/your-thing/.idea/runConfigurations/Run Tests.xml
/your-thing/.vscode
/your-thing/.vscode/launch.json
/your-thing/.vscode/settings.json
/your-thing/bld
/your-thing/bld.bat
/your-thing/lib
/your-thing/lib/bld
/your-thing/lib/bld/bld-wrapper.jar
/your-thing/lib/bld/bld-wrapper.properties
/your-thing/lib/compile
/your-thing/lib/compile/modules
/your-thing/lib/provided
/your-thing/lib/provided/modules
/your-thing/lib/runtime
/your-thing/lib/runtime/modules
/your-thing/lib/test
/your-thing/lib/test/modules
/your-thing/src
/your-thing/src/bld
/your-thing/src/bld/java
/your-thing/src/bld/java/org
/your-thing/src/bld/java/org/stuff
/your-thing/src/bld/java/org/stuff/YourThingBuild.java
/your-thing/src/bld/resources
/your-thing/src/main
/your-thing/src/main/java
/your-thing/src/main/java/org
/your-thing/src/main/java/org/stuff
/your-thing/src/main/java/org/stuff/YourThingMain.java
/your-thing/src/main/resources
/your-thing/src/main/resources/templates
/your-thing/src/test
/your-thing/src/test/java
/your-thing/src/test/java/org
/your-thing/src/test/java/org/stuff
/your-thing/src/test/java/org/stuff/YourThingTest.java
/your-thing/src/test/resources""",
FileUtils.generateDirectoryListing(tmp));
var compile_operation = new CompileOperation() {
@ -327,7 +329,8 @@ public class TestCreateAppOperation {
var create_operation = new CreateAppOperation()
.workDirectory(tmp)
.packageName("com.example")
.projectName("myapp")
.projectName("my-app")
.baseName("MyApp")
.downloadDependencies(true);
create_operation.execute();
@ -350,88 +353,87 @@ public class TestCreateAppOperation {
var compile_operation = new CompileOperation().fromProject(create_operation.project());
compile_operation.execute();
assertTrue(compile_operation.diagnostics().isEmpty());
System.out.println(FileUtils.generateDirectoryListing(tmp));
assertTrue(Pattern.compile("""
/myapp
/myapp/\\.gitignore
/myapp/\\.idea
/myapp/\\.idea/app\\.iml
/myapp/\\.idea/bld\\.iml
/myapp/\\.idea/libraries
/myapp/\\.idea/libraries/bld\\.xml
/myapp/\\.idea/libraries/compile\\.xml
/myapp/\\.idea/libraries/runtime\\.xml
/myapp/\\.idea/libraries/test\\.xml
/myapp/\\.idea/misc\\.xml
/myapp/\\.idea/modules\\.xml
/myapp/\\.idea/runConfigurations
/myapp/\\.idea/runConfigurations/Run Main\\.xml
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
/myapp/\\.vscode
/myapp/\\.vscode/launch\\.json
/myapp/\\.vscode/settings\\.json
/myapp/bld
/myapp/bld\\.bat
/myapp/build
/myapp/build/main
/myapp/build/main/com
/myapp/build/main/com/example
/myapp/build/main/com/example/MyappMain\\.class
/myapp/build/test
/myapp/build/test/com
/myapp/build/test/com/example
/myapp/build/test/com/example/MyappTest\\.class
/myapp/lib
/myapp/lib/bld
/myapp/lib/bld/bld-wrapper\\.jar
/myapp/lib/bld/bld-wrapper\\.properties
/myapp/lib/compile
/myapp/lib/compile/modules
/myapp/lib/local
/myapp/lib/local/apiguardian-api-1\\.1\\.2-sources\\.jar
/myapp/lib/local/apiguardian-api-1\\.1\\.2\\.jar
/myapp/lib/local/junit-jupiter-5\\.11\\.0-sources\\.jar
/myapp/lib/local/junit-jupiter-5\\.11\\.0\\.jar
/myapp/lib/local/junit-jupiter-api-5\\.11\\.0-sources\\.jar
/myapp/lib/local/junit-jupiter-api-5\\.11\\.0\\.jar
/myapp/lib/local/junit-jupiter-engine-5\\.11\\.0-sources\\.jar
/myapp/lib/local/junit-jupiter-engine-5\\.11\\.0\\.jar
/myapp/lib/local/junit-jupiter-params-5\\.11\\.0-sources\\.jar
/myapp/lib/local/junit-jupiter-params-5\\.11\\.0\\.jar
/myapp/lib/local/junit-platform-commons-1\\.11\\.0-sources\\.jar
/myapp/lib/local/junit-platform-commons-1\\.11\\.0\\.jar
/myapp/lib/local/junit-platform-console-standalone-1\\.11\\.0-sources\\.jar
/myapp/lib/local/junit-platform-console-standalone-1\\.11\\.0\\.jar
/myapp/lib/local/junit-platform-engine-1\\.11\\.0-sources\\.jar
/myapp/lib/local/junit-platform-engine-1\\.11\\.0\\.jar
/myapp/lib/local/opentest4j-1\\.3\\.0-sources\\.jar
/myapp/lib/local/opentest4j-1\\.3\\.0\\.jar
/myapp/lib/provided
/myapp/lib/provided/modules
/myapp/lib/runtime
/myapp/lib/runtime/modules
/myapp/lib/test
/myapp/lib/test/modules
/myapp/src
/myapp/src/bld
/myapp/src/bld/java
/myapp/src/bld/java/com
/myapp/src/bld/java/com/example
/myapp/src/bld/java/com/example/MyappBuild\\.java
/myapp/src/bld/resources
/myapp/src/main
/myapp/src/main/java
/myapp/src/main/java/com
/myapp/src/main/java/com/example
/myapp/src/main/java/com/example/MyappMain\\.java
/myapp/src/main/resources
/myapp/src/main/resources/templates
/myapp/src/test
/myapp/src/test/java
/myapp/src/test/java/com
/myapp/src/test/java/com/example
/myapp/src/test/java/com/example/MyappTest\\.java
/myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
/my-app
/my-app/\\.gitignore
/my-app/\\.idea
/my-app/\\.idea/app\\.iml
/my-app/\\.idea/bld\\.iml
/my-app/\\.idea/libraries
/my-app/\\.idea/libraries/bld\\.xml
/my-app/\\.idea/libraries/compile\\.xml
/my-app/\\.idea/libraries/runtime\\.xml
/my-app/\\.idea/libraries/test\\.xml
/my-app/\\.idea/misc\\.xml
/my-app/\\.idea/modules\\.xml
/my-app/\\.idea/runConfigurations
/my-app/\\.idea/runConfigurations/Run Main\\.xml
/my-app/\\.idea/runConfigurations/Run Tests\\.xml
/my-app/\\.vscode
/my-app/\\.vscode/launch\\.json
/my-app/\\.vscode/settings\\.json
/my-app/bld
/my-app/bld\\.bat
/my-app/build
/my-app/build/main
/my-app/build/main/com
/my-app/build/main/com/example
/my-app/build/main/com/example/MyAppMain\\.class
/my-app/build/test
/my-app/build/test/com
/my-app/build/test/com/example
/my-app/build/test/com/example/MyAppTest\\.class
/my-app/lib
/my-app/lib/bld
/my-app/lib/bld/bld-wrapper\\.jar
/my-app/lib/bld/bld-wrapper\\.properties
/my-app/lib/compile
/my-app/lib/compile/modules
/my-app/lib/local
/my-app/lib/local/apiguardian-api-1\\.1\\.2-sources\\.jar
/my-app/lib/local/apiguardian-api-1\\.1\\.2\\.jar
/my-app/lib/local/junit-jupiter-5\\.11\\.0-sources\\.jar
/my-app/lib/local/junit-jupiter-5\\.11\\.0\\.jar
/my-app/lib/local/junit-jupiter-api-5\\.11\\.0-sources\\.jar
/my-app/lib/local/junit-jupiter-api-5\\.11\\.0\\.jar
/my-app/lib/local/junit-jupiter-engine-5\\.11\\.0-sources\\.jar
/my-app/lib/local/junit-jupiter-engine-5\\.11\\.0\\.jar
/my-app/lib/local/junit-jupiter-params-5\\.11\\.0-sources\\.jar
/my-app/lib/local/junit-jupiter-params-5\\.11\\.0\\.jar
/my-app/lib/local/junit-platform-commons-1\\.11\\.0-sources\\.jar
/my-app/lib/local/junit-platform-commons-1\\.11\\.0\\.jar
/my-app/lib/local/junit-platform-console-standalone-1\\.11\\.0-sources\\.jar
/my-app/lib/local/junit-platform-console-standalone-1\\.11\\.0\\.jar
/my-app/lib/local/junit-platform-engine-1\\.11\\.0-sources\\.jar
/my-app/lib/local/junit-platform-engine-1\\.11\\.0\\.jar
/my-app/lib/local/opentest4j-1\\.3\\.0-sources\\.jar
/my-app/lib/local/opentest4j-1\\.3\\.0\\.jar
/my-app/lib/provided
/my-app/lib/provided/modules
/my-app/lib/runtime
/my-app/lib/runtime/modules
/my-app/lib/test
/my-app/lib/test/modules
/my-app/src
/my-app/src/bld
/my-app/src/bld/java
/my-app/src/bld/java/com
/my-app/src/bld/java/com/example
/my-app/src/bld/java/com/example/MyAppBuild\\.java
/my-app/src/bld/resources
/my-app/src/main
/my-app/src/main/java
/my-app/src/main/java/com
/my-app/src/main/java/com/example
/my-app/src/main/java/com/example/MyAppMain\\.java
/my-app/src/main/resources
/my-app/src/main/resources/templates
/my-app/src/test
/my-app/src/test/java
/my-app/src/test/java/com
/my-app/src/test/java/com/example
/my-app/src/test/java/com/example/MyAppTest\\.java
/my-app/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
var check_result = new StringBuilder();
new RunOperation()
@ -455,7 +457,8 @@ public class TestCreateAppOperation {
var create_operation = new CreateAppOperation()
.workDirectory(tmp)
.packageName("com.example")
.projectName("myapp")
.projectName("my-app")
.baseName("MyApp")
.downloadDependencies(true);
create_operation.execute();
@ -477,87 +480,87 @@ public class TestCreateAppOperation {
compile_operation.execute();
assertTrue(compile_operation.diagnostics().isEmpty());
assertTrue(Pattern.compile("""
/myapp
/myapp/\\.gitignore
/myapp/\\.idea
/myapp/\\.idea/app\\.iml
/myapp/\\.idea/bld\\.iml
/myapp/\\.idea/libraries
/myapp/\\.idea/libraries/bld\\.xml
/myapp/\\.idea/libraries/compile\\.xml
/myapp/\\.idea/libraries/runtime\\.xml
/myapp/\\.idea/libraries/test\\.xml
/myapp/\\.idea/misc\\.xml
/myapp/\\.idea/modules\\.xml
/myapp/\\.idea/runConfigurations
/myapp/\\.idea/runConfigurations/Run Main\\.xml
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
/myapp/\\.vscode
/myapp/\\.vscode/launch\\.json
/myapp/\\.vscode/settings\\.json
/myapp/bld
/myapp/bld\\.bat
/myapp/build
/myapp/build/main
/myapp/build/main/com
/myapp/build/main/com/example
/myapp/build/main/com/example/MyappMain\\.class
/myapp/build/test
/myapp/build/test/com
/myapp/build/test/com/example
/myapp/build/test/com/example/MyappTest\\.class
/myapp/lib
/myapp/lib/bld
/myapp/lib/bld/bld-wrapper\\.jar
/myapp/lib/bld/bld-wrapper\\.properties
/myapp/lib/compile
/myapp/lib/compile/modules
/myapp/lib/local_compile
/myapp/lib/local_test
/myapp/lib/local_test/apiguardian-api-1\\.1\\.2-sources\\.jar
/myapp/lib/local_test/apiguardian-api-1\\.1\\.2\\.jar
/myapp/lib/local_test/junit-jupiter-5\\.11\\.0-sources\\.jar
/myapp/lib/local_test/junit-jupiter-5\\.11\\.0\\.jar
/myapp/lib/local_test/junit-jupiter-api-5\\.11\\.0-sources\\.jar
/myapp/lib/local_test/junit-jupiter-api-5\\.11\\.0\\.jar
/myapp/lib/local_test/junit-jupiter-engine-5\\.11\\.0-sources\\.jar
/myapp/lib/local_test/junit-jupiter-engine-5\\.11\\.0\\.jar
/myapp/lib/local_test/junit-jupiter-params-5\\.11\\.0-sources\\.jar
/myapp/lib/local_test/junit-jupiter-params-5\\.11\\.0\\.jar
/myapp/lib/local_test/junit-platform-commons-1\\.11\\.0-sources\\.jar
/myapp/lib/local_test/junit-platform-commons-1\\.11\\.0\\.jar
/myapp/lib/local_test/junit-platform-console-standalone-1\\.11\\.0-sources\\.jar
/myapp/lib/local_test/junit-platform-console-standalone-1\\.11\\.0\\.jar
/myapp/lib/local_test/junit-platform-engine-1\\.11\\.0-sources\\.jar
/myapp/lib/local_test/junit-platform-engine-1\\.11\\.0\\.jar
/myapp/lib/local_test/opentest4j-1\\.3\\.0-sources\\.jar
/myapp/lib/local_test/opentest4j-1\\.3\\.0\\.jar
/myapp/lib/provided
/myapp/lib/provided/modules
/myapp/lib/runtime
/myapp/lib/runtime/modules
/myapp/lib/test
/myapp/lib/test/modules
/myapp/src
/myapp/src/bld
/myapp/src/bld/java
/myapp/src/bld/java/com
/myapp/src/bld/java/com/example
/myapp/src/bld/java/com/example/MyappBuild\\.java
/myapp/src/bld/resources
/myapp/src/main
/myapp/src/main/java
/myapp/src/main/java/com
/myapp/src/main/java/com/example
/myapp/src/main/java/com/example/MyappMain\\.java
/myapp/src/main/resources
/myapp/src/main/resources/templates
/myapp/src/test
/myapp/src/test/java
/myapp/src/test/java/com
/myapp/src/test/java/com/example
/myapp/src/test/java/com/example/MyappTest\\.java
/myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
/my-app
/my-app/\\.gitignore
/my-app/\\.idea
/my-app/\\.idea/app\\.iml
/my-app/\\.idea/bld\\.iml
/my-app/\\.idea/libraries
/my-app/\\.idea/libraries/bld\\.xml
/my-app/\\.idea/libraries/compile\\.xml
/my-app/\\.idea/libraries/runtime\\.xml
/my-app/\\.idea/libraries/test\\.xml
/my-app/\\.idea/misc\\.xml
/my-app/\\.idea/modules\\.xml
/my-app/\\.idea/runConfigurations
/my-app/\\.idea/runConfigurations/Run Main\\.xml
/my-app/\\.idea/runConfigurations/Run Tests\\.xml
/my-app/\\.vscode
/my-app/\\.vscode/launch\\.json
/my-app/\\.vscode/settings\\.json
/my-app/bld
/my-app/bld\\.bat
/my-app/build
/my-app/build/main
/my-app/build/main/com
/my-app/build/main/com/example
/my-app/build/main/com/example/MyAppMain\\.class
/my-app/build/test
/my-app/build/test/com
/my-app/build/test/com/example
/my-app/build/test/com/example/MyAppTest\\.class
/my-app/lib
/my-app/lib/bld
/my-app/lib/bld/bld-wrapper\\.jar
/my-app/lib/bld/bld-wrapper\\.properties
/my-app/lib/compile
/my-app/lib/compile/modules
/my-app/lib/local_compile
/my-app/lib/local_test
/my-app/lib/local_test/apiguardian-api-1\\.1\\.2-sources\\.jar
/my-app/lib/local_test/apiguardian-api-1\\.1\\.2\\.jar
/my-app/lib/local_test/junit-jupiter-5\\.11\\.0-sources\\.jar
/my-app/lib/local_test/junit-jupiter-5\\.11\\.0\\.jar
/my-app/lib/local_test/junit-jupiter-api-5\\.11\\.0-sources\\.jar
/my-app/lib/local_test/junit-jupiter-api-5\\.11\\.0\\.jar
/my-app/lib/local_test/junit-jupiter-engine-5\\.11\\.0-sources\\.jar
/my-app/lib/local_test/junit-jupiter-engine-5\\.11\\.0\\.jar
/my-app/lib/local_test/junit-jupiter-params-5\\.11\\.0-sources\\.jar
/my-app/lib/local_test/junit-jupiter-params-5\\.11\\.0\\.jar
/my-app/lib/local_test/junit-platform-commons-1\\.11\\.0-sources\\.jar
/my-app/lib/local_test/junit-platform-commons-1\\.11\\.0\\.jar
/my-app/lib/local_test/junit-platform-console-standalone-1\\.11\\.0-sources\\.jar
/my-app/lib/local_test/junit-platform-console-standalone-1\\.11\\.0\\.jar
/my-app/lib/local_test/junit-platform-engine-1\\.11\\.0-sources\\.jar
/my-app/lib/local_test/junit-platform-engine-1\\.11\\.0\\.jar
/my-app/lib/local_test/opentest4j-1\\.3\\.0-sources\\.jar
/my-app/lib/local_test/opentest4j-1\\.3\\.0\\.jar
/my-app/lib/provided
/my-app/lib/provided/modules
/my-app/lib/runtime
/my-app/lib/runtime/modules
/my-app/lib/test
/my-app/lib/test/modules
/my-app/src
/my-app/src/bld
/my-app/src/bld/java
/my-app/src/bld/java/com
/my-app/src/bld/java/com/example
/my-app/src/bld/java/com/example/MyAppBuild\\.java
/my-app/src/bld/resources
/my-app/src/main
/my-app/src/main/java
/my-app/src/main/java/com
/my-app/src/main/java/com/example
/my-app/src/main/java/com/example/MyAppMain\\.java
/my-app/src/main/resources
/my-app/src/main/resources/templates
/my-app/src/test
/my-app/src/test/java
/my-app/src/test/java/com
/my-app/src/test/java/com/example
/my-app/src/test/java/com/example/MyAppTest\\.java
/my-app/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
var check_result = new StringBuilder();
new RunOperation()

View file

@ -58,129 +58,130 @@ public class TestCreateBaseOperation {
var create_operation = new CreateBaseOperation()
.workDirectory(tmp)
.packageName("com.example")
.projectName("myapp")
.projectName("my-app")
.baseName("MyApp")
.downloadDependencies(true);
create_operation.execute();
assertTrue(Pattern.compile("""
/myapp
/myapp/\\.gitignore
/myapp/\\.idea
/myapp/\\.idea/app\\.iml
/myapp/\\.idea/bld\\.iml
/myapp/\\.idea/libraries
/myapp/\\.idea/libraries/bld\\.xml
/myapp/\\.idea/libraries/compile\\.xml
/myapp/\\.idea/libraries/runtime\\.xml
/myapp/\\.idea/libraries/test\\.xml
/myapp/\\.idea/misc\\.xml
/myapp/\\.idea/modules\\.xml
/myapp/\\.idea/runConfigurations
/myapp/\\.idea/runConfigurations/Run Main\\.xml
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
/myapp/\\.vscode
/myapp/\\.vscode/launch\\.json
/myapp/\\.vscode/settings\\.json
/myapp/bld
/myapp/bld\\.bat
/myapp/lib
/myapp/lib/bld
/myapp/lib/bld/bld-wrapper\\.jar
/myapp/lib/bld/bld-wrapper\\.properties
/myapp/lib/compile
/myapp/lib/compile/modules
/myapp/lib/provided
/myapp/lib/provided/modules
/myapp/lib/runtime
/myapp/lib/runtime/modules
/myapp/lib/test
/myapp/lib/test/modules
/myapp/src
/myapp/src/bld
/myapp/src/bld/java
/myapp/src/bld/java/com
/myapp/src/bld/java/com/example
/myapp/src/bld/java/com/example/MyappBuild\\.java
/myapp/src/bld/resources
/myapp/src/main
/myapp/src/main/java
/myapp/src/main/java/com
/myapp/src/main/java/com/example
/myapp/src/main/java/com/example/MyappMain\\.java
/myapp/src/main/resources
/myapp/src/main/resources/templates
/myapp/src/test
/myapp/src/test/java
/myapp/src/test/java/com
/myapp/src/test/java/com/example
/myapp/src/test/java/com/example/MyappTest\\.java
/myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
/my-app
/my-app/\\.gitignore
/my-app/\\.idea
/my-app/\\.idea/app\\.iml
/my-app/\\.idea/bld\\.iml
/my-app/\\.idea/libraries
/my-app/\\.idea/libraries/bld\\.xml
/my-app/\\.idea/libraries/compile\\.xml
/my-app/\\.idea/libraries/runtime\\.xml
/my-app/\\.idea/libraries/test\\.xml
/my-app/\\.idea/misc\\.xml
/my-app/\\.idea/modules\\.xml
/my-app/\\.idea/runConfigurations
/my-app/\\.idea/runConfigurations/Run Main\\.xml
/my-app/\\.idea/runConfigurations/Run Tests\\.xml
/my-app/\\.vscode
/my-app/\\.vscode/launch\\.json
/my-app/\\.vscode/settings\\.json
/my-app/bld
/my-app/bld\\.bat
/my-app/lib
/my-app/lib/bld
/my-app/lib/bld/bld-wrapper\\.jar
/my-app/lib/bld/bld-wrapper\\.properties
/my-app/lib/compile
/my-app/lib/compile/modules
/my-app/lib/provided
/my-app/lib/provided/modules
/my-app/lib/runtime
/my-app/lib/runtime/modules
/my-app/lib/test
/my-app/lib/test/modules
/my-app/src
/my-app/src/bld
/my-app/src/bld/java
/my-app/src/bld/java/com
/my-app/src/bld/java/com/example
/my-app/src/bld/java/com/example/MyAppBuild\\.java
/my-app/src/bld/resources
/my-app/src/main
/my-app/src/main/java
/my-app/src/main/java/com
/my-app/src/main/java/com/example
/my-app/src/main/java/com/example/MyAppMain\\.java
/my-app/src/main/resources
/my-app/src/main/resources/templates
/my-app/src/test
/my-app/src/test/java
/my-app/src/test/java/com
/my-app/src/test/java/com/example
/my-app/src/test/java/com/example/MyAppTest\\.java
/my-app/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
var compile_operation = new CompileOperation().fromProject(create_operation.project());
compile_operation.execute();
assertTrue(compile_operation.diagnostics().isEmpty());
assertTrue(Pattern.compile("""
/myapp
/myapp/\\.gitignore
/myapp/\\.idea
/myapp/\\.idea/app\\.iml
/myapp/\\.idea/bld\\.iml
/myapp/\\.idea/libraries
/myapp/\\.idea/libraries/bld\\.xml
/myapp/\\.idea/libraries/compile\\.xml
/myapp/\\.idea/libraries/runtime\\.xml
/myapp/\\.idea/libraries/test\\.xml
/myapp/\\.idea/misc\\.xml
/myapp/\\.idea/modules\\.xml
/myapp/\\.idea/runConfigurations
/myapp/\\.idea/runConfigurations/Run Main\\.xml
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
/myapp/\\.vscode
/myapp/\\.vscode/launch\\.json
/myapp/\\.vscode/settings\\.json
/myapp/bld
/myapp/bld\\.bat
/myapp/build
/myapp/build/main
/myapp/build/main/com
/myapp/build/main/com/example
/myapp/build/main/com/example/MyappMain\\.class
/myapp/build/test
/myapp/build/test/com
/myapp/build/test/com/example
/myapp/build/test/com/example/MyappTest\\.class
/myapp/lib
/myapp/lib/bld
/myapp/lib/bld/bld-wrapper\\.jar
/myapp/lib/bld/bld-wrapper\\.properties
/myapp/lib/compile
/myapp/lib/compile/modules
/myapp/lib/provided
/myapp/lib/provided/modules
/myapp/lib/runtime
/myapp/lib/runtime/modules
/myapp/lib/test
/myapp/lib/test/modules
/myapp/src
/myapp/src/bld
/myapp/src/bld/java
/myapp/src/bld/java/com
/myapp/src/bld/java/com/example
/myapp/src/bld/java/com/example/MyappBuild\\.java
/myapp/src/bld/resources
/myapp/src/main
/myapp/src/main/java
/myapp/src/main/java/com
/myapp/src/main/java/com/example
/myapp/src/main/java/com/example/MyappMain\\.java
/myapp/src/main/resources
/myapp/src/main/resources/templates
/myapp/src/test
/myapp/src/test/java
/myapp/src/test/java/com
/myapp/src/test/java/com/example
/myapp/src/test/java/com/example/MyappTest\\.java
/myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
/my-app
/my-app/\\.gitignore
/my-app/\\.idea
/my-app/\\.idea/app\\.iml
/my-app/\\.idea/bld\\.iml
/my-app/\\.idea/libraries
/my-app/\\.idea/libraries/bld\\.xml
/my-app/\\.idea/libraries/compile\\.xml
/my-app/\\.idea/libraries/runtime\\.xml
/my-app/\\.idea/libraries/test\\.xml
/my-app/\\.idea/misc\\.xml
/my-app/\\.idea/modules\\.xml
/my-app/\\.idea/runConfigurations
/my-app/\\.idea/runConfigurations/Run Main\\.xml
/my-app/\\.idea/runConfigurations/Run Tests\\.xml
/my-app/\\.vscode
/my-app/\\.vscode/launch\\.json
/my-app/\\.vscode/settings\\.json
/my-app/bld
/my-app/bld\\.bat
/my-app/build
/my-app/build/main
/my-app/build/main/com
/my-app/build/main/com/example
/my-app/build/main/com/example/MyAppMain\\.class
/my-app/build/test
/my-app/build/test/com
/my-app/build/test/com/example
/my-app/build/test/com/example/MyAppTest\\.class
/my-app/lib
/my-app/lib/bld
/my-app/lib/bld/bld-wrapper\\.jar
/my-app/lib/bld/bld-wrapper\\.properties
/my-app/lib/compile
/my-app/lib/compile/modules
/my-app/lib/provided
/my-app/lib/provided/modules
/my-app/lib/runtime
/my-app/lib/runtime/modules
/my-app/lib/test
/my-app/lib/test/modules
/my-app/src
/my-app/src/bld
/my-app/src/bld/java
/my-app/src/bld/java/com
/my-app/src/bld/java/com/example
/my-app/src/bld/java/com/example/MyAppBuild\\.java
/my-app/src/bld/resources
/my-app/src/main
/my-app/src/main/java
/my-app/src/main/java/com
/my-app/src/main/java/com/example
/my-app/src/main/java/com/example/MyAppMain\\.java
/my-app/src/main/resources
/my-app/src/main/resources/templates
/my-app/src/test
/my-app/src/test/java
/my-app/src/test/java/com
/my-app/src/test/java/com/example
/my-app/src/test/java/com/example/MyAppTest\\.java
/my-app/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
var check_result = new StringBuilder();
new RunOperation()
@ -204,129 +205,130 @@ public class TestCreateBaseOperation {
var create_operation = new CreateBaseOperation()
.workDirectory(tmp)
.packageName("org.stuff")
.projectName("yourthing");
.projectName("your-thing")
.baseName("YourThing");
create_operation.execute();
assertEquals("""
/yourthing
/yourthing/.gitignore
/yourthing/.idea
/yourthing/.idea/app.iml
/yourthing/.idea/bld.iml
/yourthing/.idea/libraries
/yourthing/.idea/libraries/bld.xml
/yourthing/.idea/libraries/compile.xml
/yourthing/.idea/libraries/runtime.xml
/yourthing/.idea/libraries/test.xml
/yourthing/.idea/misc.xml
/yourthing/.idea/modules.xml
/yourthing/.idea/runConfigurations
/yourthing/.idea/runConfigurations/Run Main.xml
/yourthing/.idea/runConfigurations/Run Tests.xml
/yourthing/.vscode
/yourthing/.vscode/launch.json
/yourthing/.vscode/settings.json
/yourthing/bld
/yourthing/bld.bat
/yourthing/lib
/yourthing/lib/bld
/yourthing/lib/bld/bld-wrapper.jar
/yourthing/lib/bld/bld-wrapper.properties
/yourthing/lib/compile
/yourthing/lib/compile/modules
/yourthing/lib/provided
/yourthing/lib/provided/modules
/yourthing/lib/runtime
/yourthing/lib/runtime/modules
/yourthing/lib/test
/yourthing/lib/test/modules
/yourthing/src
/yourthing/src/bld
/yourthing/src/bld/java
/yourthing/src/bld/java/org
/yourthing/src/bld/java/org/stuff
/yourthing/src/bld/java/org/stuff/YourthingBuild.java
/yourthing/src/bld/resources
/yourthing/src/main
/yourthing/src/main/java
/yourthing/src/main/java/org
/yourthing/src/main/java/org/stuff
/yourthing/src/main/java/org/stuff/YourthingMain.java
/yourthing/src/main/resources
/yourthing/src/main/resources/templates
/yourthing/src/test
/yourthing/src/test/java
/yourthing/src/test/java/org
/yourthing/src/test/java/org/stuff
/yourthing/src/test/java/org/stuff/YourthingTest.java
/yourthing/src/test/resources""",
/your-thing
/your-thing/.gitignore
/your-thing/.idea
/your-thing/.idea/app.iml
/your-thing/.idea/bld.iml
/your-thing/.idea/libraries
/your-thing/.idea/libraries/bld.xml
/your-thing/.idea/libraries/compile.xml
/your-thing/.idea/libraries/runtime.xml
/your-thing/.idea/libraries/test.xml
/your-thing/.idea/misc.xml
/your-thing/.idea/modules.xml
/your-thing/.idea/runConfigurations
/your-thing/.idea/runConfigurations/Run Main.xml
/your-thing/.idea/runConfigurations/Run Tests.xml
/your-thing/.vscode
/your-thing/.vscode/launch.json
/your-thing/.vscode/settings.json
/your-thing/bld
/your-thing/bld.bat
/your-thing/lib
/your-thing/lib/bld
/your-thing/lib/bld/bld-wrapper.jar
/your-thing/lib/bld/bld-wrapper.properties
/your-thing/lib/compile
/your-thing/lib/compile/modules
/your-thing/lib/provided
/your-thing/lib/provided/modules
/your-thing/lib/runtime
/your-thing/lib/runtime/modules
/your-thing/lib/test
/your-thing/lib/test/modules
/your-thing/src
/your-thing/src/bld
/your-thing/src/bld/java
/your-thing/src/bld/java/org
/your-thing/src/bld/java/org/stuff
/your-thing/src/bld/java/org/stuff/YourThingBuild.java
/your-thing/src/bld/resources
/your-thing/src/main
/your-thing/src/main/java
/your-thing/src/main/java/org
/your-thing/src/main/java/org/stuff
/your-thing/src/main/java/org/stuff/YourThingMain.java
/your-thing/src/main/resources
/your-thing/src/main/resources/templates
/your-thing/src/test
/your-thing/src/test/java
/your-thing/src/test/java/org
/your-thing/src/test/java/org/stuff
/your-thing/src/test/java/org/stuff/YourThingTest.java
/your-thing/src/test/resources""",
FileUtils.generateDirectoryListing(tmp));
var compile_operation = new CompileOperation().fromProject(create_operation.project());
compile_operation.execute();
assertTrue(compile_operation.diagnostics().isEmpty());
assertEquals("""
/yourthing
/yourthing/.gitignore
/yourthing/.idea
/yourthing/.idea/app.iml
/yourthing/.idea/bld.iml
/yourthing/.idea/libraries
/yourthing/.idea/libraries/bld.xml
/yourthing/.idea/libraries/compile.xml
/yourthing/.idea/libraries/runtime.xml
/yourthing/.idea/libraries/test.xml
/yourthing/.idea/misc.xml
/yourthing/.idea/modules.xml
/yourthing/.idea/runConfigurations
/yourthing/.idea/runConfigurations/Run Main.xml
/yourthing/.idea/runConfigurations/Run Tests.xml
/yourthing/.vscode
/yourthing/.vscode/launch.json
/yourthing/.vscode/settings.json
/yourthing/bld
/yourthing/bld.bat
/yourthing/build
/yourthing/build/main
/yourthing/build/main/org
/yourthing/build/main/org/stuff
/yourthing/build/main/org/stuff/YourthingMain.class
/yourthing/build/test
/yourthing/build/test/org
/yourthing/build/test/org/stuff
/yourthing/build/test/org/stuff/YourthingTest.class
/yourthing/lib
/yourthing/lib/bld
/yourthing/lib/bld/bld-wrapper.jar
/yourthing/lib/bld/bld-wrapper.properties
/yourthing/lib/compile
/yourthing/lib/compile/modules
/yourthing/lib/provided
/yourthing/lib/provided/modules
/yourthing/lib/runtime
/yourthing/lib/runtime/modules
/yourthing/lib/test
/yourthing/lib/test/modules
/yourthing/src
/yourthing/src/bld
/yourthing/src/bld/java
/yourthing/src/bld/java/org
/yourthing/src/bld/java/org/stuff
/yourthing/src/bld/java/org/stuff/YourthingBuild.java
/yourthing/src/bld/resources
/yourthing/src/main
/yourthing/src/main/java
/yourthing/src/main/java/org
/yourthing/src/main/java/org/stuff
/yourthing/src/main/java/org/stuff/YourthingMain.java
/yourthing/src/main/resources
/yourthing/src/main/resources/templates
/yourthing/src/test
/yourthing/src/test/java
/yourthing/src/test/java/org
/yourthing/src/test/java/org/stuff
/yourthing/src/test/java/org/stuff/YourthingTest.java
/yourthing/src/test/resources""",
/your-thing
/your-thing/.gitignore
/your-thing/.idea
/your-thing/.idea/app.iml
/your-thing/.idea/bld.iml
/your-thing/.idea/libraries
/your-thing/.idea/libraries/bld.xml
/your-thing/.idea/libraries/compile.xml
/your-thing/.idea/libraries/runtime.xml
/your-thing/.idea/libraries/test.xml
/your-thing/.idea/misc.xml
/your-thing/.idea/modules.xml
/your-thing/.idea/runConfigurations
/your-thing/.idea/runConfigurations/Run Main.xml
/your-thing/.idea/runConfigurations/Run Tests.xml
/your-thing/.vscode
/your-thing/.vscode/launch.json
/your-thing/.vscode/settings.json
/your-thing/bld
/your-thing/bld.bat
/your-thing/build
/your-thing/build/main
/your-thing/build/main/org
/your-thing/build/main/org/stuff
/your-thing/build/main/org/stuff/YourThingMain.class
/your-thing/build/test
/your-thing/build/test/org
/your-thing/build/test/org/stuff
/your-thing/build/test/org/stuff/YourThingTest.class
/your-thing/lib
/your-thing/lib/bld
/your-thing/lib/bld/bld-wrapper.jar
/your-thing/lib/bld/bld-wrapper.properties
/your-thing/lib/compile
/your-thing/lib/compile/modules
/your-thing/lib/provided
/your-thing/lib/provided/modules
/your-thing/lib/runtime
/your-thing/lib/runtime/modules
/your-thing/lib/test
/your-thing/lib/test/modules
/your-thing/src
/your-thing/src/bld
/your-thing/src/bld/java
/your-thing/src/bld/java/org
/your-thing/src/bld/java/org/stuff
/your-thing/src/bld/java/org/stuff/YourThingBuild.java
/your-thing/src/bld/resources
/your-thing/src/main
/your-thing/src/main/java
/your-thing/src/main/java/org
/your-thing/src/main/java/org/stuff
/your-thing/src/main/java/org/stuff/YourThingMain.java
/your-thing/src/main/resources
/your-thing/src/main/resources/templates
/your-thing/src/test
/your-thing/src/test/java
/your-thing/src/test/java/org
/your-thing/src/test/java/org/stuff
/your-thing/src/test/java/org/stuff/YourThingTest.java
/your-thing/src/test/resources""",
FileUtils.generateDirectoryListing(tmp));
var check_result = new StringBuilder();

View file

@ -58,163 +58,164 @@ public class TestCreateLibOperation {
var create_operation = new CreateLibOperation()
.workDirectory(tmp)
.packageName("com.example")
.projectName("myapp")
.projectName("my-app")
.baseName("MyApp")
.downloadDependencies(true);
create_operation.execute();
assertTrue(Pattern.compile("""
/myapp
/myapp/\\.gitignore
/myapp/\\.idea
/myapp/\\.idea/app\\.iml
/myapp/\\.idea/bld\\.iml
/myapp/\\.idea/libraries
/myapp/\\.idea/libraries/bld\\.xml
/myapp/\\.idea/libraries/compile\\.xml
/myapp/\\.idea/libraries/runtime\\.xml
/myapp/\\.idea/libraries/test\\.xml
/myapp/\\.idea/misc\\.xml
/myapp/\\.idea/modules\\.xml
/myapp/\\.idea/runConfigurations
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
/myapp/\\.vscode
/myapp/\\.vscode/launch\\.json
/myapp/\\.vscode/settings\\.json
/myapp/bld
/myapp/bld\\.bat
/myapp/lib
/myapp/lib/bld
/myapp/lib/bld/bld-wrapper\\.jar
/myapp/lib/bld/bld-wrapper\\.properties
/myapp/lib/compile
/myapp/lib/compile/modules
/myapp/lib/provided
/myapp/lib/provided/modules
/myapp/lib/runtime
/myapp/lib/runtime/modules
/myapp/lib/test
/myapp/lib/test/apiguardian-api-1\\.1\\.2-sources\\.jar
/myapp/lib/test/apiguardian-api-1\\.1\\.2\\.jar
/myapp/lib/test/junit-jupiter-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-5\\.11\\.0\\.jar
/myapp/lib/test/junit-jupiter-api-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-api-5\\.11\\.0\\.jar
/myapp/lib/test/junit-jupiter-engine-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-engine-5\\.11\\.0\\.jar
/myapp/lib/test/junit-jupiter-params-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-params-5\\.11\\.0\\.jar
/myapp/lib/test/junit-platform-commons-1\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-platform-commons-1\\.11\\.0\\.jar
/myapp/lib/test/junit-platform-console-standalone-1\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-platform-console-standalone-1\\.11\\.0\\.jar
/myapp/lib/test/junit-platform-engine-1\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-platform-engine-1\\.11\\.0\\.jar
/myapp/lib/test/modules
/myapp/lib/test/opentest4j-1\\.3\\.0-sources\\.jar
/myapp/lib/test/opentest4j-1\\.3\\.0\\.jar
/myapp/src
/myapp/src/bld
/myapp/src/bld/java
/myapp/src/bld/java/com
/myapp/src/bld/java/com/example
/myapp/src/bld/java/com/example/MyappBuild\\.java
/myapp/src/bld/resources
/myapp/src/main
/myapp/src/main/java
/myapp/src/main/java/com
/myapp/src/main/java/com/example
/myapp/src/main/java/com/example/MyappLib\\.java
/myapp/src/main/resources
/myapp/src/main/resources/templates
/myapp/src/test
/myapp/src/test/java
/myapp/src/test/java/com
/myapp/src/test/java/com/example
/myapp/src/test/java/com/example/MyappTest\\.java
/myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
/my-app
/my-app/\\.gitignore
/my-app/\\.idea
/my-app/\\.idea/app\\.iml
/my-app/\\.idea/bld\\.iml
/my-app/\\.idea/libraries
/my-app/\\.idea/libraries/bld\\.xml
/my-app/\\.idea/libraries/compile\\.xml
/my-app/\\.idea/libraries/runtime\\.xml
/my-app/\\.idea/libraries/test\\.xml
/my-app/\\.idea/misc\\.xml
/my-app/\\.idea/modules\\.xml
/my-app/\\.idea/runConfigurations
/my-app/\\.idea/runConfigurations/Run Tests\\.xml
/my-app/\\.vscode
/my-app/\\.vscode/launch\\.json
/my-app/\\.vscode/settings\\.json
/my-app/bld
/my-app/bld\\.bat
/my-app/lib
/my-app/lib/bld
/my-app/lib/bld/bld-wrapper\\.jar
/my-app/lib/bld/bld-wrapper\\.properties
/my-app/lib/compile
/my-app/lib/compile/modules
/my-app/lib/provided
/my-app/lib/provided/modules
/my-app/lib/runtime
/my-app/lib/runtime/modules
/my-app/lib/test
/my-app/lib/test/apiguardian-api-1\\.1\\.2-sources\\.jar
/my-app/lib/test/apiguardian-api-1\\.1\\.2\\.jar
/my-app/lib/test/junit-jupiter-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-5\\.11\\.0\\.jar
/my-app/lib/test/junit-jupiter-api-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-api-5\\.11\\.0\\.jar
/my-app/lib/test/junit-jupiter-engine-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-engine-5\\.11\\.0\\.jar
/my-app/lib/test/junit-jupiter-params-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-params-5\\.11\\.0\\.jar
/my-app/lib/test/junit-platform-commons-1\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-platform-commons-1\\.11\\.0\\.jar
/my-app/lib/test/junit-platform-console-standalone-1\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-platform-console-standalone-1\\.11\\.0\\.jar
/my-app/lib/test/junit-platform-engine-1\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-platform-engine-1\\.11\\.0\\.jar
/my-app/lib/test/modules
/my-app/lib/test/opentest4j-1\\.3\\.0-sources\\.jar
/my-app/lib/test/opentest4j-1\\.3\\.0\\.jar
/my-app/src
/my-app/src/bld
/my-app/src/bld/java
/my-app/src/bld/java/com
/my-app/src/bld/java/com/example
/my-app/src/bld/java/com/example/MyAppBuild\\.java
/my-app/src/bld/resources
/my-app/src/main
/my-app/src/main/java
/my-app/src/main/java/com
/my-app/src/main/java/com/example
/my-app/src/main/java/com/example/MyAppLib\\.java
/my-app/src/main/resources
/my-app/src/main/resources/templates
/my-app/src/test
/my-app/src/test/java
/my-app/src/test/java/com
/my-app/src/test/java/com/example
/my-app/src/test/java/com/example/MyAppTest\\.java
/my-app/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
var compile_operation = new CompileOperation().fromProject(create_operation.project());
compile_operation.execute();
assertTrue(compile_operation.diagnostics().isEmpty());
assertTrue(Pattern.compile("""
/myapp
/myapp/\\.gitignore
/myapp/\\.idea
/myapp/\\.idea/app\\.iml
/myapp/\\.idea/bld\\.iml
/myapp/\\.idea/libraries
/myapp/\\.idea/libraries/bld\\.xml
/myapp/\\.idea/libraries/compile\\.xml
/myapp/\\.idea/libraries/runtime\\.xml
/myapp/\\.idea/libraries/test\\.xml
/myapp/\\.idea/misc\\.xml
/myapp/\\.idea/modules\\.xml
/myapp/\\.idea/runConfigurations
/myapp/\\.idea/runConfigurations/Run Tests\\.xml
/myapp/\\.vscode
/myapp/\\.vscode/launch\\.json
/myapp/\\.vscode/settings\\.json
/myapp/bld
/myapp/bld\\.bat
/myapp/build
/myapp/build/main
/myapp/build/main/com
/myapp/build/main/com/example
/myapp/build/main/com/example/MyappLib\\.class
/myapp/build/test
/myapp/build/test/com
/myapp/build/test/com/example
/myapp/build/test/com/example/MyappTest\\.class
/myapp/lib
/myapp/lib/bld
/myapp/lib/bld/bld-wrapper\\.jar
/myapp/lib/bld/bld-wrapper\\.properties
/myapp/lib/compile
/myapp/lib/compile/modules
/myapp/lib/provided
/myapp/lib/provided/modules
/myapp/lib/runtime
/myapp/lib/runtime/modules
/myapp/lib/test
/myapp/lib/test/apiguardian-api-1\\.1\\.2-sources\\.jar
/myapp/lib/test/apiguardian-api-1\\.1\\.2\\.jar
/myapp/lib/test/junit-jupiter-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-5\\.11\\.0\\.jar
/myapp/lib/test/junit-jupiter-api-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-api-5\\.11\\.0\\.jar
/myapp/lib/test/junit-jupiter-engine-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-engine-5\\.11\\.0\\.jar
/myapp/lib/test/junit-jupiter-params-5\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-jupiter-params-5\\.11\\.0\\.jar
/myapp/lib/test/junit-platform-commons-1\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-platform-commons-1\\.11\\.0\\.jar
/myapp/lib/test/junit-platform-console-standalone-1\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-platform-console-standalone-1\\.11\\.0\\.jar
/myapp/lib/test/junit-platform-engine-1\\.11\\.0-sources\\.jar
/myapp/lib/test/junit-platform-engine-1\\.11\\.0\\.jar
/myapp/lib/test/modules
/myapp/lib/test/opentest4j-1\\.3\\.0-sources\\.jar
/myapp/lib/test/opentest4j-1\\.3\\.0\\.jar
/myapp/src
/myapp/src/bld
/myapp/src/bld/java
/myapp/src/bld/java/com
/myapp/src/bld/java/com/example
/myapp/src/bld/java/com/example/MyappBuild\\.java
/myapp/src/bld/resources
/myapp/src/main
/myapp/src/main/java
/myapp/src/main/java/com
/myapp/src/main/java/com/example
/myapp/src/main/java/com/example/MyappLib\\.java
/myapp/src/main/resources
/myapp/src/main/resources/templates
/myapp/src/test
/myapp/src/test/java
/myapp/src/test/java/com
/myapp/src/test/java/com/example
/myapp/src/test/java/com/example/MyappTest\\.java
/myapp/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
/my-app
/my-app/\\.gitignore
/my-app/\\.idea
/my-app/\\.idea/app\\.iml
/my-app/\\.idea/bld\\.iml
/my-app/\\.idea/libraries
/my-app/\\.idea/libraries/bld\\.xml
/my-app/\\.idea/libraries/compile\\.xml
/my-app/\\.idea/libraries/runtime\\.xml
/my-app/\\.idea/libraries/test\\.xml
/my-app/\\.idea/misc\\.xml
/my-app/\\.idea/modules\\.xml
/my-app/\\.idea/runConfigurations
/my-app/\\.idea/runConfigurations/Run Tests\\.xml
/my-app/\\.vscode
/my-app/\\.vscode/launch\\.json
/my-app/\\.vscode/settings\\.json
/my-app/bld
/my-app/bld\\.bat
/my-app/build
/my-app/build/main
/my-app/build/main/com
/my-app/build/main/com/example
/my-app/build/main/com/example/MyAppLib\\.class
/my-app/build/test
/my-app/build/test/com
/my-app/build/test/com/example
/my-app/build/test/com/example/MyAppTest\\.class
/my-app/lib
/my-app/lib/bld
/my-app/lib/bld/bld-wrapper\\.jar
/my-app/lib/bld/bld-wrapper\\.properties
/my-app/lib/compile
/my-app/lib/compile/modules
/my-app/lib/provided
/my-app/lib/provided/modules
/my-app/lib/runtime
/my-app/lib/runtime/modules
/my-app/lib/test
/my-app/lib/test/apiguardian-api-1\\.1\\.2-sources\\.jar
/my-app/lib/test/apiguardian-api-1\\.1\\.2\\.jar
/my-app/lib/test/junit-jupiter-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-5\\.11\\.0\\.jar
/my-app/lib/test/junit-jupiter-api-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-api-5\\.11\\.0\\.jar
/my-app/lib/test/junit-jupiter-engine-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-engine-5\\.11\\.0\\.jar
/my-app/lib/test/junit-jupiter-params-5\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-jupiter-params-5\\.11\\.0\\.jar
/my-app/lib/test/junit-platform-commons-1\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-platform-commons-1\\.11\\.0\\.jar
/my-app/lib/test/junit-platform-console-standalone-1\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-platform-console-standalone-1\\.11\\.0\\.jar
/my-app/lib/test/junit-platform-engine-1\\.11\\.0-sources\\.jar
/my-app/lib/test/junit-platform-engine-1\\.11\\.0\\.jar
/my-app/lib/test/modules
/my-app/lib/test/opentest4j-1\\.3\\.0-sources\\.jar
/my-app/lib/test/opentest4j-1\\.3\\.0\\.jar
/my-app/src
/my-app/src/bld
/my-app/src/bld/java
/my-app/src/bld/java/com
/my-app/src/bld/java/com/example
/my-app/src/bld/java/com/example/MyAppBuild\\.java
/my-app/src/bld/resources
/my-app/src/main
/my-app/src/main/java
/my-app/src/main/java/com
/my-app/src/main/java/com/example
/my-app/src/main/java/com/example/MyAppLib\\.java
/my-app/src/main/resources
/my-app/src/main/resources/templates
/my-app/src/test
/my-app/src/test/java
/my-app/src/test/java/com
/my-app/src/test/java/com/example
/my-app/src/test/java/com/example/MyAppTest\\.java
/my-app/src/test/resources""").matcher(FileUtils.generateDirectoryListing(tmp)).matches());
var check_result = new StringBuilder();
new JUnitOperation()

File diff suppressed because it is too large Load diff

View file

@ -51,8 +51,8 @@ public class TestPublishOperation {
}
static class PublishProject extends AppProjectBlueprint {
public PublishProject(File work, String packageName, String projectName, VersionNumber versionNumber) {
super(work, packageName, projectName, versionNumber);
public PublishProject(File work, String packageName, String projectName, String baseName, VersionNumber versionNumber) {
super(work, packageName, projectName, baseName, versionNumber);
javaRelease = 17;
}
}
@ -209,7 +209,7 @@ public class TestPublishOperation {
// created an updated publication
var create_operation2 = new CreateAppOperation() {
protected Project createProjectBlueprint() {
return new PublishProject(new File(workDirectory(), projectName()), packageName(), projectName(), new VersionNumber(1, 0, 0));
return new PublishProject(new File(workDirectory(), projectName()), packageName(), projectName(), baseName(), new VersionNumber(1, 0, 0));
}
}
.workDirectory(tmp2)
@ -342,7 +342,7 @@ public class TestPublishOperation {
// created an updated publication
var create_operation2 = new CreateAppOperation() {
protected Project createProjectBlueprint() {
return new PublishProject(new File(workDirectory(), projectName()), packageName(), projectName(), new VersionNumber(1, 0, 0));
return new PublishProject(new File(workDirectory(), projectName()), packageName(), projectName(), baseName(), new VersionNumber(1, 0, 0));
}
}
.workDirectory(tmp2)
@ -419,7 +419,7 @@ public class TestPublishOperation {
// create a first publication
var create_operation1 = new CreateAppOperation() {
protected Project createProjectBlueprint() {
return new PublishProject(new File(workDirectory(), projectName()), packageName(), projectName(), new VersionNumber(1, 2, 3, "SNAPSHOT"));
return new PublishProject(new File(workDirectory(), projectName()), packageName(), projectName(), baseName(), new VersionNumber(1, 2, 3, "SNAPSHOT"));
}
}
.workDirectory(tmp1)
@ -496,7 +496,7 @@ public class TestPublishOperation {
// created an updated publication
var create_operation2 = new CreateAppOperation() {
protected Project createProjectBlueprint() {
return new PublishProject(new File(workDirectory(), projectName()), packageName(), projectName(), new VersionNumber(1, 2, 3, "SNAPSHOT"));
return new PublishProject(new File(workDirectory(), projectName()), packageName(), projectName(), baseName(), new VersionNumber(1, 2, 3, "SNAPSHOT"));
}
}
.workDirectory(tmp2)
@ -589,7 +589,7 @@ public class TestPublishOperation {
// create a first publication
var create_operation1 = new CreateAppOperation() {
protected Project createProjectBlueprint() {
return new PublishProject(new File(workDirectory(), projectName()), packageName(), projectName(), new VersionNumber(1, 2, 3, "SNAPSHOT"));
return new PublishProject(new File(workDirectory(), projectName()), packageName(), projectName(), baseName(), new VersionNumber(1, 2, 3, "SNAPSHOT"));
}
}
.workDirectory(tmp1)
@ -645,7 +645,7 @@ public class TestPublishOperation {
// created an updated publication
var create_operation2 = new CreateAppOperation() {
protected Project createProjectBlueprint() {
return new PublishProject(new File(workDirectory(), projectName()), packageName(), projectName(), new VersionNumber(1, 2, 3, "SNAPSHOT"));
return new PublishProject(new File(workDirectory(), projectName()), packageName(), projectName(), baseName(), new VersionNumber(1, 2, 3, "SNAPSHOT"));
}
}
.workDirectory(tmp2)