maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Komal Agrawal <komal...@gmail.com>
Subject maven: How to include third party library to existing maven project
Date Wed, 01 Dec 2010 14:23:54 GMT
Hello there,

I want to include external jar to my existing maven project. I used
following command to install it to local maven repository:

mvn -e install:install
-Dfile="D:\test\com.project.MyApp.externalLib-1.0.jar" -DgroupId=com.project
-DartifactId=MyApp -Dversion=1.0 -Dpackaging=jar

and got following exception:

org.apache.maven.lifecycle.LifecycleExecutionException: The packaging for
this p
roject did not assign a file to the build artifact

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:539)
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 <http://www.javaranch.com/>:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.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: The packaging for
thi
s project did not assign a file to the build artifact
at org.apache.maven.plugin.install.InstallMojo.execute(InstallMojo.java:
124)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
... 17 more

What needs to be done in this case ? I am not getting any useful articles on
internet as well.

Basic question : It "should" be possible to add a third party non maven
library to a maven project. Is this correct ?

Also, what can I check to have this working ? Its very urgent for me , any
help is highly appreciated.

Thanks,
Komal

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message