I'm newbie with Ivy and ant. I'm using ant with Ivy to try to get JSTL1.2. I can get it successful but the name of the jar file is jstl. When I use it in my jsp I got the error "The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved". But When I change the jar file to jstl-1.2 then it works well.
I don't know why I got this issue. Please help me. This is the dependencies I used:
Thanks so much
Try changing from:
<dependency org="jstl" name="jstl" rev="1.2"/>
to:
<dependency org="javax.servlet" name="jstl" rev="1.2"/>
Related
I am using ant as a build tool and using Ivy for dependency management.
<dependency conf="compile->master;runtime->default" org="org.springframework" name="spring-web" rev="5.1.6.RELEASE"/>
<dependency conf="compile->master;runtime->default" org="io.projectreactor.netty" name="reactor-netty" rev="0.9.6.RELEASE"/>
Now when I give ant build it is failing to find the jar, the problem is it is attaching linux-x86_64.
It is searching for below jar
http://companyRepo:8081/nexus/content/groups/OfficialDevelopment/io/netty/netty-transport-native-epoll/4.1.48.Final/netty-transport-native-epoll-4.1.48.Final-linux-x86_64.jar
Why is it searching for linux-x86_64 ?
I searched and found similar issues but not sure on the solution.
https://github.com/netty/netty/issues/7101
How to build netty-transport-native-epoll-4.0.32.Final-linux-x86_64.jar?
I have no idea about ant but its basically the "classifier". Please check the ant /ivy documentation on how you can specify a classifier
I'm not an Ivy user, but I believe you need to add a dependency for netty-transport-native-epoll with a nested artifact for the classified native libraries. Something like this:
<dependency org="io.netty" name="netty-transport-native-epoll" rev="4.1.48.Final">
<artifact name="netty-transport-native-epoll"/>
<artifact name="netty-transport-native-epoll" e:classifier="linux-x86_64"/>
</dependency>
I usually use https://mvnrepository.com/ to figure out different dependency syntaxes, and the Ivy descriptors are included, but it seems that, unlike Nexus et. al., it does not support searching by classifier.
I have a project that makes use of some third-party libraries. Some of these drag in transitive dependencies that have actually several artifacts in the repository:
module-1.2.jar
module-1.2-sources.jar
module-1.2-tests.jar
My investigations tought me that these seem to be Maven build artifacts that where propagated with a classifier. Now it seems that IVY is well able to handle the sources file but when I declare a dependency like this, it appears that the wrong jar is selected:
<dependency org="acme" module="module" rev="1.2"/>
When I do a resolve in ANT like this
<ivy:resolve conf="${ivy.non.test.confs}" validate="false" refresh="true" />
<ivy:retrieve conf="${ivy.non.test.confs}" pattern="${build.lib}/[conf]/[artifact].[ext]" sync="true" />
it happens that the module-1.2-tests.jar is selected as resolve target and retrieved under the name of the actual jar name (module-1.2.jar in this example).
What am I doing wrong here?
I got the build working by adding user.install.root and set up the profile value in taskdef,
<taskdef name="wasejbjar" classname="com.ibm.websphere.ant.tasks.WsEjbDeploy" classpath="D:\IBM\WebSphere\AppServer\plugins\com.ibm.ws.runtime.jar;D:\IBM\WebSphere\AppServer\profiles\AppSrv01\;" >
</taskdef>
<wasejbjar inputJar="${build.root.dir}/ejbtemp/${undeployed.ejb.name}-TMP.jar" wasHome="D:\IBM\WebSphere\AppServer\profiles\AppSrv01\" workingDirectory="${build.root.dir}/ejbtemp" outputJar="${build.lib.dir}/${undeployed.ejb.name}.jar" classpathref="all.ejb.path" noValidate="false" noWarnings="false" noInform="true" trace="false" quiet="false"/>
But even now I get the following error as:
[wsejbdeploy] java.lang.NoClassDefFoundError: com/ibm/etools/ejbdeploy/EJBDeploy [wsejbdeploy] Caused by: java.lang.ClassNotFoundException: com.ibm.etools.ejbdeploy.EJBDeploy
Can anybody tell me why this is happening?
Referencing arbitrary JARs from WAS_HOME/plugins is not supported. I believe the supported use of the Ant task is to use the WAS_HOME/bin/ws_ant script. (Unfortunately, it's a quite old version of Ant.)
I found the issue and resolved it. I marked the jar file as _old, which resolved the issue.
The path is as follows, D:\IBM\WebSphere\AppServer\java\lib\ibmorbtools_old.jar.
This is because in one of the forum, i read that the ibmorbtools.jar in Java conflict with websphere.
Thanks for all.
I would like to use 'ant-contrib', but I could not use it. I tried to use 3 way, without success.
Apache Ant(TM) version 1.8.2
echo $ANT_HOME
/usr/share/ant
./usr/share/ant/lib/ant-contrib-1.0b2.jar
./usr/share/java/ant/ant-contrib-1.0b2.jar
./usr/share/java/ant.jar
*1.*
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
RESULT:
Buildfile: /home/username/build.xml
[taskdef] Could not load definitions from resource net/sf/antcontrib
/antcontrib.properties. It could not be found.
*2.*
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
RESULT:
Buildfile: /home/username/build.xml
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
*3.* build.xml in my home, and ant-contrib in home/lib
<classpath id="contrib.classpath.ref">
<fileset dir="${basedir}/lib"/>
</classpath>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="contrib.classpath.ref"/>
RESULT:
Buildfile: /home/username/build.xml:2: Problem: failed to create task or type classpath
Cause: The name is undefined.
Action: Check the spelling.
I dont know other solution where I can iterate through a fileset/custom list doing something on them one by one. Thats why its important me.
Honestly, why there is no clear documentation ?
The problem was that YAN mentioned above. I have more ant in my system.
All in all, I removed them, a tried again my build xml with a brand new downloaded ant.
What is not on the PATH, and started from directory where it is.
I know this is not the best settings, but I could try it what I want, and solving the right setting is just question of time.
Thanks guys above your time and effort.
the below is my taskdef in a ant build file
<target name="findbugs">
<echo message="${findbugs.home}"/>
<findbugs home="${findbugs.home}"
output="html"
outputFile="E:\reports\findbugs-report.html"
effort="max"
reportLevel="low" >
<sourcePath path="${basedir}/enterpriseapplication/**" />
<class location="${basedir}/**/*.class" />
</findbugs>
</target>
I checked file permissions on the directry every thing is fine. I get the cli output but no file is generated.
Any help please.
I have run into this problem before. It seems that findbugs is unable to create the file.
Create an empty file named findbugs-report.html in the directory E:\reports\
Hope that helps.
Do not forget to mark an answer as the accepted answer if it solves your question.
There were some problems with the paths that I has put in the configuration. Fixing those paths resolved the problems. Also we need to be sure that the file system has permissions to create/modify files where the result file is placed.
Thanks for all your answers/comments guys.