Terrier Users :  Terrier Forum terrier.org
General discussion about using/developing applications using Terrier 
"The type Version is already defined" error after importing to eclips
Posted by: serina ()
Date: January 09, 2018 10:35AM

hello my friend and terrier users.

I import terrier-core-4.1-ant to eclipse neon.3

but after Import when I want to run it, this error has occured:

"The type Version is already defined" in org.terrier package,in Version class.

I khnow this error may be because this class is defined in other place but i dont have modify of code.

can you help me to resolve that?
thanks very much

Options: ReplyQuote
Re: "The type Version is already defined" error after importing to eclips
Posted by: craigm ()
Date: January 09, 2018 05:52PM

Try using the Maven version instead.

Craig

Options: ReplyQuote
Re: "The type Version is already defined" error after importing to eclips
Posted by: serina ()
Date: January 10, 2018 10:21PM

thanks very much for your attension,

please say me how can I access to Maven version?

Options: ReplyQuote
Re: "The type Version is already defined" error after importing to eclips
Posted by: deeper2 ()
Date: January 11, 2018 03:07AM

Hi,
To build a Maven based project, open your console, change to your terrier project folder where pom.xml file is placed, and issue this command :
>>mvn package
This will download all dependency jar files and execute the Maven “package” phase.

Options: ReplyQuote
Re: "The type Version is already defined" error after importing to eclips
Posted by: serina ()
Date: January 16, 2018 03:14PM

Hi,deeper2()

thanks for yours guide.
I download apache Maven,but when I try to build that in command promt and in that directory type "mvn package"
I recieve this error:
_______________________________________________________________________________

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.apache.maven.plugins:maven-jar-plugin:jar:2.4 is inval
id, transitive dependencies (if any) will not be available, enable debug logging
for more details
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.422 s
[INFO] Finished at: 2018-01-16T18:22:52+03:30
[INFO] Final Memory: 9M/112M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-jar-plugin:2.4 or one of its depen
dencies could not be resolved: Failed to read artifact descriptor for org.apache
.maven.plugins:maven-jar-plugin:jar:2.4: 1 problem was encountered while buildin
g the effective model for org.apache.maven.plugins:maven-jar-plugin:2.4
[ERROR] [FATAL] Non-parseable POM C:\Users\Serina\.m2\repository\org\apache\apac
he\10\apache-10.pom: processing instruction can not have PITarget with reserved
xml name (position: END_TAG seen ...</profiles>\n</project>\n\n<?xml ... @412:7)
@ C:\Users\Serina\.m2\repository\org\apache\apache\10\apache-10.pom, line 412,
column 7
____________________________________________________________________________
please help me.
more ever I add one new weighting model to source of terrier in eclips environment and I want to build this source to I can reach to bin form.
Because to test new weighting model on my collection and index and retrieval it.and see precision that new model.
I use of Maven for that reson,

thank you very much,

Options: ReplyQuote
Re: "The type Version is already defined" error after importing to eclips
Posted by: deeper2 ()
Date: January 17, 2018 07:41AM

Hi,
I cannot find the bugs in your my-app 1.0-SNAPSHOT project, and I think it is simple problem, and you can first use maven with some toy examples, and then with project terrier. 'More haste, less speed'
Good luck!

deeper2

Options: ReplyQuote
Re: "The type Version is already defined" error after importing to eclips
Posted by: craigm ()
Date: January 17, 2018 01:50PM

Hi,

I agree with deeper2. Perhaps you have a friend that is familiar with Maven or other java build systems that can help. This is fairly straightforward stuff.

Craig

Options: ReplyQuote
Re: "The type Version is already defined" error after importing to eclips
Posted by: serina ()
Date: January 17, 2018 10:09PM

hi my friend,

I dont have any friend.I think that I can give help from you.
I really need to help because I must test My new model.please say me what problem was in my work?


Thanks very much for your attention.

Options: ReplyQuote


Sorry, only registered users may post in this forum.
This forum powered by Phorum.