Skip to content

Commit

Permalink
Fixing #700
Browse files Browse the repository at this point in the history
  • Loading branch information
jarmoniuk committed Sep 17, 2022
1 parent 5b5d1d1 commit 2f2f2ed
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 28 deletions.
13 changes: 9 additions & 4 deletions src/test/java/org/codehaus/mojo/versions/SetScmTagMojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
import java.nio.file.Path;
import java.nio.file.Paths;

import org.codehaus.mojo.versions.utils.BaseMojoTestCase;
import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import org.apache.maven.plugin.testing.MojoRule;
import org.junit.Rule;
import org.junit.Test;

import static org.hamcrest.MatcherAssert.assertThat;
Expand All @@ -35,13 +37,16 @@
*
* @author Andrzej Jarmoniuk
*/
public class SetScmTagMojoTest extends BaseMojoTestCase
public class SetScmTagMojoTest extends AbstractMojoTestCase
{
@Rule
public MojoRule mojoRule = new MojoRule( this );

@Test
public void testNewScmValues() throws Exception
{
Path pomFile = Paths.get( "target/test-classes/org/codehaus/mojo/set-scm-tag/issue-342-pom.xml" );
createMojo( "set-scm-tag", pomFile.toString() )
Path pomFile = Paths.get( "target/test-classes/org/codehaus/mojo/set-scm-tag/pom.xml" );
mojoRule.lookupConfiguredMojo( pomFile.toFile().getParentFile(), "set-scm-tag" )
.execute();
String output = String.join( "", Files.readAllLines( pomFile ) )
.replaceAll( "\\s*", "" );
Expand Down
24 changes: 0 additions & 24 deletions src/test/resources/org/codehaus/mojo/set-scm-tag/issue-342-pom.xml

This file was deleted.

21 changes: 21 additions & 0 deletions src/test/resources/org/codehaus/mojo/set-scm-tag/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
~ 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 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>
Expand All @@ -11,7 +30,9 @@
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${project.version}</version>
<configuration>
<newTag>newTag</newTag>
<connection>connection</connection>
Expand Down

0 comments on commit 2f2f2ed

Please sign in to comment.