1 package org.apache.maven.shared.release.scm; 2 3 /* 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 */ 21 22 import org.apache.maven.scm.ScmBranch; 23 import org.apache.maven.scm.ScmTag; 24 import org.apache.maven.scm.provider.svn.SvnTagBranchUtils; 25 26 /** 27 * Subversion tag translator. 28 * 29 * @author <a href="mailto:brett@apache.org">Brett Porter</a> 30 * @plexus.component role="org.apache.maven.shared.release.scm.ScmTranslator" role-hint="svn" 31 */ 32 public class SubversionScmTranslator 33 implements ScmTranslator 34 { 35 /** 36 * {@inheritDoc} 37 */ 38 public String translateBranchUrl( String url, String branchName, String branchBase ) 39 { 40 return SvnTagBranchUtils.resolveUrl( url, branchBase, SvnTagBranchUtils.SVN_BRANCHES, 41 new ScmBranch( branchName ) ); 42 } 43 44 /** 45 * {@inheritDoc} 46 */ 47 public String translateTagUrl( String url, String tag, String tagBase ) 48 { 49 return SvnTagBranchUtils.resolveUrl( url, tagBase, SvnTagBranchUtils.SVN_TAGS, new ScmTag( tag ) ); 50 } 51 52 /** 53 * {@inheritDoc} 54 */ 55 public String resolveTag( String tag ) 56 { 57 return null; 58 } 59 60 /** 61 * {@inheritDoc} 62 */ 63 public String toRelativePath( String path ) 64 { 65 return path; 66 } 67 }