apache / apache/maven-site-plugin

Default locale should be the first valid token from locales

Open
#1,226 7 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
55
Forks
50
Avg merge
2d 7h
Merged PRs (30d)
11

Description

### Affected version

3.20.0

### Bug description

### Description

Since the changes introduced in issue **#1083**, the default locale used by `site:site` is no longer the **first valid token** in the `locales` parameter.
This breaks the documented behavior and alters long‑established expectations.

According to the plugin’s [site:site documentation](https://maven.apache.org/plugins/maven-site-plugin/site-mojo.html),
`locales` is *“a comma separated list of locales to render. The **first valid token** will be the default Locale for this site.”*.

The behavior before #1083 followed this rule.
The changes introduced there should be reverted.

### Steps to Reproduce

Configure the plugin with:

```xml
fr
```

### Expected Behavior

With locales = fr, the default locale should be fr, and the default output directory should remain:
target/site/

### Actual Behavior

The generated site is placed under a locale‑specific directory:
target/site/fr/

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the site:site goal and compare the locale handling introduced in issue #1083 with the documented first-valid-token behavior. Reproduce the issue using fr; done means the default locale is fr and output remains in target/site/ rather than target/site/fr/.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.