Skip to content
Arciphant
Esc
↑↓navigate↵open⌘Jpreview
On this page

Additional settings

Base path, automatic project folder creation and qualified archive base names.

Custom base path

If your module/component structure does not start at the root project level, you can specify a base path. For example, if your application is located in a sub-project backend:

arciphant {
    basePath("backend")

    // …
}

The base path can also be a nested path (e.g. backend:my-service or backend/my-service).

In addition to the global base path, every module, library and bundle accepts its own basePath parameter. It overrides the global base path for that module:

arciphant {
    basePath("backend")

    module(name = "reporting", basePath = "backend:services", template = moduleTemplate)
}

Automatic project folder creation

By default, Arciphant creates the folder of every Gradle project it generates if it does not exist yet: in the project layout one folder per component (e.g. orders/domain), in the source set layout one folder per module (e.g. orders), plus the bundle folders. You can disable this behavior:

arciphant {
    disableProjectFolderCreation()

    // …
}

Qualified archive base name

Project layout

With Arciphant, a build typically contains multiple Gradle projects with the same name, since all modules have the same component projects. This can lead to problems when bundling module components together, since the generated jar files of those components have the same name, too. Without declaring a duplicate handling strategy in the build, this leads to an error:

Caused by: org.gradle.api.InvalidUserCodeException: Entry BOOT-INF/lib/db-plain.jar is a duplicate but no duplicate handling strategy has been set.

To overcome this issue, Arciphant automatically changes the default archiveBaseName for task org.gradle.jvm.tasks.Jar to a qualified name moduleName-componentName (e.g., in case of a component domain of module-a, the resulting base name would be module-a-domain).

If you want to disable this feature, you can do so in the Arciphant configuration:

arciphant {
    disableQualifiedArchiveBaseName()

    // …
}

This option applies only to the project layout. Arciphant rejects it in the source set layout because components produce no archives of their own there.

Was this page helpful?