---
title: Additional settings
description: Base path, automatic project folder creation and qualified archive base names.
icon: settings
---

## 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`:

```kotlin settings.gradle.kts {2}
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:

```kotlin settings.gradle.kts {4}
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](/component-layouts#project-layout) one folder per component (e.g. `orders/domain`), in the
[source set layout](/component-layouts#source-set-layout) one folder per module (e.g. `orders`), plus the bundle
folders. You can disable this behavior:

```kotlin settings.gradle.kts {2}
arciphant {
    disableProjectFolderCreation()

    // …
}
```

:::warning[Gradle >= 9 requires project folders to be present]
Creating folders for each project is especially important for projects using Gradle versions >= 9.
Gradle 9 requires the project folder to be present in order for the project to be configurable (which is necessary for Arciphant to work properly).
If you disable this feature, you have to create the folders of all generated projects yourself.
:::

:::note[Source set folders are not created]
Only project folders are created, never source set folders such as `src/main` or `src/<component>`. Gradle does not
require them, and in the source set layout their location may be
[customized](/component-layouts#customizing-source-directories) anyway.
:::

## Qualified archive base name

<Badge icon="package" size="sm" tooltip="Only available in the project component layout">Project layout</Badge>

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:

```text
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:

```kotlin settings.gradle.kts {2}
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.

:::warning[Duplicate name handling strategy required]
Be aware that if you disable it, you have to prevent duplicate names yourself. To solve the issue in a generic way for arbitrary Gradle projects, you can use something like this:

```kotlin build.gradle.kts
subprojects {
    tasks.withType<Jar>().configureEach {
        archiveBaseName.set(project.path.removePrefix(":").replace(':', '-'))
    }
}
```

:::
