private String getSCMConnection() throws MojoExecutionException { if (this.project.getScm() == null) { throw new MojoExecutionException("No SCM Connection configured."); } final String scmConnection = this.project.getScm().getConnection(); if ("connection".equalsIgnoreCase(this.connectionType) && StringUtils.isNotEmpty(scmConnection)) { return scmConnection; } final String scmDeveloper = this.project.getScm().getDeveloperConnection(); if ("developerconnection".equalsIgnoreCase(this.connectionType) && StringUtils.isNotEmpty(scmDeveloper)) { return scmDeveloper; } throw new MojoExecutionException("SCM Connection is not set."); }
private boolean hasScm(MavenProject project) { return project.getScm() != null; }
private boolean hasScm(MavenProject project) { return project.getScm() != null; }
public Scm getScm() { return wrapped.getScm(); }
public Scm getScm() { return getMavenProject().getScm(); }
@Override public boolean isEnabled() { MavenProject readMavenProject = ActionsUtil.readMavenProject(artifact); return readMavenProject!=null && readMavenProject.getScm() != null; } }
private String createScmUrl() { Scm scm = mavenProject.getScm(); String connection = scm.getConnection(); if(connection.contains("git@github.com:")){ connection = connection.replace("git@github.com:", "https://github.com/"); } return connection; }
private String getScmUrl( MavenProject project ) { return project.getScm().getConnection(); }
public Scm getScm() { return getMavenProject().getScm(); } //-- Scm getScm()
private String getScmUrl( MavenProject project ) { return project.getScm().getConnection(); }
private String getScmUrl( MavenProject project ) { return project.getScm().getConnection(); }
public Scm getScm() { return getDelegate().getScm(); }
public String svnurl() throws IOException { try { return maven.loadPom(artifact).getScm().getUrl(); } catch (ProjectBuildingException | RepositoryException e) { throw new IOException(e.getMessage(), e); } }
public void handleScmUrl(AbstractMojo mojo, MavenProject project, String property) { String scmUrl = getScmUrl(project.getScm()); if (!StringUtils.isEmpty(scmUrl)) { project.getProperties().setProperty(property, scmUrl); mojo.getLog().info(property + "=" + scmUrl); } else { mojo.getLog().info("scm url could not be determined"); } }
public void handleScmType(AbstractMojo mojo, MavenProject project, String property) { String scmType = getScmType(project.getScm()); if (!StringUtils.isEmpty(scmType)) { project.getProperties().setProperty(property, scmType); mojo.getLog().info(property + "=" + scmType); } else { mojo.getLog().info("scm type could not be determined"); } }
public void handleSVNBranch(AbstractMojo mojo, MavenProject project, String property) { String scmType = getScmType(project.getScm()); if (!"svn".equalsIgnoreCase(scmType)) { mojo.getLog().warn("This should only be used with Subversion"); } String scmUrl = getScmUrl(project.getScm()); String branch = getBranch(scmUrl); if (!StringUtils.isEmpty(branch)) { project.getProperties().setProperty(property, branch); mojo.getLog().info(property + "=" + branch); } else { mojo.getLog().debug("SVN branch could not be determined"); } }
public void handleSVNTagBase(AbstractMojo mojo, MavenProject project, String property) { String scmType = getScmType(project.getScm()); if (!"svn".equalsIgnoreCase(scmType)) { mojo.getLog().warn("This should only be used with Subversion"); } String scmUrl = getScmUrl(project.getScm()); String tagBase = getTagBase(scmUrl); if (!StringUtils.isEmpty(tagBase)) { project.getProperties().setProperty(property, tagBase); mojo.getLog().info(property + "=" + tagBase); } else { mojo.getLog().debug("SVN tag base could not be determined"); } }
public void actionPerformed(ActionEvent e) { Scm scm = ActionsUtil.readMavenProject(artifact).getScm(); try { URLDisplayer.getDefault().showURL(new URL(scm.getUrl())); } catch (MalformedURLException ex) { Exceptions.printStackTrace(ex); } }