This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
We are not a code mill. Please post your build.xml and we will help you fix it. Make sure you embed the build.xml within 'code' tags (select the text and click the Code button above the editor window,)
Do what? Post the information we asked for? Fix the problem? If you fixed the problem, it would be nice if you posted the solution so that when other ranchers come across your post they can also see the solution.
But know i have three projects i want to compile all projects in one Build.xml
file throguh Ant if any one have any idea about this please tell me...............
One possibility: add a target that does an antcall for each project. Something like this:
A few caveats:
I haven't run the above code, it could have syntax errors.
You have to supply the app name and base directories.
You might have to set inheritaAll to false (see the Ant docs for the antcall task).
The general idea here is that your build.xml file should be written so that is is generic and can build an web app (in this case) with the only thing you need to supply if the location of the files and name for the WAR.
hey i want to create Jar file from a Data services Projects.i means hibernate project that have HBM.XML files but i have no idea how i add hbm.xml files in jar file..........please any body help me
i try this way
but its not working..........
because i have hbml.xml files in src folder but how it adds in jar file i have no idea.........................
What you posted is the javac which is used to compile java source files - it doesn't do anything with hbm files. Since you are gathering all of the JAR file contents into a jar directory, I suggest copying the hmb file there before the jar task (on line 41 of the build.xml you posted). Something like this:
Also, you should change the destdir for the javac task to be "${basedir}/jar/" otherwise your classes will be in the wrong location in the JAR file.
thnx Peter Johnson now its working fine........all hbm file add in packages.........
i also make war files frm ant build but some jar missing errors when i deploy it on tomcat..........please can you check it, where mistake in code...............
this error when i deploy war file in tomcat........
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, com/sun/faces/config/ConfigureListener, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature
at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1628)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:453)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:850)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:724)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Jul 27, 2009 1:43:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
yaa its jar problems i add el-api.jar files when i create WAR file and this jar file also in tomcat lib folder............now i remove it from war files and now its working fine...............
i make jar file wirh ANT Build..........here the code that i use for this build
but i want to debug classes that have in jar files...........Now its only .classes files ............
can any way that i also add . java files also and when i want to debug class its working fine???
In that case you should be able to attach the debugger to the debug potr of your server/application and debug normally. You just need to make sure that in Eclipse you have the source code for the 3rd party lib referenced in your libraries section (in short, check the libs you have in the classpath of your project in eclipse, for each lib you can right click and attach the source code zip - which you will have downloaded)