Author: sisbell
Date: Fri Nov 30 10:09:32 2007
New Revision: 599886
URL: http://svn.apache.org/viewvc?rev=599886&view=rev
Log:
Fixed bug: now fails int if gac entry does not contain classifier. Added direct
compile dependencies to pom.
Modified:
incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java
Modified:
incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java
URL:
http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java?rev=599886&r1=599885&r2=599886&view=diff
==============================================================================
---
incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java
(original)
+++
incubator/nmaven/branches/SI_MAVEN_INTEGRATION/sandbox/components/dotnet-compiler/src/test/java/org/apache/maven/dotnet/compiler/impl/DotnetCompilerContextImplTest.java
Fri Nov 30 10:09:32 2007
@@ -161,6 +161,52 @@
} ) );
}
+ @Test
+ public void testInit_WithGacGenericAndNovell()
+ throws PlatformUnsupportedException
+ {
+ System.getenv().clear();
+
+ DotnetCompilerContextImpl ctx = new DotnetCompilerContextImpl();
+ MavenProject project = new MavenProject();
+
+ Set<Artifact> dependencyArtifacts = new HashSet<Artifact>();
+ project.setDependencyArtifacts( dependencyArtifacts );
+ Artifact artifact = new DefaultArtifact( "groupId", "artifactId",
VersionRange.createFromVersion( "1.0" ),
+ "compile", "gac_generic",
"dsfajkdsfajdfs",
+ new DefaultArtifactHandler(
"library" ), false );
+ dependencyArtifacts.add( artifact );
+
+ Build build = new Build();
+ build.setDirectory( "" );
+ project.setBuild( build );
+
+ ctx.turnOffAssemblyExistsCheck();
+ DotnetCompilerConfig compilerConfig = getDefaultDotnetCompilerConfig();
+ compilerConfig.setVendor( Vendor.NOVELL);
+
+ ctx.init( project, compilerConfig );
+
+ Set<Artifact> libraries = ctx.getLibraryDependencies();
+ assertThat( libraries.size(), equalTo( 1 ) );
+ assertThat( ( (Artifact) libraries.toArray()[0]
).getFile().getAbsolutePath(),
+ CoreMatchers.allOf( new BaseMatcher()
+ {
+ private String containsString =
+
"assembly\\GAC_MSIL\\artifactId\\1.0__dsfajkdsfajdfs\\artifactId.dll";
+
+ public boolean matches( Object object )
+ {
+ return ( (String) object ).contains(
containsString );
+ }
+
+ public void describeTo( org.hamcrest.Description
description )
+ {
+ description.appendText( "Contains = " +
containsString );
+ }
+ } ) );
+ }
+
private static DotnetCompilerConfig getDefaultDotnetCompilerConfig()
{
DotnetCompilerConfig config =
DotnetCompilerConfig.Factory.createDefaultExecutableConfig();