Cannot resolve symbol 'scp' in IntelliJ IDEA 11 Ant build script - ant

I'm running IntelliJ IDEA 11 on Ubuntu Linux. I have an existing project that I've imported into IDEA with a build script that performs a bunch of <scp> tasks. IntelliJ is underlining all of my <scp> tasks and giving me the message of cannot resolve symbol even though I have jsch-0.1.42.jar both on my Global Classpath in IntelliJ as well as on the Additional Classpath for this specific Ant file.
What do I need to do so that IntelliJ will recognize <scp> as a valid task?

I was having this same problem with IntelliJ version 12.1.4. I solved it by putting jsch-0.1.50.jar into the default ant directory of IntelliJ (IntelliJ IDEA 12.1.4\lib\ant\lib).

We can't reproduce the problem, scp is correctly recognized in the editor and works with just jsch-0.1.45.jar added to the Additional Classpath:
Please submit a bug with an isolated test case and the steps to reproduce if you still have this problem.

You can solve your problem for all additional jar by installing them in a user scope.
If you have an ant installation, run
ant -f fetch.xml -Ddest=user
A step by step can be found here

Related

Ant lib cannot be found in Cygwin

I added ant-contrib-1.0b3.jar into ANT lib folder. But when I executed ANT performance monitor task in Cygwin, it still reported CLASS NOT FOUND.
However, if I do same job in Windows command-line, the building is working fine.
Is there anyone knows what is going on?
BTW, I confirmed that WIN-CMD and Cygwin are using same ANT.
Thanks
Try this approach:
There isn't antlib.xml in my ant-contrib-0.3
Create a target that automatically installs ant-contrib if it's missing.

Intellij's live inspection fails to find external references in ANT build files

I have a project with different modules bundled into each others.
We build with ant and I have no problem running the Ant build inside Intellij if I provide the path to the generic build files through a property (repository.dir : C:/myRepositoryFolder).
Similarly, I have no problem running my ant build in command line given I have set my environment variable ANT-OPTS with -Drepository.dir=C:/myRepositoryFolder
However, Intellij does not know where to find this folder and therefore the inspection 'Ant inspections / Ant references resolve problems' blow off on most of my build.xml.
Does anybody know where I can show Intellij where to find this folder without modifying my existent build.properties?
Thanks in advance!

Compile NMAKE created make files in Jenkins

I am quite new to Jenkins and build, so my question can be silly.
I have installed Jenkins and successfully installed plugins under jenkins MSbuild, Nant and Clear Case plugin and its giving expected output.
Problem is I have my own makefiles created in NMAKE for each components and i want to compile it with cmake as it there is no other way to compile NMAKE under jenkins.
just not getting ways to do it, please tell me the plugin to be used to compile make files created using namke under jenkins.
Xshell plugin is the solution.
It runs all my NMAKE scripts on cmd and i get the expected output. thanks for prompt response slav.
Don't know anything about cmake/nmake, but there is a cmake plugin for Jenkins, and this blog post shows configuration and mentions nmake. Is that not enough?

Build fails on running ant script

When I try to run an ant script (./ant clean or ./ant setup), my build fails with:
java.lang.ClassNotFoundException: org.apache.oro.text.perl.Perl5Util
I found something similar at NoClassDefFoundError problems with help of Apache Commons Validator, but this is my first brush with ant and I'm lost on the jargon. Could you please elaborate if I'm having the same issue, and what it is (in layman terms)?
Thanks!
There is a jar file missing. Maybe you can get it here
I changed the ant version from 1.8.3 to 1.7.1 in my user.properties and it worked. Turns out, 1.8.x in our repository doesn't have the p4 integration files. Why it's there in the repository in the first place is a different question.

Can not compile Nutch1.4 with ant

all
I'm trying to deploy Nutch1.4 to Hadoop cluster(following this page). I got some problems when compiling Nutch with ant.
problem 1
When I run ant command, I got the following error:
/home/xenserver/apache-nutch-1.4-bin/build.xml:71: invalid Date syntax in "01/25/1971 2:00 pm"
I remove attribute "datetime" from line 71 in file build.xml and run ant again. Then I got another problem.
problem 2
The error is:
/home/xenserver/apache-nutch-1.4/build.xml:412: syntax errors in ivy file: java.text.ParseException: http://java.sun.com/xml/jaxp/properties/schemaLanguage in file:/home/xenserver/apache-nutch-1.4/ivy/ivy.xml
at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.parse(XmlModuleDescriptorParser.java:273)
........
What's wrong with the steps above? Is there any tutorial for compiling Nutch1.4?
Need your help.Thanks in advance.
For compiling nutch 1.4, all you have to do is run ant clean deploy from the nutch directory. The output is created in the directory named 'runtime' with 2 folders: one for local mode and other one for cluster mode.
please check the date settings and ant installation on your machine. I think that is casing the issue. Also have you tampered/ edited /home/xenserver/apache-nutch-1.4/ivy/ivy.xml ? Please check that file too.
EDIT:
There is some problem with the build file when executed on your Linux box.
Check these out: this and this.
These are the things that you should verify on your setup:
java version and ant version : dont use old ones. get the latest ones or ones that are compatible with your nutch release. FYI: for nutch-1.4 I am using apache-ant-1.8.3 and java jdk1.6.0_18. This combination works perfectly fine with me.
Check that you have installed a JDK and not a JRE
Check if your JAVA_HOME environment variable point to the JDK. System PATH variable must have $JAVA_HOME/bin and $ANT_HOME/bin appended to it. ANT_HOME variable must point to the ant installation directory.
Can you successfully run normal ant targets on any other build files ? try out with small ant build file.
Still facing the same issue, run ant command with -v option. This will provide more information about the error faced.
eg.
ant -v clean deploy

Resources