build, install, test, clean of Npanday VS Addin path1 error

Jun 26, 2009 at 3:55 AM

With a simple VB project if i try to use build, install, test, clean either for current project or all projects gives me this error:

Error in Starting Maven Process: Value cannot be null.
Parameter name: path1

Sep 25, 2009 at 2:13 PM

Anyone know how to fix this?  I'm having the same problem.

Sep 25, 2009 at 9:38 PM

Im having the same problem, it makes the plugin useless :(

Developer
Sep 25, 2009 at 11:02 PM

I haven't seen this happen. What version of Visual Studio are you using?  Can someone provide a sample project and the steps to reproduce it?  (You can open a new issue and attach it.)  -Wendy

Sep 28, 2009 at 2:27 AM

I'm using visual studio 2005 SP1, and with every project that I tried, I get the same error, can I attach some log file or something?

There are other problems too: When I click in the context menu's option "Change Maven settings.xml" the dialog box shows an empty textbox and i't read only, if I click in "Browse", the dialog box simply disappear.

I think that I have everything configured ok (my local repository, my settings.xml), what could be the problem?

Thanks!

Coordinator
Sep 29, 2009 at 3:30 AM

Hi,

We would be more helpful if we can have more information. You can open an Issue and attach your sample projects there and please also provide the environment (path variables, maven versions, java versions, .net frameworks... ) in the Issue.

Thanks,

 

Coordinator
Sep 29, 2009 at 3:33 AM

We also have a channel in FreeNode #npanday if you want to converse in real time. We aren't online 24/7 though :)

 

Sep 29, 2009 at 2:10 PM

 

Regarding the path1 error:  Is it possible maven is failing to find the settings.xml file?  Maven can find it when it is run from the command line, but when I click "change maven settings.xml" in the npanday menu in visual studio, it shows an empty path.  I've tried to click "browse" and change this path, but nothing happens when I click the button.
Maven seems to be able to build & install this project from the command line. 
Writing resource file...  Done.
[INFO] [compile:compile {execution: default-compile}]
[INFO] NPANDAY-066-013: Found Vendor = Vendor = MICROSOFT, Vendor Version = 3.5, Framework Version = 3.5, Executable Paths = 
[INFO] NPANDAY-068-003: Compiling Artifact: Vendor = MICROSOFT, Language = MICROSOFT, Assembly Name = C:\Users\benkraft\Documents\Visual Studio 2008\Projects\npandayform4\npandayform4\target\npandayform4.exe
npandayform4\target\2993949\Form1.cs(6,14): error CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)
npandayform4\target\2993949\Program.cs(3,14): error CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] NPANDAY-900-006: Unable to Compile: Language = C_SHARP, Vendor = null, ArtifactType = winexe, Source Directory = C:\Users\benkraft\Documents\Visual Studio 2008\Projects\npandayform4\npandayform4
Embedded error: NPANDAY-040-001: Could not execute: Command = CMD.EXE /X /C csc @"C:\Users\benkraft\Documents\Visual Studio 2008\Projects\npandayform4\npandayform4\target\2993949\responcefile.rsp", Result = 1
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: NPANDAY-900-006: Unable to Compile: Language = C_SHARP, Vendor = null, ArtifactType = winexe, Source Directory = C:\Users\benkraft\Documents\Visual Studio 2008\Projects\npandayform4\npandayform4
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: NPANDAY-900-006: Unable to Compile: Language = C_SHARP, Vendor = null, ArtifactType = winexe, Source Directory = C:\Users\benkraft\Documents\Visual Studio 2008\Projects\npandayform4\npandayform4
at npanday.plugin.compile.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1032)
at npanday.plugin.compile.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:673)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: npanday.executable.ExecutionException: NPANDAY-040-001: Could not execute: Command = CMD.EXE /X /C csc @"C:\Users\benkraft\Documents\Visual Studio 2008\Projects\npandayform4\npandayform4\target\2993949\responcefile.rsp", Result = 1
at npanday.executable.CommandExecutor$Factory$1.executeCommand(CommandExecutor.java:371)
at npanday.executable.compiler.impl.BaseCompiler.execute(BaseCompiler.java:129)
at npanday.plugin.compile.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1013)
... 20 more

 

Sep 29, 2009 at 2:48 PM

Fixed my path1 error:

Turns out the M2_HOME environment variable was not set on my system.  I think this should be set by maven when it installs; for some reason this must have failed on my system.  

I set the M2_HOME variable using the control panel, restarted visual studio (windows programs get updates to the environment until they are restarted...), and was able to set my settings.xml file using the npanday sub-menu in VS.  

To verify M2_Home is set correctly:

 

c:\Users\benkraft>echo %M2_HOME%
echo %M2_HOME%
C:\Program Files\apache-maven-2.2.1

***

c:\Users\benkraft>echo %M2_HOME%

echo %M2_HOME%

C:\Program Files\apache-maven-2.2.1

***
I imagine this will work for you as well.

Sep 29, 2009 at 3:01 PM

Simply put, I failed to follow the installation directions at http://maven.apache.org/download.html.

Sep 29, 2009 at 4:26 PM

It also worked for me (http://npanday.codeplex.com/WorkItem/View.aspx?WorkItemId=10701).

Greetings.