How to import a Java class from a package in a different folder
Hi I have an Eclipse project that generates a EAR. My problem is as follows: The root folder of the project is: DC-Integrated Under DC-Integrated, I have a folder called 'common' and a structure (with a package) under it as: java/src/com.dexcenter.util/LauncherClient.java Under the same root folder I have another folder called 'webapp' and a structure (with a package) under it as: java/src/com.dexcenter.jms/Launcher.java Now this is where I am stuck. I would like to import Launcher.java into LauncherClient by an import statement. My attempts to do this have failed so far. How can I accomplish this import so that I can use Launcher.java inside LauncherClient? Thanks in advance -- View this message in context: http://www.nabble.com/How-to-import-a-Java-class-from-a-package-in-a-different-folder-tp21436397p21436397.html Sent from the Ant - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
Re: Build war file and deploy to local Tomcat using Ant and Ivy
Hi Kent, You don't pull servlet-api from tomcat - you would configure one of Ivy's resolvers to point to a repository - say, the public Maven 2 repository. Then it auto-downloads it if necessary. Here is a line in my ivy.xml file that does exactly this: This assumes you have an ivy resolver that 'knows' about the m2 repo. Typically this is declared in an ivysettings.xml file (this is documented in the ivy documentation). After you verify your build is pulling the servlet api jar and you can compile everything, then you can build your .war file via Ant's built-in ant task. I like to have a "deploy-exploded" task that unzips this already-built war file directly into ${env.CATALINA_HOME}/webapps. This assumes you have the CATALINA_HOME environment variable set, and somewhere in your ant file, you have this line: which makes environment variables accessible to ant (prefixed with 'env.'). For example: Deploying ${projectName} application to Tomcat... HTH, Les On Fri, Jan 9, 2009 at 3:01 PM, Kent Larsson wrote: > Hi, > > I'm wondering if there are any examples or "best practices" out there > for building a web application and deploy it to a local tomcat > installation using Ant and Ivy? > > I would use Ivy to resolve dependencies and amongst them I want to use > the servlet-api.jar from Tomcat, which I don't know how to do. > > Any and all help highly appreciated! > > Regards, Kent >
How can I exclude this directory?
Hi, I'm using Ant 1.6 and trying to build my WAR file. Im my web root directory, I have a directory named "dojo" that I wish to exclude from my WAR file. Here is how I construct the WAR file ... but it seems the '' has no effect. The dojo directory gets inserted into my WAR. Any ideas? - Dave - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
Re: How to import a Java class from a package in a different folder
This isn't an ANT issue, you would create a user library with Eclipse and add it to your build path. On Tue, Jan 13, 2009 at 8:07 AM, ilango_g wrote: > > Hi > I have an Eclipse project that generates a EAR. My problem is as follows: > The root folder of the project is: > DC-Integrated > > Under DC-Integrated, I have a folder called 'common' and a structure (with a > package) under it as: > java/src/com.dexcenter.util/LauncherClient.java > > Under the same root folder I have another folder called 'webapp' and a > structure (with a package) under it as: > java/src/com.dexcenter.jms/Launcher.java > > > Now this is where I am stuck. I would like to import Launcher.java into > LauncherClient by an import statement. > My attempts to do this have failed so far. How can I accomplish this import > so that I can use Launcher.java inside LauncherClient? > > Thanks in advance > > > > -- > View this message in context: > http://www.nabble.com/How-to-import-a-Java-class-from-a-package-in-a-different-folder-tp21436397p21436397.html > Sent from the Ant - Users mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
Re: How can I exclude this directory?
Hi I have never used the war task, but this looks like a FileSet problem. Try dojo/** Cheers Greg On Tue, Jan 13, 2009 at 6:39 PM, wrote: > Hi, > > I'm using Ant 1.6 and trying to build my WAR file. Im my web root > directory, I have a directory named "dojo" that I wish to exclude from my > WAR file. Here is how I construct the WAR file ... > >basedir="${webroot.dir}" >warfile="${build}/${war-file-name}" >webxml="${webInfDir}/web.xml"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > but it seems the '' has no effect. The dojo > directory gets inserted into my WAR. Any ideas? - Dave > > - > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > >
Re: How can I exclude this directory?
I believe exclude in the WAR task only accepts files and file patterns, not straight directory names. You might try name="dojo/**"/> Brian Stephenson ThorTech Solutions www.thortech-solutions.com (914) 302-7638 [work] (914) 302-7641 [fax] On Jan 13, 2009, at 1:39 PM, > wrote: Hi, I'm using Ant 1.6 and trying to build my WAR file. Im my web root directory, I have a directory named "dojo" that I wish to exclude from my WAR file. Here is how I construct the WAR file ... but it seems the '' has no effect. The dojo directory gets inserted into my WAR. Any ideas? - Dave - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
append value to existing property
Hi all, Is there a way to append a new value to an existing property. for example I have a loop which will determine a new value each time and is stored in property a_value so i want to do something like so in the end i want the value of the_list to be aaa,bbb the a_value property will then have value ccc so after an append, i would have aaa,bbb,ccc and so on. Thanks stan -- View this message in context: http://www.nabble.com/append-value-to-existing-property-tp21449388p21449388.html Sent from the Ant - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
AW: append value to existing property
>Is there a way to append a new value to an existing property. No, properties are immutable. >I have a loop which will determine a new value each time and >is stored in property a_value How do you loop? Which value do you want to calculate? Maybe there are other ways ... Jan - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org