Hello all Currently we take over a big project from other team and it had a large logic already. So our team found that in some scriptlet the old team imported some strange lib in scriplet but not used at any places. So my team really want to remove it as we can do in eclipse with Ctrl+O. How can we do that in ivy scriplet? Thanks in advance

asked 10.06.2014 at 11:19

trungdv's gravatar image

trungdv
(suspended)
accept rate: 52%

edited 20.06.2014 at 15:36

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958


The ivyScript editor has no feature to detect unused code. However the fastest way to reveal unused third party libraries in your project is to simply remove the library from your classpath and run the full validation against the local project and all the dependent projects. (Right click -> Validate)

Then the ivyScript validator will show errors for ivyScripts that have used the library. So you can navigate quickly to the places where the library has been used with the "Problems" view. ...and delete script parts if they are just unused imports.

link

answered 20.06.2014 at 14:29

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958
accept rate: 70%

Thanks for your suggestion. I think it's best way. But we just do that for user libraries, not for common libraries (Java, XpertIvy)? We have one time building Hudson failed because somebody import wrong common libraries. Besides, we can't follow good Java coding convention.

(23.06.2014 at 05:02) trungdv trungdv's gravatar image

Run a filesearch and delete it there, so you can be sure it is not used anywhere. If the project is to large to do it in a filesearch, use a unix-regex on your workspace for deletion.

link

answered 10.06.2014 at 13:27

Daniel%20Oechslin's gravatar image

Daniel Oechslin
(suspended)
accept rate: 39%

but the problem is i don't know exactly how many imported lib is unneccessary. that project come from other team. If it is Eclipse you can easily see warning marked point. I don't want to open each scriptlet and check whether there are any unused lib

(10.06.2014 at 13:57) trungdv trungdv's gravatar image

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×52
×33

Asked: 10.06.2014 at 11:19

Seen: 2,624 times

Last updated: 23.06.2014 at 05:02