Author: sisbell
Date: Thu Jun 7 21:51:49 2007
New Revision: 545405
URL: http://svn.apache.org/viewvc?view=rev&rev=545405
Log:
Fix for JIRA NMAVEN-71
Modified:
incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/compiler/impl/DefaultCompiler.java
incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/CompilerContextImpl.java
incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryImpl.java
incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoTransitionRuleFactory.java
incubator/nmaven/trunk/components/dotnet-vendor/src/test/java/org/apache/maven/dotnet/vendor/impl/SettingsRepositoryTest.java
incubator/nmaven/trunk/plugins/maven-compile-plugin/pom.xml
incubator/nmaven/trunk/plugins/maven-deploy-plugin/src/main/java/org/apache/maven/dotnet/plugins/DeployFileMojo.java
incubator/nmaven/trunk/plugins/maven-vstudio-plugin/src/main/java/org/apache/maven/plugin/vstudio/VisualStudioMojo.java
incubator/nmaven/trunk/plugins/netplugins/NMaven.Plugin.Addin/src/main/csharp/NMaven/Plugin/Addin/AutomationExtensibilityMojo.cs
incubator/nmaven/trunk/plugins/pom.xml
Modified:
incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/compiler/impl/DefaultCompiler.java
URL:
http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/compiler/impl/DefaultCompiler.java?view=diff&rev=545405&r1=545404&r2=545405
==============================================================================
---
incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/compiler/impl/DefaultCompiler.java
(original)
+++
incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/compiler/impl/DefaultCompiler.java
Thu Jun 7 21:51:49 2007
@@ -114,8 +114,8 @@
if ( compilerContext.getCompilerRequirement().getVendor().equals(
Vendor.MICROSOFT ) &&
compilerContext.getCompilerRequirement().getFrameworkVersion().equals( "3.0" ) )
{
- String wcfRef =
-
"/reference:C:\\WINDOWS\\Microsoft.NET\\Framework\\v3.0\\Windows Communication
Foundation\\";
+ String wcfRef = "/reference:" + System.getenv( "SystemRoot" ) +
+ "\\Microsoft.NET\\Framework\\v3.0\\Windows Communication
Foundation\\";
//TODO: This is a hard-coded path: Don't have a registry value
either.
commands.add( wcfRef + "System.ServiceModel.dll" );
commands.add( wcfRef + "Microsoft.Transactions.Bridge.dll" );
Modified:
incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/CompilerContextImpl.java
URL:
http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/CompilerContextImpl.java?view=diff&rev=545405&r1=545404&r2=545405
==============================================================================
---
incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/CompilerContextImpl.java
(original)
+++
incubator/nmaven/trunk/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/CompilerContextImpl.java
Thu Jun 7 21:51:49 2007
@@ -167,9 +167,9 @@
public List<Artifact> getLibraryDependencies()
{
if ( config.isTestCompile() && ( config.getArtifactType().equals(
ArtifactType.LIBRARY ) ||
- config.getArtifactType().equals( ArtifactType.NETPLUGIN )) &&
project.getArtifact().getFile() != null &&
- project.getArtifact().getFile().exists() &&
!libraries.contains( project.getArtifact() ) &&
- !project.getArtifact().getType().equals( "module" ) )
+ config.getArtifactType().equals( ArtifactType.NETPLUGIN ) ) &&
project.getArtifact().getFile() != null &&
+ project.getArtifact().getFile().exists() && !libraries.contains(
project.getArtifact() ) &&
+ !project.getArtifact().getType().equals( "module" ) )
{
libraries.add( project.getArtifact() );
}
@@ -199,7 +199,7 @@
public File getTargetDirectory()
{
- return new File(project.getBuild().getDirectory());
+ return new File( project.getBuild().getDirectory() );
}
/**
@@ -250,15 +250,16 @@
}
private String getGacRootForMono()
- throws PlatformUnsupportedException {
- String path = System.getenv( "PATH");
- if(path != null)
+ throws PlatformUnsupportedException
+ {
+ String path = System.getenv( "PATH" );
+ if ( path != null )
{
- String[] tokens = path.split( System.getProperty(
"path.separator") );
- for(String token : tokens)
+ String[] tokens = path.split( System.getProperty( "path.separator"
) );
+ for ( String token : tokens )
{
- File gacRoot = new File(new File(token).getParentFile(),
"lib/mono/gac/");
- if(gacRoot.exists())
+ File gacRoot = new File( new File( token ).getParentFile(),
"lib/mono/gac/" );
+ if ( gacRoot.exists() )
{
return gacRoot.getAbsolutePath();
}
@@ -266,25 +267,24 @@
}
//check settings file
-
- String monoRoot = System.getenv( "MONO_ROOT");
- if(monoRoot != null && !new File(monoRoot).exists())
+ String monoRoot = System.getenv( "MONO_ROOT" );
+ if ( monoRoot != null && !new File( monoRoot ).exists() )
{
- logger.warn( "MONO_ROOT has been incorrectly set. Trying /usr :
MONO_ROOT = " + monoRoot);
+ logger.warn( "MONO_ROOT has been incorrectly set. Trying /usr :
MONO_ROOT = " + monoRoot );
}
- else if(monoRoot != null)
+ else if ( monoRoot != null )
{
- return (!monoRoot.endsWith( File.separator)) ? monoRoot +
File.separator : monoRoot;
+ return ( !monoRoot.endsWith( File.separator ) ) ? monoRoot +
File.separator : monoRoot;
}
- if(new File("/usr/lib/mono/gac/").exists())
+ if ( new File( "/usr/lib/mono/gac/" ).exists() )
{
- return new File("/usr/lib/mono/gac/").getAbsolutePath();
+ return new File( "/usr/lib/mono/gac/" ).getAbsolutePath();
}
else
{
throw new PlatformUnsupportedException(
- "NMAVEN-061-008: Could not locate Global Assembly Cache for
Mono. Try setting the MONO_ROOT environmental variable.");
+ "NMAVEN-061-008: Could not locate Global Assembly Cache for
Mono. Try setting the MONO_ROOT environmental variable." );
}
}
@@ -320,12 +320,12 @@
compilerRequirement.getFrameworkVersion().equals(
"2.0.50727" ) ||
compilerRequirement.getFrameworkVersion().equals(
"3.0" ) ) )
{
- gacRoot = "C:\\WINDOWS\\assembly\\GAC_MSIL\\";
+ gacRoot = System.getenv( "SystemRoot" ) +
"\\assembly\\GAC_MSIL\\";
}
else if ( compilerRequirement.getVendor().equals(
Vendor.MICROSOFT ) &&
compilerRequirement.getFrameworkVersion().equals(
"1.1.4322" ) )
{
- gacRoot = "C:\\WINDOWS\\assembly\\GAC\\";
+ gacRoot = System.getenv( "SystemRoot" ) +
"\\assembly\\GAC\\";
}
else if ( compilerRequirement.getVendor().equals( Vendor.MONO
) )
{
@@ -339,22 +339,22 @@
}
else if ( type.equals( "gac" ) )
{
- String gacRoot = (compilerRequirement.getVendor().equals(
Vendor.MONO )) ?
- getGacRootForMono() : "C:\\WINDOWS\\assembly\\GAC\\";
+ String gacRoot = ( compilerRequirement.getVendor().equals(
Vendor.MONO ) ) ? getGacRootForMono()
+ : System.getenv( "SystemRoot" ) + "\\assembly\\GAC\\";
setArtifactGacFile( gacRoot, artifact );
libraries.add( artifact );
}
else if ( type.equals( "gac_32" ) )
{
- String gacRoot = (compilerRequirement.getVendor().equals(
Vendor.MONO )) ?
- getGacRootForMono() : "C:\\WINDOWS\\assembly\\GAC_32\\";
+ String gacRoot = ( compilerRequirement.getVendor().equals(
Vendor.MONO ) ) ? getGacRootForMono()
+ : System.getenv( "SystemRoot" ) + "\\assembly\\GAC_32\\";
setArtifactGacFile( gacRoot, artifact );
libraries.add( artifact );
}
else if ( type.equals( "gac_msil" ) )
{
- String gacRoot = (compilerRequirement.getVendor().equals(
Vendor.MONO )) ?
- getGacRootForMono() : "C:\\WINDOWS\\assembly\\GAC_MSIL\\";
+ String gacRoot = ( compilerRequirement.getVendor().equals(
Vendor.MONO ) ) ? getGacRootForMono()
+ : System.getenv( "SystemRoot" ) + "\\assembly\\GAC_MSIL\\";
setArtifactGacFile( gacRoot, artifact );
libraries.add( artifact );
}
Modified:
incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryImpl.java
URL:
http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryImpl.java?view=diff&rev=545405&r1=545404&r2=545405
==============================================================================
---
incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryImpl.java
(original)
+++
incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryImpl.java
Thu Jun 7 21:51:49 2007
@@ -195,11 +195,11 @@
if ( vendor.equals( Vendor.MICROSOFT ) &&
( frameworkVersion.equals( "2.0.50727" ) ||
frameworkVersion.equals( "3.0" ) ) )
{
- return new File( "C:\\WINDOWS\\assembly\\GAC_MSIL\\" );
+ return new File( System.getenv("SystemRoot"),
"\\assembly\\GAC_MSIL\\" );
}
else if ( vendor.equals( Vendor.MICROSOFT ) &&
frameworkVersion.equals( "1.1.4322" ) )
{
- return new File( "C:\\WINDOWS\\assembly\\GAC\\" );
+ return new File( System.getenv("SystemRoot"),
"\\assembly\\GAC\\" );
}
else if ( vendor.equals( Vendor.MONO ) && exists() )
{
@@ -241,15 +241,15 @@
}
else if ( artifactType.equals( "gac" ) )
{
- return new File( "C:\\WINDOWS\\assembly\\GAC\\" );
+ return new File( System.getenv("SystemRoot"), "\\assembly\\GAC\\"
);
}
else if ( artifactType.equals( "gac_32" ) )
{
- return new File( "C:\\WINDOWS\\assembly\\GAC_32\\" );
+ return new File(System.getenv("SystemRoot"),
"\\assembly\\GAC_32\\" );
}
else if ( artifactType.equals( "gac_msil" ) )
{
- return new File( "C:\\WINDOWS\\assembly\\GAC_MSIL\\" );
+ return new File( System.getenv("SystemRoot"),
"\\assembly\\GAC_MSIL\\" );
}
throw new PlatformUnsupportedException("NMAVEN-xxx-000: Could not
locate a valid GAC");
}
Modified:
incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoTransitionRuleFactory.java
URL:
http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoTransitionRuleFactory.java?view=diff&rev=545405&r1=545404&r2=545405
==============================================================================
---
incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoTransitionRuleFactory.java
(original)
+++
incubator/nmaven/trunk/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoTransitionRuleFactory.java
Thu Jun 7 21:51:49 2007
@@ -769,10 +769,12 @@
public VendorInfoState process( VendorInfo vendorInfo )
{
logger.debug( "NMAVEN-103-021: Entering State = MFF" );
- File v1 = new File(
"C:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322" );
- File v2 = new File(
"C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727" );
- File v3 = new File( "C:\\Program
Files\\Microsoft.NET\\SDK\\v1.1" );
- File v4 = new File( "C:\\Program
Files\\Microsoft.NET\\SDK\\v2.0" );
+ String systemRoot = System.getenv("SystemRoot");
+ String systemDrive = System.getenv("SystemDrive");
+ File v1 = new File( systemRoot,
"\\Microsoft.NET\\Framework\\v1.1.4322" );
+ File v2 = new File( systemRoot,
"\\Microsoft.NET\\Framework\\v2.0.50727" );
+ File v3 = new File( systemDrive, "\\Program
Files\\Microsoft.NET\\SDK\\v1.1" );
+ File v4 = new File( systemDrive, "\\Program
Files\\Microsoft.NET\\SDK\\v2.0" );
List<File> executablePaths = new ArrayList<File>();
if ( v2.exists() )
Modified:
incubator/nmaven/trunk/components/dotnet-vendor/src/test/java/org/apache/maven/dotnet/vendor/impl/SettingsRepositoryTest.java
URL:
http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-vendor/src/test/java/org/apache/maven/dotnet/vendor/impl/SettingsRepositoryTest.java?view=diff&rev=545405&r1=545404&r2=545405
==============================================================================
---
incubator/nmaven/trunk/components/dotnet-vendor/src/test/java/org/apache/maven/dotnet/vendor/impl/SettingsRepositoryTest.java
(original)
+++
incubator/nmaven/trunk/components/dotnet-vendor/src/test/java/org/apache/maven/dotnet/vendor/impl/SettingsRepositoryTest.java
Thu Jun 7 21:51:49 2007
@@ -28,8 +28,8 @@
Framework framework = new Framework();
framework.setFrameworkVersion("2.0.50727");
-
framework.setInstallRoot("C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727");
- framework.setSdkInstallRoot("C:\\Program
Files\\Microsoft.NET\\SDK\\v2.0");
+ framework.setInstallRoot(System.getenv("SystemRoot") +
"\\Microsoft.NET\\Framework\\v2.0.50727");
+ framework.setSdkInstallRoot(System.getenv("SystemDrive") + "\\Program
Files\\Microsoft.NET\\SDK\\v2.0");
vendor.addFramework( framework );
vendors.add( vendor );
@@ -38,7 +38,7 @@
try
{
File installRoot = settingsRepository.getInstallRootFor(
"MICROSOFT", "2.0.50727", "2.0.50727");
- assertEquals( new
File("C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727"), installRoot );
+ assertEquals( new File(System.getenv("SystemRoot") +
"\\Microsoft.NET\\Framework\\v2.0.50727"), installRoot );
}
catch ( PlatformUnsupportedException e )
{
Modified: incubator/nmaven/trunk/plugins/maven-compile-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compile-plugin/pom.xml?view=diff&rev=545405&r1=545404&r2=545405
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-compile-plugin/pom.xml (original)
+++ incubator/nmaven/trunk/plugins/maven-compile-plugin/pom.xml Thu Jun 7
21:51:49 2007
@@ -26,6 +26,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.dotnet.plugins</groupId>
<artifactId>maven-compile-plugin</artifactId>
+ <version>0.14-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>maven-compile-plugin</name>
<description>
Modified:
incubator/nmaven/trunk/plugins/maven-deploy-plugin/src/main/java/org/apache/maven/dotnet/plugins/DeployFileMojo.java
URL:
http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-deploy-plugin/src/main/java/org/apache/maven/dotnet/plugins/DeployFileMojo.java?view=diff&rev=545405&r1=545404&r2=545405
==============================================================================
---
incubator/nmaven/trunk/plugins/maven-deploy-plugin/src/main/java/org/apache/maven/dotnet/plugins/DeployFileMojo.java
(original)
+++
incubator/nmaven/trunk/plugins/maven-deploy-plugin/src/main/java/org/apache/maven/dotnet/plugins/DeployFileMojo.java
Thu Jun 7 21:51:49 2007
@@ -7,6 +7,7 @@
import org.apache.maven.artifact.deployer.ArtifactDeployer;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.metadata.ArtifactMetadata;
import org.apache.maven.artifact.factory.ArtifactFactory;
@@ -103,7 +104,7 @@
artifact.addMetadata( metadata );
ArtifactRepository deploymentRepository =
- repositoryFactory.createDeploymentArtifactRepository(
repositoryId, url, new AssemblyRepositoryLayout(), true );
+ repositoryFactory.createDeploymentArtifactRepository(
repositoryId, url, new DefaultRepositoryLayout(), true );
try
{
Modified:
incubator/nmaven/trunk/plugins/maven-vstudio-plugin/src/main/java/org/apache/maven/plugin/vstudio/VisualStudioMojo.java
URL:
http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-vstudio-plugin/src/main/java/org/apache/maven/plugin/vstudio/VisualStudioMojo.java?view=diff&rev=545405&r1=545404&r2=545405
==============================================================================
---
incubator/nmaven/trunk/plugins/maven-vstudio-plugin/src/main/java/org/apache/maven/plugin/vstudio/VisualStudioMojo.java
(original)
+++
incubator/nmaven/trunk/plugins/maven-vstudio-plugin/src/main/java/org/apache/maven/plugin/vstudio/VisualStudioMojo.java
Thu Jun 7 21:51:49 2007
@@ -88,7 +88,7 @@
*
* @parameter
*/
- private String frameworkHome =
"C:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322";
+ private String frameworkHome = System.getenv("SystemRoot") +
"\\Microsoft.NET\\Framework\\v1.1.4322";
/**
* This is all the stuff that can be set up about a vs project. It is a
big object.
Modified:
incubator/nmaven/trunk/plugins/netplugins/NMaven.Plugin.Addin/src/main/csharp/NMaven/Plugin/Addin/AutomationExtensibilityMojo.cs
URL:
http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/netplugins/NMaven.Plugin.Addin/src/main/csharp/NMaven/Plugin/Addin/AutomationExtensibilityMojo.cs?view=diff&rev=545405&r1=545404&r2=545405
==============================================================================
---
incubator/nmaven/trunk/plugins/netplugins/NMaven.Plugin.Addin/src/main/csharp/NMaven/Plugin/Addin/AutomationExtensibilityMojo.cs
(original)
+++
incubator/nmaven/trunk/plugins/netplugins/NMaven.Plugin.Addin/src/main/csharp/NMaven/Plugin/Addin/AutomationExtensibilityMojo.cs
Thu Jun 7 21:51:49 2007
@@ -110,7 +110,8 @@
//write XML
XmlSerializer serializer = new
XmlSerializer(typeof(NMaven.Model.Extensibility));
- XmlTextWriter xmlWriter = new
XmlTextWriter(@"c:\tmp\NMavenBuild.AddIn", System.Text.Encoding.Unicode);
+ XmlTextWriter xmlWriter = new
XmlTextWriter(Environment.GetEnvironmentVariable("TMP")
+ + @"\NMavenBuild.AddIn", System.Text.Encoding.Unicode);
xmlWriter.Formatting = Formatting.Indented;
serializer.Serialize(xmlWriter, extensibility);
}
Modified: incubator/nmaven/trunk/plugins/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/pom.xml?view=diff&rev=545405&r1=545404&r2=545405
==============================================================================
--- incubator/nmaven/trunk/plugins/pom.xml (original)
+++ incubator/nmaven/trunk/plugins/pom.xml Thu Jun 7 21:51:49 2007
@@ -16,7 +16,9 @@
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/maven-v4_0_0.xsd">
+-->
+<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/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.maven.dotnet</groupId>
<version>0.14-SNAPSHOT</version>
@@ -25,6 +27,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.dotnet.plugins</groupId>
<artifactId>maven-dotnet-plugins</artifactId>
+ <version>0.14-SNAPSHOT</version>
<packaging>pom</packaging>
<name>maven-dotnet-plugins</name>
<modules>
@@ -43,14 +46,14 @@
<module>maven-repository-plugin</module>
<module>maven-resolver-plugin</module>
<module>maven-test-plugin</module>
- <module>maven-vsinstaller-plugin</module>
+ <module>maven-vsinstaller-plugin</module>
<module>maven-webapp-plugin</module>
<module>maven-xsd-plugin</module>
<module>maven-xsp-plugin</module>
<module>maven-wsdl-plugin</module>
</modules>
<dependencies>
- <dependency>
+ <dependency>
<groupId>org.apache.maven.dotnet</groupId>
<artifactId>dotnet-assembler</artifactId>
<version>${pom.version}</version>
@@ -92,23 +95,6 @@
<reportFormat>plain</reportFormat>
</configuration>
</plugin>
-
- <!--
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <configuration>
- <xdocDirectory>${basedir}/target/generated-site/xdoc</xdocDirectory>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-plugin-plugin</artifactId>
- <configuration>
-
<outputDirectory>${basedir}/target/generated-site/xdoc</outputDirectory>
- </configuration>
- </plugin>
- -->
</plugins>
</build>
<reporting>
@@ -127,5 +113,5 @@
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
- </reporting>
+ </reporting>
</project>