Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changerecorder #416

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1 @@
invoker.goals=-DchangeRecorderFormat=xml ${project.groupId}:${project.artifactId}:${project.version}:update-parent
40 changes: 40 additions & 0 deletions src/it/it-changerecord-update-parent-001/pom.xml
@@ -0,0 +1,40 @@
<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>

<parent>
<groupId>localhost</groupId>
<artifactId>dummy-parent</artifactId>
<version>1.0</version>
</parent>

<groupId>localhost</groupId>
<artifactId>it-201</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>update-parent basic test</name>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
22 changes: 22 additions & 0 deletions src/it/it-changerecord-update-parent-001/verify.bsh
@@ -0,0 +1,22 @@
import java.io.*;
import java.util.regex.*;
import org.codehaus.plexus.util.FileUtils;

try
{
File file = new File( basedir, "target/versions-changes.xml" );
String buf = FileUtils.fileRead( file, "UTF-8" );

if ( buf.indexOf( "<update artifactId=\"dummy-parent\" groupId=\"localhost\" kind=\"updateParent\" newVersion=\"3.0\" oldVersion=\"1.0\"/>" ) < 0 )
{
System.err.println( "Version change recorded" );
return false;
}
}
catch( Throwable t )
{
t.printStackTrace();
return false;
}

return true;
@@ -0,0 +1 @@
invoker.goals=-DchangeRecorderFormat=xml ${project.groupId}:${project.artifactId}:${project.version}:update-properties
59 changes: 59 additions & 0 deletions src/it/it-changerecord-update-properties-001/pom.xml
@@ -0,0 +1,59 @@
<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>

<groupId>localhost</groupId>
<artifactId>it-001</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>update-properties with one property only</name>

<properties>
<api>1.0</api>
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>@project.groupId@</groupId>
<artifactId>@project.artifactId@</artifactId>
<version>@project.version@</version>
<configuration>
<properties>
<property>
<name>api</name>
<dependencies>
<dependency>
<groupId>localhost</groupId>
<artifactId>dummy-api</artifactId>
</dependency>
</dependencies>
</property>
</properties>
</configuration>
</plugin>
</plugins>
</build>

</project>
21 changes: 21 additions & 0 deletions src/it/it-changerecord-update-properties-001/verify.bsh
@@ -0,0 +1,21 @@
import java.io.*;
import org.codehaus.plexus.util.FileUtils;

try
{
File file = new File( basedir, "target/versions-changes.xml" );
String buf = FileUtils.fileRead( file, "UTF-8" );

if ( buf.indexOf( "<update artifactId=\"dummy-api\" groupId=\"localhost\" kind=\"updateProperty\" newVersion=\"3.0\" oldVersion=\"1.0\"/>" ) < 0 )
{
System.err.println( "Version change recorded" );
return false;
}
}
catch( Throwable t )
{
t.printStackTrace();
return false;
}

return true;
@@ -0,0 +1 @@
invoker.goals=-DchangeRecorderFormat=xml ${project.groupId}:${project.artifactId}:${project.version}:use-latest-releases
21 changes: 21 additions & 0 deletions src/it/it-changerecord-use-latest-releases-001/pom.xml
@@ -0,0 +1,21 @@
<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>

<groupId>localhost</groupId>
<artifactId>it-use-latest-releases-001</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>Update a dependency to the latest release version</name>

<dependencies>

<dependency>
<groupId>localhost</groupId>
<artifactId>dummy-api</artifactId>
<version>1.1.1-2</version>
</dependency>

</dependencies>

</project>
21 changes: 21 additions & 0 deletions src/it/it-changerecord-use-latest-releases-001/verify.bsh
@@ -0,0 +1,21 @@
import java.io.*;
import org.codehaus.plexus.util.FileUtils;

try
{
File file = new File( basedir, "target/versions-changes.xml" );
String buf = FileUtils.fileRead( file, "UTF-8" );

if ( buf.indexOf( "<update artifactId=\"dummy-api\" groupId=\"localhost\" kind=\"useLatestReleases\" newVersion=\"3.0\" oldVersion=\"1.1.1-2\"/>" ) < 0 )
{
System.err.println( "Version change recorded" );
return false;
}
}
catch( Throwable t )
{
t.printStackTrace();
return false;
}

return true;
@@ -0,0 +1 @@
invoker.goals=-DchangeRecorderFormat=xml ${project.groupId}:${project.artifactId}:${project.version}:use-latest-snapshots -DallowMinorUpdates=true
21 changes: 21 additions & 0 deletions src/it/it-changerecord-use-latest-snapshots-001/pom.xml
@@ -0,0 +1,21 @@
<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>

<groupId>localhost</groupId>
<artifactId>it-use-latest-snapshots-001</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>Update a release dependency to the latest snapshot version</name>

<dependencies>

<dependency>
<groupId>localhost</groupId>
<artifactId>dummy-api</artifactId>
<version>1.0</version>
</dependency>

</dependencies>

</project>
21 changes: 21 additions & 0 deletions src/it/it-changerecord-use-latest-snapshots-001/verify.bsh
@@ -0,0 +1,21 @@
import java.io.*;
import org.codehaus.plexus.util.FileUtils;

try
{
File file = new File( basedir, "target/versions-changes.xml" );
String buf = FileUtils.fileRead( file, "UTF-8" );

if ( buf.indexOf( "<update artifactId=\"dummy-api\" groupId=\"localhost\" kind=\"useLatestSnapshots\" newVersion=\"1.9.1-SNAPSHOT\" oldVersion=\"1.0\"/>" ) < 0 )
{
System.err.println( "Version change recorded" );
return false;
}
}
catch( Throwable t )
{
t.printStackTrace();
return false;
}

return true;
@@ -0,0 +1 @@
invoker.goals=-DchangeRecorderFormat=xml ${project.groupId}:${project.artifactId}:${project.version}:use-latest-versions
21 changes: 21 additions & 0 deletions src/it/it-changerecord-use-latest-versions-001/pom.xml
@@ -0,0 +1,21 @@
<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>

<groupId>localhost</groupId>
<artifactId>it-use-latest-versions-001</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>Update a dependency to the next release version</name>

<dependencies>

<dependency>
<groupId>localhost</groupId>
<artifactId>dummy-api</artifactId>
<version>1.1.1-2</version>
</dependency>

</dependencies>

</project>
21 changes: 21 additions & 0 deletions src/it/it-changerecord-use-latest-versions-001/verify.bsh
@@ -0,0 +1,21 @@
import java.io.*;
import org.codehaus.plexus.util.FileUtils;

try
{
File file = new File( basedir, "target/versions-changes.xml" );
String buf = FileUtils.fileRead( file, "UTF-8" );

if ( buf.indexOf( "<update artifactId=\"dummy-api\" groupId=\"localhost\" kind=\"useLatestVersions\" newVersion=\"3.0\" oldVersion=\"1.1.1-2\"/>" ) < 0 )
{
System.err.println( "Version change recorded" );
return false;
}
}
catch( Throwable t )
{
t.printStackTrace();
return false;
}

return true;
@@ -0,0 +1 @@
invoker.goals=-DchangeRecorderFormat=xml ${project.groupId}:${project.artifactId}:${project.version}:use-next-versions
21 changes: 21 additions & 0 deletions src/it/it-changerecord-use-next-versions-001/pom.xml
@@ -0,0 +1,21 @@
<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>

<groupId>localhost</groupId>
<artifactId>it-use-next-versions-001</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>Update a dependency to the next versions</name>

<dependencies>

<dependency>
<groupId>localhost</groupId>
<artifactId>dummy-api</artifactId>
<version>1.1.1-2</version>
</dependency>

</dependencies>

</project>
21 changes: 21 additions & 0 deletions src/it/it-changerecord-use-next-versions-001/verify.bsh
@@ -0,0 +1,21 @@
import java.io.*;
import org.codehaus.plexus.util.FileUtils;

try
{
File file = new File( basedir, "target/versions-changes.xml" );
String buf = FileUtils.fileRead( file, "UTF-8" );

if ( buf.indexOf( "<update artifactId=\"dummy-api\" groupId=\"localhost\" kind=\"useNextVersions\" newVersion=\"1.1.2\" oldVersion=\"1.1.1-2\"/>" ) < 0 )
{
System.err.println( "Version change recorded" );
return false;
}
}
catch( Throwable t )
{
t.printStackTrace();
return false;
}

return true;