gradle/gradle · error · IllegalArgumentException

The module notation does not respect the lock file format of

Error message

The module notation does not respect the lock file format of 'group:name:version' - received '${notation}'

What it means

Error "The module notation does not respect the lock file format of 'group:name:version' - received '${notation}'" thrown in gradle/gradle.

Source

Thrown at platforms/software/dependency-management/src/main/java/org/gradle/internal/locking/DependencyLockingNotationConverter.java:28

 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.gradle.internal.locking;

import org.gradle.api.artifacts.component.ModuleComponentIdentifier;
import org.gradle.api.internal.artifacts.DefaultModuleIdentifier;
import org.gradle.internal.component.external.model.DefaultModuleComponentIdentifier;

class DependencyLockingNotationConverter {

    ModuleComponentIdentifier convertFromLockNotation(String notation) {
        String[] parts = notation.split(":");
        if (parts.length != 3) {
            throw new IllegalArgumentException("The module notation does not respect the lock file format of 'group:name:version' - received '" + notation + "'");
        }
        return DefaultModuleComponentIdentifier.newId(DefaultModuleIdentifier.newId(parts[0], parts[1]), parts[2]);
    }

    String convertToLockNotation(ModuleComponentIdentifier id) {
        return id.getGroup() + ":" + id.getModule() + ":" + id.getVersion();
    }
}

View on GitHub (pinned to 534f27719b)

Solutions

  1. Use the exact 'group:name:version' format in the lock file entry, for example 'org.apache.commons:commons-lang3:3.12.0'.
  2. Remove the malformed entry '${notation}' from the lockfile and regenerate locks with '--write-locks'.

When it happens

Trigger: Thrown at platforms/software/dependency-management/src/main/java/org/gradle/internal/locking/DependencyLockingNotationConverter.java:28 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of gradle/gradle@534f27719b (2026-08-22). Data as JSON: /api/errors/41c31fa415a1ca9b. Report an issue: GitHub.