protected String getConnection()

in src/main/java/org/apache/maven/plugins/changelog/ChangeLogReport.java [910:935]


    protected String getConnection() throws MavenReportException {
        if (this.connection != null) {
            return connection;
        }

        if (project.getScm() == null) {
            throw new MavenReportException("SCM Connection is not set.");
        }

        String scmConnection = project.getScm().getConnection();
        if ((scmConnection != null && !scmConnection.isEmpty()) && "connection".equalsIgnoreCase(connectionType)) {
            connection = scmConnection;
        }

        String scmDeveloper = project.getScm().getDeveloperConnection();
        if ((scmDeveloper != null && !scmDeveloper.isEmpty())
                && "developerconnection".equalsIgnoreCase(connectionType)) {
            connection = scmDeveloper;
        }

        if (connection == null || connection.isEmpty()) {
            throw new MavenReportException("SCM Connection is not set.");
        }

        return connection;
    }