This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch SCM-318 in repository https://gitbox.apache.org/repos/asf/maven-scm.git
commit ce0fc51c9f36c353428659d0a6acb5d150fbd47d Author: Michael Osipov <micha...@apache.org> AuthorDate: Sun Dec 30 00:30:14 2018 +0100 Corrections --- .../maven/scm/command/tag/AbstractTagCommand.java | 8 +- .../scm/command/untag/AbstractUntagCommand.java | 12 +- .../maven/scm/command/untag/UntagScmResult.java | 8 +- .../maven/scm/provider/AbstractScmProvider.java | 13 ++- .../org/apache/maven/scm/plugin/UnTagMojo.java | 8 +- .../org/apache/maven/scm/plugin/UnTagMojoTest.java | 123 --------------------- .../src/test/resources/mojos/untag/checkout.xml | 36 ------ .../src/test/resources/mojos/untag/untag.xml | 34 ------ maven-scm-providers/maven-scm-provider-vss/pom.xml | 7 -- .../scm/provider/git/AbstractGitScmProvider.java | 2 +- .../maven/scm/provider/git/TestGitScmProvider.java | 3 +- .../scm/provider/git/gitexe/GitExeScmProvider.java | 4 +- .../git/gitexe/command/untag/GitUntagCommand.java | 12 +- .../scm/provider/git/jgit/JGitScmProvider.java | 3 +- .../git/jgit/command/untag/JGitUntagCommand.java | 35 ++++-- .../maven-scm-provider-svn-commons/pom.xml | 7 -- 16 files changed, 59 insertions(+), 256 deletions(-) diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/tag/AbstractTagCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/tag/AbstractTagCommand.java index 41493d2..c0b4d56 100644 --- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/tag/AbstractTagCommand.java +++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/tag/AbstractTagCommand.java @@ -37,7 +37,7 @@ public abstract class AbstractTagCommand extends AbstractCommand { /** - * @deprecated use method {@link #executeTagCommand(ScmProviderRepository, ScmFileSet, String, ScmTagParameters)} + * @deprecated use method {@link #executeTagCommand(ScmProviderRepository, ScmFileSet, String, ScmTagParameters)} * @param repository * @param fileSet * @param tagName @@ -54,8 +54,8 @@ public abstract class AbstractTagCommand protected abstract ScmResult executeTagCommand( ScmProviderRepository repository, ScmFileSet fileSet, String tagName, ScmTagParameters scmTagParameters ) - throws ScmException; - + throws ScmException; + /** {@inheritDoc} */ public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters ) @@ -81,5 +81,5 @@ public abstract class AbstractTagCommand return executeTagCommand( repository, fileSet, tagName, scmTagParameters ); } - + } diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/AbstractUntagCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/AbstractUntagCommand.java index 3e8dc07..06790a6 100644 --- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/AbstractUntagCommand.java +++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/AbstractUntagCommand.java @@ -28,16 +28,12 @@ import org.apache.maven.scm.ScmTagParameters; import org.apache.maven.scm.command.AbstractCommand; import org.apache.maven.scm.provider.ScmProviderRepository; -/** - * @author <a href="https://pr0methean.github.io">Chris Hennick</a> - * - */ public abstract class AbstractUntagCommand extends AbstractCommand { - protected abstract ScmResult executeUntagCommand(ScmProviderRepository repository, - ScmFileSet fileSet, String tagName) - throws ScmException; + protected abstract ScmResult executeUntagCommand( ScmProviderRepository repository, + ScmFileSet fileSet, String tagName ) + throws ScmException; /** {@inheritDoc} */ public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet, @@ -48,5 +44,5 @@ public abstract class AbstractUntagCommand return executeUntagCommand( repository, fileSet, tagName ); } - + } diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/UntagScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/UntagScmResult.java index c389ca8..565628a 100644 --- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/UntagScmResult.java +++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/UntagScmResult.java @@ -21,10 +21,6 @@ package org.apache.maven.scm.command.untag; import org.apache.maven.scm.ScmResult; -/** - * @author <a href="https://pr0methean.github.io">Chris Hennick</a> - * - */ public class UntagScmResult extends ScmResult { @@ -35,12 +31,12 @@ public class UntagScmResult super( commandLine, providerMessage, commandOutput, success ); } - public UntagScmResult(String commandLine) + public UntagScmResult( String commandLine ) { super( commandLine, null, null, true ); } - public UntagScmResult(ScmResult result) + public UntagScmResult( ScmResult result ) { super( result ); } diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java b/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java index f0b1bb9..dcacd11 100644 --- a/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java +++ b/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java @@ -900,11 +900,14 @@ public abstract class AbstractScmProvider return new UnEditScmResult( "", null, null, true ); } - @Override - public UntagScmResult untag(ScmRepository repository, ScmFileSet fileSet, - CommandParameters parameters) - throws ScmException { - getLogger().warn( "Deleting tags not implemented for " + this.getScmType() ); + /** + * {@inheritDoc} + */ + public UntagScmResult untag( ScmRepository repository, ScmFileSet fileSet, + CommandParameters parameters ) + throws ScmException + { + getLogger().warn( "Provider " + this.getScmType() + " does not support untag operation." ); return new UntagScmResult( "", null, null, true ); } diff --git a/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UnTagMojo.java b/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UnTagMojo.java index eddf35b..648ca47 100644 --- a/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UnTagMojo.java +++ b/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UnTagMojo.java @@ -35,9 +35,7 @@ import org.apache.maven.scm.provider.ScmProvider; import org.apache.maven.scm.repository.ScmRepository; /** - * Delete a tag. - * - * @author <a href="https://pr0methean.github.io">Chris Hennick</a> + * Untag the project. */ @Mojo( name = "untag", aggregator = true ) public class UnTagMojo @@ -72,11 +70,11 @@ public class UnTagMojo } catch ( IOException e ) { - throw new MojoExecutionException( "Cannot run untag command : ", e ); + throw new MojoExecutionException( "Cannot run untag command", e ); } catch ( ScmException e ) { - throw new MojoExecutionException( "Cannot run untag command : ", e ); + throw new MojoExecutionException( "Cannot run untag command", e ); } } } diff --git a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/UnTagMojoTest.java b/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/UnTagMojoTest.java deleted file mode 100644 index 14d9073..0000000 --- a/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/UnTagMojoTest.java +++ /dev/null @@ -1,123 +0,0 @@ -package org.apache.maven.scm.plugin; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * 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. - */ - -import java.io.File; -import org.apache.maven.plugin.testing.AbstractMojoTestCase; -import org.apache.maven.scm.ScmTestCase; -import org.apache.maven.scm.provider.svn.SvnScmTestUtils; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.StringUtils; - -/** - * @author <a href="mailto:eveni...@apache.org">Emmanuel Venisse</a> - * - */ -public class UnTagMojoTest - extends AbstractMojoTestCase -{ - File checkoutDir; - - File repository; - - protected void setUp() - throws Exception - { - super.setUp(); - - checkoutDir = getTestFile( "target/checkout" ); - - FileUtils.forceDelete( checkoutDir ); - - repository = getTestFile( "target/repository" ); - - FileUtils.forceDelete( repository ); - - if ( !ScmTestCase.isSystemCmd( SvnScmTestUtils.SVNADMIN_COMMAND_LINE ) ) - { - System.err.println( "'" + SvnScmTestUtils.SVNADMIN_COMMAND_LINE - + "' is not a system command. Ignored setUp." ); - return; - } - - SvnScmTestUtils.initializeRepository( repository ); - - CheckoutMojo checkoutMojo = (CheckoutMojo) lookupMojo( "checkout", getTestFile( - "src/test/resources/mojos/checkout/checkoutWithConnectionUrl.xml" ) ); - checkoutMojo.setWorkingDirectory( new File( getBasedir() ) ); - - String connectionUrl = checkoutMojo.getConnectionUrl(); - connectionUrl = StringUtils.replace( connectionUrl, "${basedir}", getBasedir() ); - connectionUrl = StringUtils.replace( connectionUrl, "\\", "/" ); - checkoutMojo.setConnectionUrl( connectionUrl ); - - checkoutMojo.setCheckoutDirectory( checkoutDir ); - - checkoutMojo.execute(); - } - - public void testUnTag() - throws Exception - { - if ( !ScmTestCase.isSystemCmd( SvnScmTestUtils.SVNADMIN_COMMAND_LINE ) ) - { - System.err.println( "'" + SvnScmTestUtils.SVNADMIN_COMMAND_LINE - + "' is not a system command. Ignored " + getName() + "." ); - return; - } - - UnTagMojo mojo = (UnTagMojo) lookupMojo( "untag", getTestFile( "src/test/resources/mojos/untag/untag.xml" ) ); - mojo.setWorkingDirectory( checkoutDir ); - - String connectionUrl = mojo.getConnectionUrl(); - connectionUrl = StringUtils.replace( connectionUrl, "${basedir}", getBasedir() ); - connectionUrl = StringUtils.replace( connectionUrl, "\\", "/" ); - mojo.setConnectionUrl( connectionUrl ); - - mojo.execute(); - - if ( !ScmTestCase.isSystemCmd( SvnScmTestUtils.SVN_COMMAND_LINE ) ) - { - System.err.println( "'" + SvnScmTestUtils.SVN_COMMAND_LINE - + "' is not a system command. Ignored " + getName() + "." ); - return; - } - - CheckoutMojo checkoutMojo = - (CheckoutMojo) lookupMojo( "checkout", getTestFile( "src/test/resources/mojos/untag/checkout.xml" ) ); - checkoutMojo.setWorkingDirectory( new File( getBasedir() ) ); - - connectionUrl = checkoutMojo.getConnectionUrl(); - connectionUrl = StringUtils.replace( connectionUrl, "${basedir}", getBasedir() ); - connectionUrl = StringUtils.replace( connectionUrl, "\\", "/" ); - checkoutMojo.setConnectionUrl( connectionUrl ); - - File tagCheckoutDir = getTestFile( "target/tags/mytag" ); - if ( tagCheckoutDir.exists() ) - { - FileUtils.deleteDirectory( tagCheckoutDir ); - } - checkoutMojo.setCheckoutDirectory( tagCheckoutDir ); - - assertFalse( new File( tagCheckoutDir, "pom.xml" ).exists() ); - checkoutMojo.execute(); - assertTrue( new File( tagCheckoutDir, "pom.xml" ).exists() ); - } -} diff --git a/maven-scm-plugin/src/test/resources/mojos/untag/checkout.xml b/maven-scm-plugin/src/test/resources/mojos/untag/checkout.xml deleted file mode 100644 index b8b8022..0000000 --- a/maven-scm-plugin/src/test/resources/mojos/untag/checkout.xml +++ /dev/null @@ -1,36 +0,0 @@ -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ 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. - --> - -<project> - <build> - <plugins> - <plugin> - <artifactId>maven-scm-plugin</artifactId> - <configuration> - <settings implementation="org.apache.maven.settings.Settings"/> - <checkoutDirectory>target/tags/mytag</checkoutDirectory> - <connectionType>connection</connectionType> - <connectionUrl>scm:svn:file:///${basedir}/target/repository/trunk</connectionUrl> - <scmVersionType>tag</scmVersionType> - <scmVersion>mytag</scmVersion> - </configuration> - </plugin> - </plugins> - </build> -</project> \ No newline at end of file diff --git a/maven-scm-plugin/src/test/resources/mojos/untag/untag.xml b/maven-scm-plugin/src/test/resources/mojos/untag/untag.xml deleted file mode 100644 index dafa0f3..0000000 --- a/maven-scm-plugin/src/test/resources/mojos/untag/untag.xml +++ /dev/null @@ -1,34 +0,0 @@ -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ 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. - --> - -<project> - <build> - <plugins> - <plugin> - <artifactId>maven-scm-plugin</artifactId> - <configuration> - <settings implementation="org.apache.maven.settings.Settings"/> - <connectionUrl>scm:svn:file:///${basedir}/target/repository/trunk</connectionUrl> - <connectionType>connection</connectionType> - <tag>mytag</tag> - </configuration> - </plugin> - </plugins> - </build> -</project> \ No newline at end of file diff --git a/maven-scm-providers/maven-scm-provider-vss/pom.xml b/maven-scm-providers/maven-scm-provider-vss/pom.xml index e8deab1..2649303 100644 --- a/maven-scm-providers/maven-scm-provider-vss/pom.xml +++ b/maven-scm-providers/maven-scm-provider-vss/pom.xml @@ -21,13 +21,6 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <dependencies> - <dependency> - <groupId>org.apache.maven.scm</groupId> - <artifactId>maven-scm-provider-vss</artifactId> - <version>1.9.4</version> - </dependency> - </dependencies> <parent> <groupId>org.apache.maven.scm</groupId> diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/main/java/org/apache/maven/scm/provider/git/AbstractGitScmProvider.java b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/main/java/org/apache/maven/scm/provider/git/AbstractGitScmProvider.java index 4fc054c..73a879c 100644 --- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/main/java/org/apache/maven/scm/provider/git/AbstractGitScmProvider.java +++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/main/java/org/apache/maven/scm/provider/git/AbstractGitScmProvider.java @@ -281,7 +281,7 @@ public abstract class AbstractGitScmProvider throws ScmException { return (UntagScmResult) executeCommand( getUntagCommand(), - repository.getProviderRepository(), fileSet, parameters); + repository.getProviderRepository(), fileSet, parameters ); } protected abstract GitCommand getUpdateCommand(); diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/test/java/org/apache/maven/scm/provider/git/TestGitScmProvider.java b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/test/java/org/apache/maven/scm/provider/git/TestGitScmProvider.java index 7e701d3..d1f231a 100644 --- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/test/java/org/apache/maven/scm/provider/git/TestGitScmProvider.java +++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/test/java/org/apache/maven/scm/provider/git/TestGitScmProvider.java @@ -76,7 +76,8 @@ public class TestGitScmProvider return null; } - protected GitCommand getUntagCommand() { + protected GitCommand getUntagCommand() + { return null; } diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/GitExeScmProvider.java b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/GitExeScmProvider.java index 478667d..9cb4334 100644 --- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/GitExeScmProvider.java +++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/GitExeScmProvider.java @@ -111,7 +111,9 @@ public class GitExeScmProvider return new GitTagCommand(); } - @Override protected GitCommand getUntagCommand() { + /** {@inheritDoc} */ + protected GitCommand getUntagCommand() + { return new GitUntagCommand(); } diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/untag/GitUntagCommand.java b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/untag/GitUntagCommand.java index 89c6acc..1b17b2b 100644 --- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/untag/GitUntagCommand.java +++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/untag/GitUntagCommand.java @@ -41,15 +41,11 @@ import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.cli.CommandLineUtils; import org.codehaus.plexus.util.cli.Commandline; -/** - * @author <a href="https://pr0methean.github.io">Chris Hennick</a> - * - */ public class GitUntagCommand extends AbstractUntagCommand implements GitCommand { - + /** {@inheritDoc} */ public ScmResult executeUntagCommand( ScmProviderRepository repo, ScmFileSet fileSet, String tag ) throws ScmException @@ -88,8 +84,6 @@ public class GitUntagCommand } return new UntagScmResult( clTag.toString() ); - - } // ---------------------------------------------------------------------- @@ -108,8 +102,10 @@ public class GitUntagCommand } public static Commandline createPushCommandLine( GitScmProviderRepository repository, ScmFileSet fileSet, - String tag ) { + String tag ) + { Commandline cl = GitCommandLineUtils.getBaseGitCommandLine( fileSet.getBasedir(), "push" ); + cl.createArg().setValue( "--delete" ); cl.createArg().setValue( repository.getPushUrl() ); cl.createArg().setValue( "refs/tags/" + tag ); diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/JGitScmProvider.java b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/JGitScmProvider.java index 1a01a9d..0c6d351 100644 --- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/JGitScmProvider.java +++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/JGitScmProvider.java @@ -134,7 +134,8 @@ public class JGitScmProvider /** * {@inheritDoc} */ - protected GitCommand getUntagCommand() { + protected GitCommand getUntagCommand() + { return new JGitUntagCommand(); } diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/untag/JGitUntagCommand.java b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/untag/JGitUntagCommand.java index f376c35..7f9f3b6 100644 --- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/untag/JGitUntagCommand.java +++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/untag/JGitUntagCommand.java @@ -1,5 +1,24 @@ package org.apache.maven.scm.provider.git.jgit.command.untag; +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + import org.apache.maven.scm.ScmException; import org.apache.maven.scm.ScmFileSet; import org.apache.maven.scm.ScmResult; @@ -14,15 +33,12 @@ import org.eclipse.jgit.api.Git; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.transport.RefSpec; -/** - * @author <a href="https://pr0methean.github.io">Chris Hennick</a> - * - */ -public class JGitUntagCommand extends AbstractUntagCommand implements GitCommand { +public class JGitUntagCommand extends AbstractUntagCommand implements GitCommand +{ @Override - protected ScmResult executeUntagCommand(ScmProviderRepository repository, ScmFileSet fileSet, - String tagName) throws ScmException + protected ScmResult executeUntagCommand( ScmProviderRepository repository, ScmFileSet fileSet, + String tagName ) throws ScmException { if ( tagName == null || StringUtils.isEmpty( tagName.trim() ) ) { @@ -36,8 +52,9 @@ public class JGitUntagCommand extends AbstractUntagCommand implements GitCommand git = JGitUtils.openRepo( fileSet.getBasedir() ); // delete the tag - if (git.tagDelete().setTags( escapedTagName ).call().isEmpty()) { - return new UntagScmResult("JGit tagDelete", "Failed to delete tag", "", false); + if ( git.tagDelete().setTags( escapedTagName ).call().isEmpty() ) + { + return new UntagScmResult( "JGit tagDelete", "Failed to delete tag", "", false ); } if ( repository.isPushChanges() ) diff --git a/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/pom.xml b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/pom.xml index 87bc9a2..8c9f472 100644 --- a/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/pom.xml +++ b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/pom.xml @@ -21,13 +21,6 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <dependencies> - <dependency> - <groupId>org.apache.maven.scm</groupId> - <artifactId>maven-scm-provider-svn-commons</artifactId> - <version>1.9.4</version> - </dependency> - </dependencies> <parent> <groupId>org.apache.maven.scm</groupId>