You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2007/02/23 05:19:00 UTC
svn commit: r510805 - in
/maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency:
TestCopyDependenciesMojo.java TestUnpackDependenciesMojo.java
fromConfiguration/TestCopyMojo.java fromConfiguration/TestUnpackMojo.java
Author: brianf
Date: Thu Feb 22 20:18:59 2007
New Revision: 510805
URL: http://svn.apache.org/viewvc?view=rev&rev=510805
Log:
MDEP-58 - fix linux / mac unit tests
Modified:
maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/TestCopyDependenciesMojo.java
maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/TestUnpackDependenciesMojo.java
maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestCopyMojo.java
maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestUnpackMojo.java
Modified: maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/TestCopyDependenciesMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/TestCopyDependenciesMojo.java?view=diff&rev=510805&r1=510804&r2=510805
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/TestCopyDependenciesMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/TestCopyDependenciesMojo.java Thu Feb 22 20:18:59 2007
@@ -99,7 +99,7 @@
*
* @throws Exception
*/
- public void testCopyDependenciesMojo()
+ public void testMojo()
throws Exception
{
mojo.execute();
@@ -116,7 +116,7 @@
}
}
- public void testCopyDependenciesMojoStripVersion()
+ public void testStripVersion()
throws Exception
{
mojo.stripVersion = true;
@@ -132,7 +132,7 @@
}
}
- public void testCopyDependenciesMojoNoTransitive()
+ public void testNoTransitive()
throws Exception
{
mojo.excludeTransitive = true;
@@ -148,7 +148,7 @@
}
}
- public void testCopyDependenciesMojoExcludeType()
+ public void testExcludeType()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getTypedArtifacts() );
@@ -166,7 +166,7 @@
}
}
- public void testCopyDependenciesMojoIncludeType()
+ public void testIncludeType()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getTypedArtifacts() );
@@ -188,7 +188,7 @@
}
}
- public void testCopyDependenciesMojoExcludeArtifactId()
+ public void testExcludeArtifactId()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getArtifactArtifacts() );
@@ -206,7 +206,7 @@
}
}
- public void testCopyDependenciesMojoIncludeArtifactId()
+ public void testIncludeArtifactId()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getArtifactArtifacts() );
@@ -228,7 +228,7 @@
}
}
- public void testCopyDependenciesMojoIncludeGroupId()
+ public void testIncludeGroupId()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getGroupIdArtifacts() );
@@ -249,7 +249,7 @@
}
}
- public void testCopyDependenciesMojoExcludeGroupId()
+ public void testExcludeGroupId()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getGroupIdArtifacts() );
@@ -268,7 +268,7 @@
}
}
- public void testCopyDependenciesMojoExcludeClassifier()
+ public void testExcludeClassifier()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getClassifiedArtifacts() );
@@ -286,7 +286,7 @@
}
}
- public void testCopyDependenciesMojoIncludeClassifier()
+ public void testIncludeClassifier()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getClassifiedArtifacts() );
@@ -308,7 +308,7 @@
}
}
- public void testCopyDependenciesMojoSubPerType()
+ public void testSubPerType()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getTypedArtifacts() );
@@ -328,7 +328,7 @@
}
}
- public void testCopyDependenciesMojoSubPerArtifact()
+ public void testSubPerArtifact()
throws Exception
{
mojo.useSubDirectoryPerArtifact = true;
@@ -346,7 +346,7 @@
}
}
- public void testCopyDependenciesMojoSubPerArtifactAndType()
+ public void testSubPerArtifactAndType()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getTypedArtifacts() );
@@ -367,7 +367,7 @@
}
}
- public void testCopyDependenciesMojoRepositoryLayout()
+ public void testRepositoryLayout()
throws Exception
{
mojo.useRepositoryLayout = true;
@@ -385,7 +385,7 @@
}
}
- public void testCopyDependenciesMojoSubPerArtifactRemoveVersion()
+ public void testSubPerArtifactRemoveVersion()
throws Exception
{
mojo.useSubDirectoryPerArtifact = true;
@@ -404,7 +404,7 @@
}
}
- public void testCopyDependenciesMojoSubPerArtifactAndTypeRemoveVersion()
+ public void testSubPerArtifactAndTypeRemoveVersion()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getTypedArtifacts() );
@@ -429,22 +429,22 @@
public void testCDMClassifier()
throws Exception
{
- dotestCopyDependenciesMojoClassifierType( "jdk14", null );
+ dotestClassifierType( "jdk14", null );
}
public void testCDMType()
throws Exception
{
- dotestCopyDependenciesMojoClassifierType( null, "sources" );
+ dotestClassifierType( null, "sources" );
}
public void testCDMClassifierType()
throws Exception
{
- dotestCopyDependenciesMojoClassifierType( "jdk14", "sources" );
+ dotestClassifierType( "jdk14", "sources" );
}
- public void dotestCopyDependenciesMojoClassifierType( String testClassifier, String testType )
+ public void dotestClassifierType( String testClassifier, String testType )
throws Exception
{
mojo.classifier = testClassifier;
@@ -669,7 +669,7 @@
.getResolvedDependencies().toString() );
}
- public void testCopyDependenciesMojoExcludeProvidedScope()
+ public void testExcludeProvidedScope()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -692,7 +692,7 @@
}
- public void testCopyDependenciesMojoExcludeSystemScope()
+ public void testExcludeSystemScope()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -715,7 +715,7 @@
}
- public void testCopyDependenciesMojoExcludeCompileScope()
+ public void testExcludeCompileScope()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -735,7 +735,7 @@
}
}
- public void testCopyDependenciesMojoExcludeTestScope()
+ public void testExcludeTestScope()
throws IOException
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -754,7 +754,7 @@
}
- public void testCopyDependenciesMojoExcludeRuntimeScope()
+ public void testExcludeRuntimeScope()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
Modified: maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/TestUnpackDependenciesMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/TestUnpackDependenciesMojo.java?view=diff&rev=510805&r1=510804&r2=510805
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/TestUnpackDependenciesMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/TestUnpackDependenciesMojo.java Thu Feb 22 20:18:59 2007
@@ -109,7 +109,7 @@
}
}
- public void testUnpackDependenciesMojo()
+ public void testMojo()
throws Exception
{
mojo.execute();
@@ -121,7 +121,7 @@
}
}
- public void testUnpackDependenciesMojoNoTransitive()
+ public void testNoTransitive()
throws Exception
{
mojo.excludeTransitive = true;
@@ -134,7 +134,7 @@
}
}
- public void testUnpackDependenciesMojoExcludeType()
+ public void testExcludeType()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getTypedArchiveArtifacts() );
@@ -151,7 +151,7 @@
}
}
- public void testUnpackDependenciesMojoExcludeProvidedScope()
+ public void testExcludeProvidedScope()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -170,7 +170,7 @@
}
- public void testUnpackDependenciesMojoExcludeSystemScope()
+ public void testExcludeSystemScope()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -189,7 +189,7 @@
}
- public void testUnpackDependenciesMojoExcludeCompileScope()
+ public void testExcludeCompileScope()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -206,7 +206,7 @@
}
}
- public void testUnpackDependenciesMojoExcludeTestScope()
+ public void testExcludeTestScope()
throws IOException
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -225,7 +225,7 @@
}
- public void testUnpackDependenciesMojoExcludeRuntimeScope()
+ public void testExcludeRuntimeScope()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -242,7 +242,7 @@
}
}
- public void testUnpackDependenciesMojoIncludeType()
+ public void testIncludeType()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getTypedArchiveArtifacts() );
@@ -263,7 +263,7 @@
}
}
- public void testUnpackDependenciesMojoSubPerType()
+ public void testSubPerType()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getTypedArchiveArtifacts() );
@@ -279,7 +279,7 @@
}
}
- public void testUnpackDependenciesMojoSubPerArtifact()
+ public void testSubPerArtifact()
throws Exception
{
mojo.useSubDirectoryPerArtifact = true;
@@ -293,7 +293,7 @@
}
}
- public void testUnpackDependenciesMojoSubPerArtifactAndType()
+ public void testSubPerArtifactAndType()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getTypedArchiveArtifacts() );
@@ -310,7 +310,7 @@
}
}
- public void testUnpackDependenciesMojoSubPerArtifactRemoveVersion()
+ public void testSubPerArtifactRemoveVersion()
throws Exception
{
mojo.useSubDirectoryPerArtifact = true;
@@ -325,7 +325,7 @@
}
}
- public void testUnpackDependenciesMojoSubPerArtifactAndTypeRemoveVersion()
+ public void testSubPerArtifactAndTypeRemoveVersion()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getTypedArchiveArtifacts() );
@@ -343,7 +343,7 @@
}
}
- public void testUnpackDependenciesMojoIncludeCompileScope()
+ public void testIncludeCompileScope()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -360,7 +360,7 @@
}
}
- public void testUnpackDependenciesMojoIncludeTestScope()
+ public void testIncludeTestScope()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -378,7 +378,7 @@
}
}
- public void testUnpackDependenciesMojoIncludeRuntimeScope()
+ public void testIncludeRuntimeScope()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -395,7 +395,7 @@
}
}
- public void testUnpackDependenciesMojoIncludeprovidedScope()
+ public void testIncludeprovidedScope()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -411,7 +411,7 @@
}
}
- public void testUnpackDependenciesMojoIncludesystemScope()
+ public void testIncludesystemScope()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getScopedArtifacts() );
@@ -428,7 +428,7 @@
}
}
- public void testUnpackDependenciesMojoIncludeArtifactId()
+ public void testIncludeArtifactId()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getArtifactArtifacts() );
@@ -448,7 +448,7 @@
}
}
- public void testUnpackDependenciesMojoExcludeArtifactId()
+ public void testExcludeArtifactId()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getArtifactArtifacts() );
@@ -467,7 +467,7 @@
}
}
- public void testUnpackDependenciesMojoExcludeGroupId()
+ public void testExcludeGroupId()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getGroupIdArtifacts() );
@@ -483,7 +483,7 @@
}
}
- public void testUnpackDependenciesMojoIncludeGroupId()
+ public void testIncludeGroupId()
throws Exception
{
mojo.project.setArtifacts( stubFactory.getGroupIdArtifacts() );
@@ -506,22 +506,22 @@
public void testCDMClassifier()
throws Exception
{
- dotestUnpackDependenciesMojoClassifierType( "jdk14", null );
+ dotestClassifierType( "jdk14", null );
}
public void testCDMType()
throws Exception
{
- dotestUnpackDependenciesMojoClassifierType( null, "zip" );
+ dotestClassifierType( null, "zip" );
}
public void testCDMClassifierType()
throws Exception
{
- dotestUnpackDependenciesMojoClassifierType( "jdk14", "war" );
+ dotestClassifierType( "jdk14", "war" );
}
- public void dotestUnpackDependenciesMojoClassifierType( String testClassifier, String testType )
+ public void dotestClassifierType( String testClassifier, String testType )
throws Exception
{
mojo.classifier = testClassifier;
@@ -709,7 +709,6 @@
File unpackedFile = getUnpackedFile( snap );
- Thread.sleep( 100 );
// round down to the last second
long time = System.currentTimeMillis();
time = time - ( time % 1000 );
Modified: maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestCopyMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestCopyMojo.java?view=diff&rev=510805&r1=510804&r2=510805
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestCopyMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestCopyMojo.java Thu Feb 22 20:18:59 2007
@@ -571,6 +571,7 @@
// set dest to be old
long time = System.currentTimeMillis() - 10000;
+ time = time - ( time % 1000 );
copiedFile.setLastModified( time );
// set source to be newer
@@ -579,7 +580,6 @@
assertTrue( time < copiedFile.lastModified() );
}
- // TODO: test overwrite / overwrite if newer / overwrite release / overwrite
- // snapshot
+
}
Modified: maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestUnpackMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestUnpackMojo.java?view=diff&rev=510805&r1=510804&r2=510805
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestUnpackMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromConfiguration/TestUnpackMojo.java Thu Feb 22 20:18:59 2007
@@ -495,8 +495,6 @@
mojo.setArtifactItems( list );
mojo.setOverWriteIfNewer( true );
mojo.execute();
-
- Thread.sleep( 100 );
File unpackedFile = getUnpackedFile( item );
// round down to the last second