public Collection<String> getClasspathElements(MavenProject project) {
        Collection<String> classpathElements;
        try {
            switch (this) {
            case PROJECT_ONLY:
                classpathElements = Collections.singleton(project.getBuild().getOutputDirectory());
                break;
            case WITH_COMPILE_DEPENDENCIES:
                classpathElements = project.getCompileClasspathElements();
                break;
            case WITH_RUNTIME_DEPENDENCIES:
                classpathElements = project.getRuntimeClasspathElements();
                break;
            case WITH_ALL_DEPENDENCIES:
                // to remove duplicates
                classpathElements = new HashSet<>();
                classpathElements.addAll(project.getRuntimeClasspathElements());
                classpathElements.addAll(project.getCompileClasspathElements());
                break;
            case WITH_ALL_DEPENDENCIES_AND_TESTS:
                // to remove duplicates
                classpathElements = new HashSet<>();
                classpathElements.addAll(project.getRuntimeClasspathElements());
                classpathElements.addAll(project.getCompileClasspathElements());
                classpathElements.addAll(project.getTestClasspathElements());
                break;
            default:
                throw new IllegalArgumentException("ClasspathType " + this + " not supported");
            }
        } catch (DependencyResolutionRequiredException e) {
            throw new IllegalStateException("Failed to resolve classpathType elements", e);
        }
        return classpathElements;
    }
Classes from the project (including tests), compile time, runtime and test dependencies.
Mainly intended for internal use when looking up custom modules.
jsonschema-maven-plugin/src/main/java/com/github/victools/jsonschema/plugin/maven/ClasspathType.java