I think that hardly matter. What you have used in your project that only matters.
You also need to install servlet API jar. Because your error list also include that one.
Then I ran mvn compile. This is the error log I got:
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin descriptor for the plugin Plugin [struts:struts] was not found
. Please verify that the plugin JAR D:\Documents and Settings\praneet.mirchandan
i\.m2\repository\struts\struts\1.0.2\struts-1.0.2.jar is intact.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.IllegalStateException: The plugin descriptor for the plugin Plugin [st
ruts:struts] was not found. Please verify that the plugin JAR D:\Documents and S
ettings\praneet.mirchandani\.m2\repository\struts\struts\1.0.2\struts-1.0.2.jar
is intact.
at org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginM
anager.java:360)
at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(De
faultPluginManager.java:224)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPlug
inManager.java:184)
at org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(Def
aultPluginManager.java:1642)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(Defa
ultLifecycleExecutor.java:1540)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifec
ycle(DefaultLifecycleExecutor.java:1503)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycl
eMappings(DefaultLifecycleExecutor.java:1282)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:534)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.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:6
0)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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)
To the original poster: please show the *exact* command you're typing, and put it inside code tags, so we can see where any spaces are. So far it just looksl ike you're not putting quotes around a path that has spaces in it, which will cause the install to fail.
You can also just *look* in the repository to see if it's there, and obviously the dependency needs to be in your POM.
To summarize:
- Post the *exact* command you're using to install, in code tags
- Check to see if it's already in the repository
- Post the POM dependency you're using.
Like I said, you're not quoting a path with a space in it: the computer has no way of knowing that space isn't delimiting commands. I'd also remove the space after the "-Dfile= ".
And *don't* put it in the repository manually--put it somewhere easy (like c:\), then you don't have to worry about spaces at all.
I managed to install the external jar. Thanks David.
But when I ran mvn compile after that, it still threw me errors saying it cannot recognise certain packages which were in the newly installed jar. Any idea why this happened?