Author: sisbell Date: Tue May 29 02:13:13 2007 New Revision: 542468 URL: http://svn.apache.org/viewvc?view=rev&rev=542468 Log: Fixed problem with maven embedder not starting up (regression). Updated docs for VS addin.
Added: incubator/nmaven/trunk/site/src/site/images/VS2005-LoadSolution.JPG (with props) incubator/nmaven/trunk/thirdparty/NUnit/NUnit.Framework-2.2.8.0.pom (with props) Modified: incubator/nmaven/trunk/archetypes/maven-archetype-dotnet-simple/pom.xml incubator/nmaven/trunk/archetypes/maven-archetype-netexecutable/pom.xml incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Controls/MavenBuildControl.cs incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.cs incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs incubator/nmaven/trunk/assemblies/NMaven.VisualStudio/src/main/csharp/NMaven/VisualStudio/Logging/OutputWindowPaneHandler.cs incubator/nmaven/trunk/components/dotnet-jetty/src/main/java/org/apache/maven/dotnet/jetty/JettyStarter.java incubator/nmaven/trunk/maven-dotnet.iml incubator/nmaven/trunk/plugins/maven-embedder-plugin/pom.xml incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java incubator/nmaven/trunk/site/src/site/apt/ide/visual-studio.apt incubator/nmaven/trunk/site/src/site/images/VS2005-StartAddin.JPG Modified: incubator/nmaven/trunk/archetypes/maven-archetype-dotnet-simple/pom.xml URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/archetypes/maven-archetype-dotnet-simple/pom.xml?view=diff&rev=542468&r1=542467&r2=542468 ============================================================================== --- incubator/nmaven/trunk/archetypes/maven-archetype-dotnet-simple/pom.xml (original) +++ incubator/nmaven/trunk/archetypes/maven-archetype-dotnet-simple/pom.xml Tue May 29 02:13:13 2007 @@ -9,6 +9,5 @@ <groupId>org.apache.maven.dotnet</groupId> <artifactId>maven-archetype-dotnet-simple</artifactId> <packaging>maven-plugin</packaging> - <name>Archetype - maven-archetype-dotnet-simple</name> - <url>http://maven.apache.org</url> + <name>maven-archetype-dotnet-simple</name> </project> Modified: incubator/nmaven/trunk/archetypes/maven-archetype-netexecutable/pom.xml URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/archetypes/maven-archetype-netexecutable/pom.xml?view=diff&rev=542468&r1=542467&r2=542468 ============================================================================== --- incubator/nmaven/trunk/archetypes/maven-archetype-netexecutable/pom.xml (original) +++ incubator/nmaven/trunk/archetypes/maven-archetype-netexecutable/pom.xml Tue May 29 02:13:13 2007 @@ -9,6 +9,5 @@ <groupId>org.apache.maven.dotnet</groupId> <artifactId>maven-archetype-netexecutable</artifactId> <packaging>maven-plugin</packaging> - <name>Archetype - maven-archetype-netexecutable</name> - <url>http://maven.apache.org</url> + <name>maven-archetype-netexecutable</name> </project> Modified: incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Controls/MavenBuildControl.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Controls/MavenBuildControl.cs?view=diff&rev=542468&r1=542467&r2=542468 ============================================================================== --- incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Controls/MavenBuildControl.cs (original) +++ incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Controls/MavenBuildControl.cs Tue May 29 02:13:13 2007 @@ -42,6 +42,8 @@ private DTE2 applicationObject; + private FileInfo warFileInfo; + public event EventHandler ClearOutputWindow; public event EventHandler FocusOutputWindow; @@ -50,12 +52,13 @@ { } - public void Init(Logger logger, int loggerPort, Size treeSize, + public void Init(FileInfo warFileInfo, Logger logger, int loggerPort, Size treeSize, DTE2 applicationObject) { this.loggerPort = loggerPort; this.logger = logger; this.applicationObject = applicationObject; + this.warFileInfo = warFileInfo; ideContext = new IdeContextImpl(); IIdeConfiguration configuration = Factory.CreateIdeConfiguration(); @@ -163,19 +166,19 @@ this.treeView = new System.Windows.Forms.TreeView(); this.toolStrip1.SuspendLayout(); this.SuspendLayout(); - // + // // toolStrip1 - // + // this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripDropDownButton1}); this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(380, 25); + this.toolStrip1.Size = new System.Drawing.Size(319, 25); this.toolStrip1.TabIndex = 1; this.toolStrip1.Text = "toolStrip1"; - // + // // toolStripDropDownButton1 - // + // this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.serverToolStripMenuItem, @@ -184,55 +187,55 @@ this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; this.toolStripDropDownButton1.Size = new System.Drawing.Size(70, 22); this.toolStripDropDownButton1.Text = "Options"; - // + // // serverToolStripMenuItem - // + // this.serverToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.startToolStripMenuItem, this.stopToolStripMenuItem}); this.serverToolStripMenuItem.Name = "serverToolStripMenuItem"; - this.serverToolStripMenuItem.Size = new System.Drawing.Size(195, 22); + this.serverToolStripMenuItem.Size = new System.Drawing.Size(176, 22); this.serverToolStripMenuItem.Text = "Server"; - // + // // startToolStripMenuItem - // + // this.startToolStripMenuItem.Name = "startToolStripMenuItem"; this.startToolStripMenuItem.Size = new System.Drawing.Size(122, 22); this.startToolStripMenuItem.Text = "Start"; this.startToolStripMenuItem.Click += new System.EventHandler(this.startToolStripMenuItem_Click); - // + // // stopToolStripMenuItem - // + // this.stopToolStripMenuItem.Name = "stopToolStripMenuItem"; this.stopToolStripMenuItem.Size = new System.Drawing.Size(122, 22); this.stopToolStripMenuItem.Text = "Stop"; this.stopToolStripMenuItem.Click += new System.EventHandler(this.stopToolStripMenuItem_Click); - // + // // refreshSolutionToolStripMenuItem - // + // this.refreshSolutionToolStripMenuItem.Name = "refreshSolutionToolStripMenuItem"; - this.refreshSolutionToolStripMenuItem.Size = new System.Drawing.Size(195, 22); + this.refreshSolutionToolStripMenuItem.Size = new System.Drawing.Size(176, 22); this.refreshSolutionToolStripMenuItem.Text = "Load Solution"; this.refreshSolutionToolStripMenuItem.Click += new System.EventHandler(this.refreshSolutionToolStripMenuItem_Click); - // + // // treeView - // - this.treeView.Location = new System.Drawing.Point(4, 29); + // + this.treeView.Location = new System.Drawing.Point(0, 40); this.treeView.Name = "treeView"; treeNode1.Name = ""; treeNode1.Text = "No Solution Loaded"; this.treeView.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { treeNode1}); - this.treeView.Size = new System.Drawing.Size(373, 169); + this.treeView.Size = new System.Drawing.Size(316, 316); this.treeView.TabIndex = 2; this.treeView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.treeView_MouseUp); - // + // // MavenBuildControl - // + // this.Controls.Add(this.treeView); this.Controls.Add(this.toolStrip1); this.Name = "MavenBuildControl"; - this.Size = new System.Drawing.Size(380, 201); + this.Size = new System.Drawing.Size(319, 359); this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); this.ResumeLayout(false); @@ -288,11 +291,6 @@ logger.Log(Level.INFO, "Maven embedder already Started."); return; } - String localRepository = Environment.GetEnvironmentVariable("HOMEDRIVE") - + Environment.GetEnvironmentVariable("HOMEPATH") + @"\.m2\repository\"; - ArtifactContext artifactContext = new ArtifactContext(); - NMaven.Artifact.Artifact artifactWar = artifactContext.CreateArtifact("org.apache.maven.dotnet", "dotnet-service-embedder", "0.14-SNAPSHOT", "war"); - FileInfo warFileInfo = new FileInfo(localRepository + "/" + new JavaRepositoryLayout().pathOf(artifactWar) + "war"); logger.Log(Level.INFO, "Executing external command plugin: Command = " + @"mvn org.apache.maven.dotnet.plugins:maven-embedder-plugin:start -Dport=8080 -DwarFile=""" + warFileInfo.FullName + @""""); ProcessStartInfo processStartInfo = @@ -340,6 +338,12 @@ mavenProjects = ideContext.GetMavenProjectsFrom(fileInfo.Directory); } catch (IOException ex) + { + logger.Log(Level.INFO, "Unable to load solution. Try starting the server: Message = " + + ex.Message); + return; + } + catch (WebException ex) { logger.Log(Level.INFO, "Unable to load solution. Try starting the server: Message = " + ex.Message); Modified: incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.cs?view=diff&rev=542468&r1=542467&r2=542468 ============================================================================== --- incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.cs (original) +++ incubator/nmaven/trunk/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.cs Tue May 29 02:13:13 2007 @@ -38,7 +38,7 @@ InitializeComponent(); MavenBuildControl mavenBuildControl = new MavenBuildControl(); mavenBuildControl.Size = size; - mavenBuildControl.Init(logger, 9099, size, null); + mavenBuildControl.Init(null, logger, 9099, size, null); this.Controls.Add(mavenBuildControl); //MavenDependencyUserControl mpuc = new MavenDependencyUserControl(); //this.Controls.Add(mpuc); Modified: incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs?view=diff&rev=542468&r1=542467&r2=542468 ============================================================================== --- incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs (original) +++ incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs Tue May 29 02:13:13 2007 @@ -142,7 +142,7 @@ _applicationObject = (DTE2)application; mavenBuildControl = (MavenBuildControl)_windowToolWindow.Object; - mavenBuildControl.Init(logger, 9099, new Size(400, 400), _applicationObject); + mavenBuildControl.Init(warFileInfo, logger, 9099, new Size(400, 400), _applicationObject); mavenBuildControl.ClearOutputWindow += new EventHandler(ClearOutputWindowPane); mavenBuildControl.FocusOutputWindow += new EventHandler(ActivateOutputWindowPane); } Modified: incubator/nmaven/trunk/assemblies/NMaven.VisualStudio/src/main/csharp/NMaven/VisualStudio/Logging/OutputWindowPaneHandler.cs URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/assemblies/NMaven.VisualStudio/src/main/csharp/NMaven/VisualStudio/Logging/OutputWindowPaneHandler.cs?view=diff&rev=542468&r1=542467&r2=542468 ============================================================================== --- incubator/nmaven/trunk/assemblies/NMaven.VisualStudio/src/main/csharp/NMaven/VisualStudio/Logging/OutputWindowPaneHandler.cs (original) +++ incubator/nmaven/trunk/assemblies/NMaven.VisualStudio/src/main/csharp/NMaven/VisualStudio/Logging/OutputWindowPaneHandler.cs Tue May 29 02:13:13 2007 @@ -29,7 +29,7 @@ { if(record.GetLevel().GetValue() >= level.GetValue()) { - outputWindowPane.OutputString(record.GetMessage() + Environment.NewLine); + outputWindowPane.OutputString(record.GetMessage().Trim() + Environment.NewLine); } } Modified: incubator/nmaven/trunk/components/dotnet-jetty/src/main/java/org/apache/maven/dotnet/jetty/JettyStarter.java URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-jetty/src/main/java/org/apache/maven/dotnet/jetty/JettyStarter.java?view=diff&rev=542468&r1=542467&r2=542468 ============================================================================== --- incubator/nmaven/trunk/components/dotnet-jetty/src/main/java/org/apache/maven/dotnet/jetty/JettyStarter.java (original) +++ incubator/nmaven/trunk/components/dotnet-jetty/src/main/java/org/apache/maven/dotnet/jetty/JettyStarter.java Tue May 29 02:13:13 2007 @@ -20,7 +20,7 @@ { try { - logger.addHandler( new FileHandler( "C:\\tmp\\nmaven-jetty.log" ) ); + logger.addHandler( new FileHandler(System.getProperty( "user.home" ) + "\\.m2\\jetty-log.xml" ) ); } catch ( IOException e ) { Modified: incubator/nmaven/trunk/maven-dotnet.iml URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/maven-dotnet.iml?view=diff&rev=542468&r1=542467&r2=542468 ============================================================================== --- incubator/nmaven/trunk/maven-dotnet.iml (original) +++ incubator/nmaven/trunk/maven-dotnet.iml Tue May 29 02:13:13 2007 @@ -70,6 +70,7 @@ <sourceFolder url="file://$MODULE_DIR$/plugins/maven-link-plugin/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/plugins/maven-mojo-generator-plugin/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/plugins/maven-ncover-plugin/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/plugins/maven-release-plugin/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/plugins/maven-resgen-plugin/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/plugins/maven-resolver-plugin/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/plugins/maven-sandcastle-plugin/src/main/java" isTestSource="false" /> Modified: incubator/nmaven/trunk/plugins/maven-embedder-plugin/pom.xml URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-embedder-plugin/pom.xml?view=diff&rev=542468&r1=542467&r2=542468 ============================================================================== --- incubator/nmaven/trunk/plugins/maven-embedder-plugin/pom.xml (original) +++ incubator/nmaven/trunk/plugins/maven-embedder-plugin/pom.xml Tue May 29 02:13:13 2007 @@ -22,7 +22,7 @@ <groupId>org.apache.maven.dotnet.plugins</groupId> <version>0.14-SNAPSHOT</version> <artifactId>maven-dotnet-plugins</artifactId> - </parent> + </parent> <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.dotnet.plugins</groupId> <artifactId>maven-embedder-plugin</artifactId> @@ -39,7 +39,7 @@ <dependency> <groupId>org.apache.maven.dotnet</groupId> <artifactId>dotnet-artifact</artifactId> - <version>${pom.version}</version> + <version>${pom.version}</version> </dependency> <dependency> <groupId>org.apache.maven.dotnet</groupId> Modified: incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java?view=diff&rev=542468&r1=542467&r2=542468 ============================================================================== --- incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java (original) +++ incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java Tue May 29 02:13:13 2007 @@ -113,10 +113,7 @@ */ private String frameworkVersion; - /** - * @parameter expression = "${pom.version}" - */ - private String pomVersion; + private String pomVersion = "0.14-SNAPSHOT"; /** * File logger: needed for creating logs when the IDE starts because the console output and thrown exceptions are @@ -134,7 +131,8 @@ { try { - logger.addHandler( new FileHandler( "C:\\tmp\\nmaven-embedder-jetty.log" ) ); + logger.addHandler( + new FileHandler( System.getProperty( "user.home" ) + "\\.m2\\nmaven-embedder-log.xml" ) ); } catch ( IOException e ) { Modified: incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java?view=diff&rev=542468&r1=542467&r2=542468 ============================================================================== --- incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java (original) +++ incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java Tue May 29 02:13:13 2007 @@ -78,7 +78,7 @@ localRepository = new File( System.getProperty( "user.home" ), ".m2/repository" ); } artifactContext.init( project, project.getRemoteArtifactRepositories(), localRepository ); - + Artifact artifact = project.getArtifact(); try { Modified: incubator/nmaven/trunk/site/src/site/apt/ide/visual-studio.apt URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/site/src/site/apt/ide/visual-studio.apt?view=diff&rev=542468&r1=542467&r2=542468 ============================================================================== --- incubator/nmaven/trunk/site/src/site/apt/ide/visual-studio.apt (original) +++ incubator/nmaven/trunk/site/src/site/apt/ide/visual-studio.apt Tue May 29 02:13:13 2007 @@ -77,26 +77,29 @@ * Startup Visual Studio 2005 by clicking on a generated solution file - * Click on a project file - - * Start the NMaven addin [Tool/NMavenAddin]. The addin will start and make a connection to an embedder jetty server + * Start the NMaven addin [Tool/NMaven Build System]. The addin will start and make a connection to an embedder jetty server hosting the maven embedder. [] [../images/VS2005-StartAddin.JPG] - * After a few moments you should see a frame appear containing a list of maven projects, by artifact ID. Right click - on one of the projects to do a build. You will see the output within the output pane. + * After a few moments you should see a window appear. Dock the window. + + * Click on a project file + + * Under options, click "Load Solution" [] -[../images/VS2005-Menu.JPG] +[../images/VS2005-LoadSolution.JPG] - * After you are done, you will need to manually shut down the jetty server by killing the process. + * After a few moments you should see a frame appear containing a list of maven projects, by artifact ID. Right click + on one of the projects to do a build. You will see the output within the output pane. [] -[../images/VS2005-SHUTDOWN.JPG] + +[../images/VS2005-Menu.JPG] * Debugging Added: incubator/nmaven/trunk/site/src/site/images/VS2005-LoadSolution.JPG URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/site/src/site/images/VS2005-LoadSolution.JPG?view=auto&rev=542468 ============================================================================== Binary file - no diff available. Propchange: incubator/nmaven/trunk/site/src/site/images/VS2005-LoadSolution.JPG ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Modified: incubator/nmaven/trunk/site/src/site/images/VS2005-StartAddin.JPG URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/site/src/site/images/VS2005-StartAddin.JPG?view=diff&rev=542468&r1=542467&r2=542468 ============================================================================== Binary files - no diff available. Added: incubator/nmaven/trunk/thirdparty/NUnit/NUnit.Framework-2.2.8.0.pom URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/thirdparty/NUnit/NUnit.Framework-2.2.8.0.pom?view=auto&rev=542468 ============================================================================== --- incubator/nmaven/trunk/thirdparty/NUnit/NUnit.Framework-2.2.8.0.pom (added) +++ incubator/nmaven/trunk/thirdparty/NUnit/NUnit.Framework-2.2.8.0.pom Tue May 29 02:13:13 2007 @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?><project> + <modelVersion>4.0.0</modelVersion> + <groupId>NUnit</groupId> + <artifactId>NUnit.Framework</artifactId> + <packaging>library</packaging> + <version>2.2.8.0</version> +</project> \ No newline at end of file Propchange: incubator/nmaven/trunk/thirdparty/NUnit/NUnit.Framework-2.2.8.0.pom ------------------------------------------------------------------------------ svn:eol-style = native