last day (14 days later) » 

11:12 AM
0
A: Adding a system dependency to Maven

Prasad Khodethis is how I add system dependency to my maven pom.xml. with in the project root path, I have created lib directory and there I have placed my jar file. <dependency> <groupId>com.sshx</groupId> <artifactId>sshx</artifactId> <version>1.0</version> <scope>system</scope> <syste...

 
I manually added the jar file to my .m2 repo. Now, it is under the proper directories and the jar is there. But, I still get this error
 
does manually means issuing the mvn install command?? have you updated your dependency in your pom.xml file as mentioned above?
 
I used mvn install:install-file -Dfile=<path-to-file> -DgroupId=edu.xxx.cs -DartifactId=aggr -Dversion=0.99 -Dpackaging=jar I changed the dependency to <dependency> <groupId>edu.xxx.cs</groupId> <artifactId>aggr</artifactId> <version>0.99</version> </dependency>
 
try to refresh your project once from IDE or issue mvn clean install command and try
 
I don't have this setup on an IDE. I am making changes via sublime and building using mvn. So, I should just use mvn clean install from the dir that contains pom.xml?
 
11:12 AM
yes, you need to use mvn clean install to re-build the project so that your changes take effect
 
When I build the project I already do a clean since I use mvn -Dhadoop.version=2.2.0 -Dscala-2.11 -DskipTests clean package
 
11:29 AM
and still u r facing the same issue??
 
can you delete the target folder and re-issue the command
 
which target folder?
 
with in your project, maven will create target folder, delete this folder and issue the clean command once again
 
ok, trying
still the same error
 
11:39 AM
ok
do one thing
first delete the dependency that is there in you .m2 repository first
 
okay
 
then issue mvn install command
 
then delete target directory
then mvn clean command
lets do one by one from begining
lets see if it works out
 
okay
 
11:42 AM
and by the by what issue u r facing
do u have the log ?
 
when I try to add the import statement for my jar
it says object edu not found
[ERROR] /Users/Raggy/Downloads/spark-1.3.0-3/core/src/main/scala/org/apache/spark/scheduler/ResultTask.scala:28: not found: object edu
[ERROR] import edu.purdue.cs.aggr.accumulators._
[ERROR] ^
 
hmmm
 
okay, I have deleted the dependency
did mvn install again
deleted the target dir
and then did mvn clean
 
any +ve result?
 
should I build it now?
building it npw
now
I think that might have fixed it
Waiting for the jar to be produced
 
11:54 AM
ya please go ahead and build your application
 
problem solved
thanks a bunch!
 
u r welcome
jus accept n upvote the answer
 
12:08 PM
for sure
 

last day (14 days later) »