Search Results

Search found 99 results on 4 pages for 'fileset'.

Page 1/4 | 1 2 3 4  | Next Page >

  • Problems with FileSet in Ant script?

    - by ipkiss
    Hi, I am using Ant script to generate javadoc and I just only wnt Ant to look for some classes based on a certain pattern, so I wrote: <javadoc access="public" source="1.6" sourcepath="src" destdir="dest" > <fileset dir="src" casesensitive="yes" defaultexcludes="yes"> <filename name="**/ABC*.java"/> </fileset> </javadoc> That means I only want Ant to look for source file that starts with "ABC" only and generate javadoc for these files. However, the results are awayls duplicate for each file starting with "ABC". Did I do something wrong? Thanks

    Read the article

  • Ant fileset's "dir" missing from absolute path when using a mapper

    - by spaaarky21
    I've been trying to write an Ant task to "compile" Sass scripts in my project using the apply task but I kept getting a "No such file or directory" error. I thought it might have been caused by spaces in the buildpath so I went through the trouble of moving the project only to find that Ant seems to omitting the fileset's root directory when it returns the path. This is what the target looks like: <target name="sass-compile" depends="properties"> <apply executable="sass"> <srcfile /> <targetfile /> <fileset dir="${project.src.dir}" includes="**/*.scss" /> <globmapper from="*.scss" to="*.css" /> </apply> </target> To help troubleshoot, I switched the executable from sass to echo and I noticed that the mapper is transforming paths like this... /Users/me/Documents/Programming/workspace/Project/src/java/com/proj/web/page/template/Template.scss ...into this... /Users/me/Documents/Programming/workspace/Project/java/com/proj/web/page/template/Template.css Notice that the src directory is missing from the target file path. Am I seeing a bug here or is this somehow expected? I would love to know what's going on here. I have also tried using a regexpmapper, and a filtermapper with replacestring. The result is the same. I'm running Ant 1.7.1, which comes bundled with Eclipse Helios, which I'm running on a Mac. I also tried Ant 1.8 on both Mac and Linux. Nothing works. Does anyone have any ideas?

    Read the article

  • How do I avoid symlinks using an Ant FileSet?

    - by Will
    I have a directory tree that includes a symlink to . (the current directory). When I attempt to iterate over this using an Ant FileSet, I get the following error: Caught error while checking for symbolic links at org.apache.tools.ant.DirectoryScanner.causesIllegalSymlinkLoop(DirectoryScanner.java:1859) The code that I am using to generate the scanner is: FileSet files = new FileSet(); Project project = new Project(); project.setBasedir( dir ); files.setProject( project ); files.setDir( project.getBaseDir() ); files.getDirectoryScanner().setFollowSymlinks( false ); for( Iterator iter = files.iterator(); iter.hasNext(); ) {}

    Read the article

  • File Enumeration with ANT

    - by 1ndivisible
    I feel like I'm missing something obvious at the moment. I want to collect a set of dirs / files together in ANT. I know I can do it using a fileset with an optional patternset inside it, but that involves searching for files based a specific criterior - filetype, name etc. I already know the paths to the files I want to collect. I have n properties which reference these paths. I want a way to collect these paths in a fileset, though I cannot find a way to do it. This represents what I want to achieve (I know it isn't valid code, but hopefully it will describe what I mean): <fileset> <path>${src.dir}</path> <path>${test.dir}</path> <path>${third.party.src.dir}</path> <path>${bin.dir}</path> <path>${docs.build.txt}</path> </fileset>

    Read the article

  • Iterating through a directory with Ant

    - by Shaggy Frog
    Let's say I have a collection of PDF files with the following paths: /some/path/pdfs/birds/duck.pdf /some/path/pdfs/birds/goose.pdf /some/path/pdfs/insects/fly.pdf /some/path/pdfs/insects/mosquito.pdf What I'd like to do is generate thumbnails for each PDF that respect the relative path structure, and output to another location, i.e.: /another/path/thumbnails/birds/duck.png /another/path/thumbnails/birds/goose.png /another/path/thumbnails/insects/fly.png /another/path/thumbnails/insects/mosquito.png I'd like this to be done in Ant. Assume I'm going to use Ghostscript on the command line and I've already worked out the call to GS: <exec executable="${ghostscript.executable.name}"> <arg value="-q"/> <arg value="-r72"/> <arg value="-sDEVICE=png16m"/> <arg value="-sOutputFile=${thumbnail.image.path}"/> <arg value="${input.pdf.path}"/> </exec> So what I need to do is work out the correct values for ${thumbnail.image.path} and ${input.pdf.path} while traversing the PDF input directory. I have access to ant-contrib (just installed the "latest", which is 1.0b3) and I'm using Ant 1.8.0. I think I can make something work using the <for> task, <fileset>s and <mapper>s, but I am having trouble putting it all together. I tried something like: <for param="file"> <path> <fileset dir="${some.dir.path}/pdfs"> <include name="**/*.pdf"/> </fileset> </path> <sequential> <echo message="@{file}"/> </sequential> </for> But unfortunately the @{file} property is an absolute path, and I can't find any simple way of decomposing it into the relative components. If I can only do this using a custom task, I guess I could write one, but I'm hoping I can just plug together existing components.

    Read the article

  • dynamically include zipfilesets into a WAR

    - by Konstantin
    hi all - a bit of clumsy situation but for the moment we cannot migrate to more straight-forward project layout. We have a project called myServices and it has 2 source folders (yes, I know, but that's the way it is for now) - I'm trying to make build process a bit more flexible so we now have a property called artifact.names that will be parsed by generic build.xml and based on name, it will call either jar or war task, eg. myService-war will create a WAR file with the following zipfilesets included there: myService-war-classes, myService-war-web-inf, myService-war-meta-inf. I want to add a bit more flexibility, and allow having additional zipfilesets, eg. myService-war-etc-1,2 etc - so these will be picked up by the package target automatically. I cannot use "if" inside war target, and also ${ant.refid:myService-war-classes} property is not resolved, so I'm kind of stuck at the moment with my options - how do I dynamically include a zipfileset into a WAR? You can refer to fileset by id, but it MUST be defined then, eg. you can't have it optional on project level. Thank you. Some build.xml snippets: <target name="archive"> <for list="${artifact.names}" param="artifact"> <sequential> <echo>Packaging artifact @{artifact} of project ${project.name}</echo> <property name="display.@{artifact}.packaging" refid="@{artifact}.packaging" /> <echo>${display.@{artifact}.packaging}</echo> <propertyregex property="@{artifact}.archive.type" input="@{artifact}" regexp="([a-zA-Z0-9]*)(\-)([ejw]ar)" select="\3" casesensitive="false"/> <propertyregex property="@{artifact}.base.name" input="@{artifact}" regexp="([a-zA-Z0-9]*)(\-)([ejw]ar)" select="\1" casesensitive="false"/> <echo>${@{artifact}.archive.type}</echo> <if> <then> <war destfile="${jar.dir}/${@{artifact}.base.name}.war" compress="true" needxmlfile="false"> <resources refid="@{artifact}.packaging" /> <zipfileset refid="@{artifact}-classes" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-meta-inf" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-web-inf" erroronmissingdir="false" /> <!-- Additional zipfilesets to package --> <zipfileset refid="@{artifact}-etc-2" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-3" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-4" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-5" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-6" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-7" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-8" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-9" erroronmissingdir="false" /> <zipfileset refid="@{artifact}-etc-10" erroronmissingdir="false" /> </war> </then> <!-- Generic JAR packaging --> <else> <jar destfile="${jar.dir}/@{artifact}.jar" compress="true"> <resources refid="@{artifact}.packaging" /> <zipfileset refid="@{artifact}-meta-inf" erroronmissingdir="false" /> </jar> </else> </if> </sequential> </for> </target>

    Read the article

  • Ant: use include and exclude together

    - by Ken
    OK, this seems like it should be really simple. I'm using Apache Ant 1.8, and I have a target which does: <delete file="output/program.tar.bz2"/> <tar basedir="input" destfile="output/program.tar.bz2" compression="bzip2"> <tarfileset dir="input"> <include name="goodfolder1/**"/> <include name="goodfolder2/**"/> <exclude name="**/badfile"/> <exclude name="**/*.badext"/> </tarfileset> </tar> I want it to make a .tar.bz2 of input/goodfolder1 and input/goodfolder2, excluding files named "badfile", and excluding files with extension ".badext". It's giving me a .tar.bz2, but it's including badfile and *.badext -- the excludes seem to be ignored. The order of include/exclude doesn't seem to make a difference. I tried wrapping the includes/excludes in a (the docs say it's implicit?), but it made no difference. I'm sure there's something simple I'm missing, since the manual has a very similar example, though in a somewhat different context. EDIT: It looks like it could be related to the dir="input" attribute: it's adding everything in "input", and then adding everything in the tarfileset to that. Files I want appear twice in the program.tar.bz2, but files that are excluded only appear once. But dir is mandatory, and I don't see how this is different from the examples in the manual.

    Read the article

  • Passing a list of files to javac

    - by Robert Menteer
    How can I get the javac task to use an existing fileset? In my build.xml I have created several filesets to be used in multiple places throughout build file. Here is how they have been defined: <fileset dir = "${src}" id = "java.source.all"> <include name = "**/*.java" /> </fileset> <fileset dir = "${src}" id = "java.source.examples"> <include name = "**/Examples/**/*.java" /> </fileset> <fileset dir = "${src}" id = "java.source.tests"> <include name = "**/Tests/*.java" /> </fileset> <fileset dir = "${src}" id = "java.source.project"> <include name = "**/*.java" /> <exclude name = "**/Examples/**/*.java" /> <exclude name = "**/Tests/**/*.java" /> </fileset> I have also used macrodef to compile the java files so the javac task does not need to be repeated multiple times. The macro looks like this: <macrodef name="compile"> <attribute name="sourceref"/> <sequential> <javac srcdir = "${src}" destdir = "${build}" classpathref = "classpath" includeantruntime = "no" debug = "${debug}"> <filelist dir="." files="@{sourceref}" /> <-- email is about this </javac> </sequential> What I'm trying to do is compile only the classes that are needed for specific targets not all the targets in the source tree. And do so without having to specify the files every time. Here are how the targets are defined: <target name = "compile-examples" depends = "init"> <compile sourceref = "${toString:java.source.examples}" /> </target> <target name = "compile-project" depends = "init"> <compile sourceref = "${toString:java.source.project}" /> </target> <target name = "compile-tests" depends = "init"> <compile sourceref = "${toString:java.source.tests}" /> </target> As you can see each target specifies the java files to be compiled as a simi-colon separated list of absolute file names. The only problem with this is that javac does not support filelist. It also does not support fileset, path or pathset. I've tried using but it treats the list as a single file name. Another thing I tried is sending the reference directly (not using toString) and using but include does not have a ref attribute. SO THE QUESTION IS: How do you get the javac task to use a reference to a fileset that was defined in another part of the build file? I'm not interested in solutions that cause me to have multiple javac tasks. Completely re-writting the macro is acceptable. Changes to the targets are also acceptable provided redundant code between targets is kept to a minimum. p.s. Another problem is that fileset wants a comma separated list. I've only done a brief search for a way to convert semi-colons to commas and haven't found a way to do that. p.p.s. Sorry for the yelling but some people are too quick to post responses that don't address the subject.

    Read the article

  • Bacula windows client could not connect to Bacula director

    - by pr0f-r00t
    I have a Bacula server on my Linux Debian squeeze host (Bacula version 5.0.2) and a Bacula client on Windows XP SP3. On my network each client can see each other, can share files and can ping. On my local server I could run bconsole and the server responds but when I run bconsole or bat on my windows client the server does not respond. Here are my configuration files: bacula-dir.conf: # # Default Bacula Director Configuration file # # The only thing that MUST be changed is to add one or more # file or directory names in the Include directive of the # FileSet resource. # # For Bacula release 5.0.2 (28 April 2010) -- debian squeeze/sid # # You might also want to change the default email address # from root to your address. See the "mail" and "operator" # directives in the Messages resource. # Director { # define myself Name = nima-desktop-dir DIRport = 9101 # where we listen for UA connections QueryFile = "/etc/bacula/scripts/query.sql" WorkingDirectory = "/var/lib/bacula" PidDirectory = "/var/run/bacula" Maximum Concurrent Jobs = 1 Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L" # Console password Messages = Daemon DirAddress = 127.0.0.1 # DirAddress = 72.16.208.1 } JobDefs { Name = "DefaultJob" Type = Backup Level = Incremental Client = nima-desktop-fd FileSet = "Full Set" Schedule = "WeeklyCycle" Storage = File Messages = Standard Pool = File Priority = 10 Write Bootstrap = "/var/lib/bacula/%c.bsr" } # # Define the main nightly save backup job # By default, this job will back up to disk in /nonexistant/path/to/file/archive/dir Job { Name = "BackupClient1" JobDefs = "DefaultJob" } #Job { # Name = "BackupClient2" # Client = nima-desktop2-fd # JobDefs = "DefaultJob" #} # Backup the catalog database (after the nightly save) Job { Name = "BackupCatalog" JobDefs = "DefaultJob" Level = Full FileSet="Catalog" Schedule = "WeeklyCycleAfterBackup" # This creates an ASCII copy of the catalog # Arguments to make_catalog_backup.pl are: # make_catalog_backup.pl <catalog-name> RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog" # This deletes the copy of the catalog RunAfterJob = "/etc/bacula/scripts/delete_catalog_backup" Write Bootstrap = "/var/lib/bacula/%n.bsr" Priority = 11 # run after main backup } # # Standard Restore template, to be changed by Console program # Only one such job is needed for all Jobs/Clients/Storage ... # Job { Name = "RestoreFiles" Type = Restore Client=nima-desktop-fd FileSet="Full Set" Storage = File Pool = Default Messages = Standard Where = /nonexistant/path/to/file/archive/dir/bacula-restores } # job for vmware windows host Job { Name = "nimaxp-fd" Type = Backup Client = nimaxp-fd FileSet = "nimaxp-fs" Schedule = "WeeklyCycle" Storage = File Messages = Standard Pool = Default Write Bootstrap = "/var/bacula/working/rsys-win-www-1-fd.bsr" #Change this } # job for vmware windows host Job { Name = "arg-michael-fd" Type = Backup Client = nimaxp-fd FileSet = "arg-michael-fs" Schedule = "WeeklyCycle" Storage = File Messages = Standard Pool = Default Write Bootstrap = "/var/bacula/working/rsys-win-www-1-fd.bsr" #Change this } # List of files to be backed up FileSet { Name = "Full Set" Include { Options { signature = MD5 } # # Put your list of files here, preceded by 'File =', one per line # or include an external list with: # # File = <file-name # # Note: / backs up everything on the root partition. # if you have other partitions such as /usr or /home # you will probably want to add them too. # # By default this is defined to point to the Bacula binary # directory to give a reasonable FileSet to backup to # disk storage during initial testing. # File = /usr/sbin } # # If you backup the root directory, the following two excluded # files can be useful # Exclude { File = /var/lib/bacula File = /nonexistant/path/to/file/archive/dir File = /proc File = /tmp File = /.journal File = /.fsck } } # List of files to be backed up FileSet { Name = "nimaxp-fs" Enable VSS = yes Include { Options { signature = MD5 } File = "C:\softwares" File = C:/softwares File = "C:/softwares" } } # List of files to be backed up FileSet { Name = "arg-michael-fs" Enable VSS = yes Include { Options { signature = MD5 } File = "C:\softwares" File = C:/softwares File = "C:/softwares" } } # # When to do the backups, full backup on first sunday of the month, # differential (i.e. incremental since full) every other sunday, # and incremental backups other days Schedule { Name = "WeeklyCycle" Run = Full 1st sun at 23:05 Run = Differential 2nd-5th sun at 23:05 Run = Incremental mon-sat at 23:05 } # This schedule does the catalog. It starts after the WeeklyCycle Schedule { Name = "WeeklyCycleAfterBackup" Run = Full sun-sat at 23:10 } # This is the backup of the catalog FileSet { Name = "Catalog" Include { Options { signature = MD5 } File = "/var/lib/bacula/bacula.sql" } } # Client (File Services) to backup Client { Name = nima-desktop-fd Address = localhost FDPort = 9102 Catalog = MyCatalog Password = "_MOfxEuRzxijc0DIMcBqtyx9iW1tzE7V6" # password for FileDaemon File Retention = 30 days # 30 days Job Retention = 6 months # six months AutoPrune = yes # Prune expired Jobs/Files } # Client file service for vmware windows host Client { Name = nimaxp-fd Address = nimaxp FDPort = 9102 Catalog = MyCatalog Password = "Ku8F1YAhDz5EMUQjiC9CcSw95Aho9XbXailUmjOaAXJP" # password for FileDaemon File Retention = 30 days # 30 days Job Retention = 6 months # six months AutoPrune = yes # Prune expired Jobs/Files } # Client file service for vmware windows host Client { Name = arg-michael-fd Address = 192.168.0.61 FDPort = 9102 Catalog = MyCatalog Password = "b4E9FU6s/9Zm4BVFFnbXVKhlyd/zWxj0oWITKK6CALR/" # password for FileDaemon File Retention = 30 days # 30 days Job Retention = 6 months # six months AutoPrune = yes # Prune expired Jobs/Files } # # Second Client (File Services) to backup # You should change Name, Address, and Password before using # #Client { # Name = nima-desktop2-fd # Address = localhost2 # FDPort = 9102 # Catalog = MyCatalog # Password = "_MOfxEuRzxijc0DIMcBqtyx9iW1tzE7V62" # password for FileDaemon 2 # File Retention = 30 days # 30 days # Job Retention = 6 months # six months # AutoPrune = yes # Prune expired Jobs/Files #} # Definition of file storage device Storage { Name = File # Do not use "localhost" here Address = localhost # N.B. Use a fully qualified name here SDPort = 9103 Password = "Cj-gtxugC4dAymY01VTSlUgMTT5LFMHf9" Device = FileStorage Media Type = File } # Definition of DDS tape storage device #Storage { # Name = DDS-4 # Do not use "localhost" here # Address = localhost # N.B. Use a fully qualified name here # SDPort = 9103 # Password = "Cj-gtxugC4dAymY01VTSlUgMTT5LFMHf9" # password for Storage daemon # Device = DDS-4 # must be same as Device in Storage daemon # Media Type = DDS-4 # must be same as MediaType in Storage daemon # Autochanger = yes # enable for autochanger device #} # Definition of 8mm tape storage device #Storage { # Name = "8mmDrive" # Do not use "localhost" here # Address = localhost # N.B. Use a fully qualified name here # SDPort = 9103 # Password = "Cj-gtxugC4dAymY01VTSlUgMTT5LFMHf9" # Device = "Exabyte 8mm" # MediaType = "8mm" #} # Definition of DVD storage device #Storage { # Name = "DVD" # Do not use "localhost" here # Address = localhost # N.B. Use a fully qualified name here # SDPort = 9103 # Password = "Cj-gtxugC4dAymY01VTSlUgMTT5LFMHf9" # Device = "DVD Writer" # MediaType = "DVD" #} # Generic catalog service Catalog { Name = MyCatalog # Uncomment the following line if you want the dbi driver # dbdriver = "dbi:sqlite3"; dbaddress = 127.0.0.1; dbport = dbname = "bacula"; dbuser = ""; dbpassword = "" } # Reasonable message delivery -- send most everything to email address # and to the console Messages { Name = Standard # # NOTE! If you send to two email or more email addresses, you will need # to replace the %r in the from field (-f part) with a single valid # email address in both the mailcommand and the operatorcommand. # What this does is, it sets the email address that emails would display # in the FROM field, which is by default the same email as they're being # sent to. However, if you send email to more than one address, then # you'll have to set the FROM address manually, to a single address. # for example, a '[email protected]', is better since that tends to # tell (most) people that its coming from an automated source. # mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r" operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r" mail = root@localhost = all, !skipped operator = root@localhost = mount console = all, !skipped, !saved # # WARNING! the following will create a file that you must cycle from # time to time as it will grow indefinitely. However, it will # also keep all your messages if they scroll off the console. # append = "/var/lib/bacula/log" = all, !skipped catalog = all } # # Message delivery for daemon messages (no job). Messages { Name = Daemon mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r" mail = root@localhost = all, !skipped console = all, !skipped, !saved append = "/var/lib/bacula/log" = all, !skipped } # Default pool definition Pool { Name = Default Pool Type = Backup Recycle = yes # Bacula can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 365 days # one year } # File Pool definition Pool { Name = File Pool Type = Backup Recycle = yes # Bacula can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 365 days # one year Maximum Volume Bytes = 50G # Limit Volume size to something reasonable Maximum Volumes = 100 # Limit number of Volumes in Pool } # Scratch pool definition Pool { Name = Scratch Pool Type = Backup } # # Restricted console used by tray-monitor to get the status of the director # Console { Name = nima-desktop-mon Password = "-T0h6HCXWYNy0wWqOomysMvRGflQ_TA6c" CommandACL = status, .status } bacula-fd.conf on client: # # Default Bacula File Daemon Configuration file # # For Bacula release 5.0.3 (08/05/10) -- Windows MinGW32 # # There is not much to change here except perhaps the # File daemon Name # # # "Global" File daemon configuration specifications # FileDaemon { # this is me Name = nimaxp-fd FDport = 9102 # where we listen for the director WorkingDirectory = "C:\\Program Files\\Bacula\\working" Pid Directory = "C:\\Program Files\\Bacula\\working" # Plugin Directory = "C:\\Program Files\\Bacula\\plugins" Maximum Concurrent Jobs = 10 } # # List Directors who are permitted to contact this File daemon # Director { Name = Nima-desktop-dir Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L" } # # Restricted Director, used by tray-monitor to get the # status of the file daemon # Director { Name = nimaxp-mon Password = "q5b5g+LkzDXorMViFwOn1/TUnjUyDlg+gRTBp236GrU3" Monitor = yes } # Send all messages except skipped files back to Director Messages { Name = Standard director = Nima-desktop = all, !skipped, !restored } I have checked my firewall and disabled the firewall but it doesn't work.

    Read the article

  • How to parameterize a path in ANT?

    - by strelokstrelok
    I have the following defined in a file called build-dependencies.xml <?xml version="1.0" encoding="UTF-8"?> <project name="build-dependencies"> ... <path id="common-jars"> <fileset file="artifacts/project-1/jar/some*.jar" /> <fileset file="artifacts/project-2/jar/someother*.jar" /> </path> ... </project> I include it at the top of my build.xml file. Now I need to make the artifacts folder a parameter so it can be changed during execution of different targets. Having this... <?xml version="1.0" encoding="UTF-8"?> <project name="build-dependencies"> ... <path id="common-jars"> <fileset file="${artifacts}/project-1/jar/some*.jar" /> <fileset file="${artifacts}/project-2/jar/someother*.jar" /> </path> ... </project> ...and defining an "artifacts" property (and changing it) in the target does not work because it seems that the property substitution happens when the path is defined in build-dependencies.xml How can I solve this? One way I was thinking was to have a parameterized macro and call that before the path is actually used, but that seems not elegant. Something like this: <macrodef name="create-common-jars"> <attribute name="artifacts"/> <sequential> <path id="common-jars"> <fileset file="@{artifacts}/project-1/jar/some*.jar" /> <fileset file="@{artifacts}/project-2/jar/someother*.jar" /> </path> </sequential> </macrodef>

    Read the article

  • Ant + JUnit = ClassNotFoundExceptions when running tests?

    - by rfkrocktk
    I'm trying to run some tests in Ant presently using JUnit, and all of my tests are failing with the following stacktrace: java.lang.ClassNotFoundException: com.mypackage.MyTestCase It doesn't make too much sense to me. I'm first compiling my test cases using <javac>, then directly running the <junit> task to run the tests. My buildfile looks like this: <target name="compile.webapp.tests"> <javac srcdir="${test.java.src.dir}" destdir="${test.java.bin.dir}"> <classpath> <filelist> <file name="${red5.home}/red5.jar"/> <file name="${red5.home}/boot.jar"/> <file name="${bin.dir}/${ant.project.name}.jar"/> </filelist> <fileset dir="${red5.lib.dir}" includes="**/*"/> <fileset dir="${main.java.lib.dir}" includes="**/*"/> <fileset dir="${test.java.lib.dir}" includes="**/*"/> </classpath> </javac> </target> <target name="run.webapp.tests"> <junit printsummary="true"> <classpath> <filelist> <file name="${red5.home}/red5.jar"/> <file name="${red5.home}/boot.jar"/> <file name="${bin.dir}/${ant.project.name}.jar"/> </filelist> <fileset dir="${red5.lib.dir}" includes="**/*.jar"/> <fileset dir="${main.java.lib.dir}" includes="**/*.jar"/> <fileset dir="${test.java.lib.dir}" includes="**/*.jar"/> </classpath> <formatter type="xml"/> <batchtest todir="${test.java.output.dir}"> <fileset dir="${test.java.bin.dir}" includes="**/*TestCase*"/> </batchtest> </junit> </target> This is really weird, I can't seem to fix this. Is there something I'm doing wrong here?

    Read the article

  • Howto create dynamic named folders with Maven2 Archetype?

    - by chrsk
    Hey, i try to build a structure like this +---src +---main +---webapp +---WEB-INF +---cfg ¦ +---log4j ¦ +---resources ¦ +---extensions ¦ +---${artifactIdKey}-business ¦ +---${artifactIdKey}-layout +---lib I added a required property to my archetype-metadata.xml to have an short-name for the project, which is used among other things for generating unique folders. <requiredProperties> <requiredProperty key="artifactIdKey" /> </requiredProperties> The property artifactIdKey i use in a fileSet: <fileSet> <directory>[..]/resources/extensions/${artifactIdKey}-business</directory> </fileSet> <fileSet> <directory>[..]/resources/extensions/${artifactIdKey}-layout</directory> </fileSet> The command to generate the archetype: mvn archetype:generate -B \ -DgroupId=com.stackoverflow \ -DartifactId=stackoverflow-question -DarchetypeGroupId=com.stackoverflow \ -DarchetypeArtifactId=stackoverflow-archetype -DarchetypeVersion=1.0 \ -DartifactIdKey=soq I assume to get the following folder structure, but i get the ${artifactIdKey} property as folder. Without beeing replaces. ..\ +---soq-business +---soq-layout ..\ +---${artifactIdKey}-business +---${artifactIdKey}-layout How can i achieve this? And how can i place files below soq-business? Without knowing the folder name at this time?

    Read the article

  • Bacula & Multiple Tape Devices, and so on

    - by Tom O'Connor
    Bacula won't make use of 2 tape devices simultaneously. (Search for #-#-# for the TL;DR) A little background, perhaps. In the process of trying to get a decent working backup solution (backing up 20TB ain't cheap, or easy) at $dayjob, we bought a bunch of things to make it work. Firstly, there's a Spectra Logic T50e autochanger, 40 slots of LTO5 goodness, and that robot's got a pair of IBM HH5 Ultrium LTO5 drives, connected via FibreChannel Arbitrated Loop to our backup server. There's the backup server.. A Dell R715 with 2x 16 core AMD 62xx CPUs, and 32GB of RAM. Yummy. That server's got 2 Emulex FCe-12000E cards, and an Intel X520-SR dual port 10GE NIC. We were also sold Commvault Backup (non-NDMP). Here's where it gets really complicated. Spectra Logic and Commvault both sent respective engineers, who set up the library and the software. Commvault was running fine, in so far as the controller was working fine. The Dell server has Ubuntu 12.04 server, and runs the MediaAgent for CommVault, and mounts our BlueArc NAS as NFS to a few mountpoints, like /home, and some stuff in /mnt. When backing up from the NFS mountpoints, we were seeing ~= 290GB/hr throughput. That's CRAP, considering we've got 20-odd TB to get through, in a <48 hour backup window. The rated maximum on the BlueArc is 700MB/s (2460GB/hr), the rated maximum write speed on the tape devices is 140MB/s, per drive, so that's 492GB/hr (or double it, for the total throughput). So, the next step was to benchmark NFS performance with IOzone, and it turns out that we get epic write performance (across 20 threads), and it's like 1.5-2.5TB/hr write, but read performance is fecking hopeless. I couldn't ever get higher than 343GB/hr maximum. So let's assume that the 343GB/hr is a theoretical maximum for read performance on the NAS, then we should in theory be able to get that performance out of a) CommVault, and b) any other backup agent. Not the case. Commvault seems to only ever give me 200-250GB/hr throughput, and out of experimentation, I installed Bacula to see what the state of play there is. If, for example, Bacula gave consistently better performance and speeds than Commvault, then we'd be able to say "**$.$ Refunds Plz $.$**" #-#-# Alas, I found a different problem with Bacula. Commvault seems pretty happy to read from one part of the mountpoint with one thread, and stream that to a Tape device, whilst reading from some other directory with the other thread, and writing to the 2nd drive in the autochanger. I can't for the life of me get Bacula to mount and write to two tape drives simultaneously. Things I've tried: Setting Maximum Concurrent Jobs = 20 in the Director, File and Storage Daemons Setting Prefer Mounted Volumes = no in the Job Definition Setting multiple devices in the Autochanger resource. Documentation seems to be very single-drive centric, and we feel a little like we've strapped a rocket to a hamster, with this one. The majority of example Bacula configurations are for DDS4 drives, manual tape swapping, and FreeBSD or IRIX systems. I should probably add that I'm not too bothered if this isn't possible, but I'd be surprised. I basically want to use Bacula as proof to stick it to the software vendors that they're overpriced ;) I read somewhere that @KyleBrandt has done something similar with a modern Tape solution.. Configuration Files: *bacula-dir.conf* # # Default Bacula Director Configuration file Director { # define myself Name = backuphost-1-dir DIRport = 9101 # where we listen for UA connections QueryFile = "/etc/bacula/scripts/query.sql" WorkingDirectory = "/var/lib/bacula" PidDirectory = "/var/run/bacula" Maximum Concurrent Jobs = 20 Password = "yourekiddingright" # Console password Messages = Daemon DirAddress = 0.0.0.0 #DirAddress = 127.0.0.1 } JobDefs { Name = "DefaultFileJob" Type = Backup Level = Incremental Client = backuphost-1-fd FileSet = "Full Set" Schedule = "WeeklyCycle" Storage = File Messages = Standard Pool = File Priority = 10 Write Bootstrap = "/var/lib/bacula/%c.bsr" } JobDefs { Name = "DefaultTapeJob" Type = Backup Level = Incremental Client = backuphost-1-fd FileSet = "Full Set" Schedule = "WeeklyCycle" Storage = "SpectraLogic" Messages = Standard Pool = AllTapes Priority = 10 Write Bootstrap = "/var/lib/bacula/%c.bsr" Prefer Mounted Volumes = no } # # Define the main nightly save backup job # By default, this job will back up to disk in /nonexistant/path/to/file/archive/dir Job { Name = "BackupClient1" JobDefs = "DefaultFileJob" } Job { Name = "BackupThisVolume" JobDefs = "DefaultTapeJob" FileSet = "SpecialVolume" } #Job { # Name = "BackupClient2" # Client = backuphost-12-fd # JobDefs = "DefaultJob" #} # Backup the catalog database (after the nightly save) Job { Name = "BackupCatalog" JobDefs = "DefaultFileJob" Level = Full FileSet="Catalog" Schedule = "WeeklyCycleAfterBackup" # This creates an ASCII copy of the catalog # Arguments to make_catalog_backup.pl are: # make_catalog_backup.pl <catalog-name> RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog" # This deletes the copy of the catalog RunAfterJob = "/etc/bacula/scripts/delete_catalog_backup" Write Bootstrap = "/var/lib/bacula/%n.bsr" Priority = 11 # run after main backup } # # Standard Restore template, to be changed by Console program # Only one such job is needed for all Jobs/Clients/Storage ... # Job { Name = "RestoreFiles" Type = Restore Client=backuphost-1-fd FileSet="Full Set" Storage = File Pool = Default Messages = Standard Where = /srv/bacula/restore } FileSet { Name = "SpecialVolume" Include { Options { signature = MD5 } File = /mnt/SpecialVolume } Exclude { File = /var/lib/bacula File = /nonexistant/path/to/file/archive/dir File = /proc File = /tmp File = /.journal File = /.fsck } } # List of files to be backed up FileSet { Name = "Full Set" Include { Options { signature = MD5 } File = /usr/sbin } Exclude { File = /var/lib/bacula File = /nonexistant/path/to/file/archive/dir File = /proc File = /tmp File = /.journal File = /.fsck } } Schedule { Name = "WeeklyCycle" Run = Full 1st sun at 23:05 Run = Differential 2nd-5th sun at 23:05 Run = Incremental mon-sat at 23:05 } # This schedule does the catalog. It starts after the WeeklyCycle Schedule { Name = "WeeklyCycleAfterBackup" Run = Full sun-sat at 23:10 } # This is the backup of the catalog FileSet { Name = "Catalog" Include { Options { signature = MD5 } File = "/var/lib/bacula/bacula.sql" } } # Client (File Services) to backup Client { Name = backuphost-1-fd Address = localhost FDPort = 9102 Catalog = MyCatalog Password = "surelyyourejoking" # password for FileDaemon File Retention = 30 days # 30 days Job Retention = 6 months # six months AutoPrune = yes # Prune expired Jobs/Files } # # Second Client (File Services) to backup # You should change Name, Address, and Password before using # #Client { # Name = backuphost-12-fd # Address = localhost2 # FDPort = 9102 # Catalog = MyCatalog # Password = "i'mnotjokinganddontcallmeshirley" # password for FileDaemon 2 # File Retention = 30 days # 30 days # Job Retention = 6 months # six months # AutoPrune = yes # Prune expired Jobs/Files #} # Definition of file storage device Storage { Name = File # Do not use "localhost" here Address = localhost # N.B. Use a fully qualified name here SDPort = 9103 Password = "lalalalala" Device = FileStorage Media Type = File } Storage { Name = "SpectraLogic" Address = localhost SDPort = 9103 Password = "linkedinmakethebestpasswords" Device = Drive-1 Device = Drive-2 Media Type = LTO5 Autochanger = yes } # Generic catalog service Catalog { Name = MyCatalog # Uncomment the following line if you want the dbi driver # dbdriver = "dbi:sqlite3"; dbaddress = 127.0.0.1; dbport = dbname = "bacula"; DB Address = ""; dbuser = "bacula"; dbpassword = "bbmaster63" } # Reasonable message delivery -- send most everything to email address # and to the console Messages { Name = Standard mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r" operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r" mail = root@localhost = all, !skipped operator = root@localhost = mount console = all, !skipped, !saved # # WARNING! the following will create a file that you must cycle from # time to time as it will grow indefinitely. However, it will # also keep all your messages if they scroll off the console. # append = "/var/lib/bacula/log" = all, !skipped catalog = all } # # Message delivery for daemon messages (no job). Messages { Name = Daemon mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r" mail = root@localhost = all, !skipped console = all, !skipped, !saved append = "/var/lib/bacula/log" = all, !skipped } # Default pool definition Pool { Name = Default Pool Type = Backup Recycle = yes # Bacula can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 365 days # one year } # File Pool definition Pool { Name = File Pool Type = Backup Recycle = yes # Bacula can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 365 days # one year Maximum Volume Bytes = 50G # Limit Volume size to something reasonable Maximum Volumes = 100 # Limit number of Volumes in Pool } Pool { Name = AllTapes Pool Type = Backup Recycle = yes AutoPrune = yes # Prune expired volumes Volume Retention = 31 days # one Moth } # Scratch pool definition Pool { Name = Scratch Pool Type = Backup } # # Restricted console used by tray-monitor to get the status of the director # Console { Name = backuphost-1-mon Password = "LastFMalsostorePasswordsLikeThis" CommandACL = status, .status } bacula-sd.conf # # Default Bacula Storage Daemon Configuration file # Storage { # definition of myself Name = backuphost-1-sd SDPort = 9103 # Director's port WorkingDirectory = "/var/lib/bacula" Pid Directory = "/var/run/bacula" Maximum Concurrent Jobs = 20 SDAddress = 0.0.0.0 # SDAddress = 127.0.0.1 } # # List Directors who are permitted to contact Storage daemon # Director { Name = backuphost-1-dir Password = "passwordslinplaintext" } # # Restricted Director, used by tray-monitor to get the # status of the storage daemon # Director { Name = backuphost-1-mon Password = "totalinsecurityabound" Monitor = yes } Device { Name = FileStorage Media Type = File Archive Device = /srv/bacula/archive LabelMedia = yes; # lets Bacula label unlabeled media Random Access = Yes; AutomaticMount = yes; # when device opened, read it RemovableMedia = no; AlwaysOpen = no; } Autochanger { Name = SpectraLogic Device = Drive-1 Device = Drive-2 Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d" Changer Device = /dev/sg4 } Device { Name = Drive-1 Drive Index = 0 Archive Device = /dev/nst0 Changer Device = /dev/sg4 Media Type = LTO5 AutoChanger = yes RemovableMedia = yes; AutomaticMount = yes; AlwaysOpen = yes; RandomAccess = no; LabelMedia = yes } Device { Name = Drive-2 Drive Index = 1 Archive Device = /dev/nst1 Changer Device = /dev/sg4 Media Type = LTO5 AutoChanger = yes RemovableMedia = yes; AutomaticMount = yes; AlwaysOpen = yes; RandomAccess = no; LabelMedia = yes } # # Send all messages to the Director, # mount messages also are sent to the email address # Messages { Name = Standard director = backuphost-1-dir = all } bacula-fd.conf # # Default Bacula File Daemon Configuration file # # # List Directors who are permitted to contact this File daemon # Director { Name = backuphost-1-dir Password = "hahahahahaha" } # # Restricted Director, used by tray-monitor to get the # status of the file daemon # Director { Name = backuphost-1-mon Password = "hohohohohho" Monitor = yes } # # "Global" File daemon configuration specifications # FileDaemon { # this is me Name = backuphost-1-fd FDport = 9102 # where we listen for the director WorkingDirectory = /var/lib/bacula Pid Directory = /var/run/bacula Maximum Concurrent Jobs = 20 #FDAddress = 127.0.0.1 FDAddress = 0.0.0.0 } # Send all messages except skipped files back to Director Messages { Name = Standard director = backuphost-1-dir = all, !skipped, !restored }

    Read the article

  • Bacula virtual backup job doesn't run, no output?

    - by Zoredache
    I am trying to get Virtual Backups working, but when I try to run a virtual backup job, it appears to get created, but then never seems to actually run. I have a full, and a couple incremental backups. status director JobId Level Files Bytes Status Finished Name ==================================================================== 1283 Full 10,565 1.963 G OK 21-Dec-12 09:47 nms-Job 1284 Incr 314 129.6 M OK 21-Dec-12 09:49 nms-Job 1285 Incr 230 147.2 M OK 21-Dec-12 09:51 nms-Job 1288 Incr 525 138.8 M OK 21-Dec-12 11:25 nms-Job I attempt to start a job from bconsole like this. *run job=nms-Job level=VirtualFull Using Catalog "MySQL" Run Backup job JobName: nms-Job Level: VirtualFull Client: nms-FileDaemon FileSet: nms-FileSet Pool: nms-pool (From Job resource) Storage: File_d1 (From Pool resource) When: 2012-12-21 13:07:54 Priority: 10 OK to run? (yes/mod/no): Job queued. JobId=1291 Then my new job, just sits there, doing nothing. The JobStatus shows that the job was created, but it appears to never run? All the full, and incremental backups are terminating normally. *llist jobid=1291 JobId: 1,291 Job: nms-Job.2012-12-21_13.07.56_07 Name: nms-Job PurgedFiles: 0 Type: B Level: F ClientId: 4 Name: nms-FileDaemon JobStatus: C SchedTime: 2012-12-21 13:07:54 StartTime: 2012-12-21 13:07:56 EndTime: 0000-00-00 00:00:00 RealEndTime: 0000-00-00 00:00:00 JobTDate: 1,356,124,076 VolSessionId: 0 VolSessionTime: 0 JobFiles: 0 JobErrors: 0 JobMissingFiles: 0 PoolId: 19 PooLname: nms-pool PriorJobId: 0 FileSetId: 11 FileSet: nms-FileSet I am getting very frustrated, that this isn't working, mostly because it isn't giving me any error logs, or output at all. I submit the job, and as far as I can tell nothing happens. Is there some status, or debugging level that I can set to get a useful information about why this isn't working? What can I do to make this work? I was originally running Bacula 5.0.2 on Debian Squeeze, out of frustration, I upgraded to the 5.2.6 in the backports repository, hoping that a new version might give me better results.

    Read the article

  • Execute a jar file using Ant

    - by geetha
    I am trying to create a runnable jar file from java classes using ant. The java classes use external jars. When I execute the build.xml its showing class not found exception while running the java program. Its compiling fine. Part of My source code: <path id="project-libpath"> <fileset dir="${lib.dir}"> <include name="*.jar"/> </fileset> </path> <path id="project-classpath"> <fileset dir="C:/xmldecode/lib"> <include name="*.jar"/> </fileset> </path> <target name="compile" depends="prepare"> <javac srcdir="${src.dir}" destdir="${classes.dir}"> <classpath refid="project-classpath"/> </javac> </target> <target name="jar" depends="compile"> <copy todir="${classes.dir}"> <fileset dir="C:/xmldecode/lib"/> </copy> <pathconvert property="mf.classpath" pathsep=";"> <path refid="project-classpath" /> <flattenmapper /> </pathconvert> <jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}"> <manifest> <attribute name="Main-Class" value="${main-class}"/> <attribute name="Class-Path" value="${mf.classpath}"/> </manifest> </jar> </target> <target name="run" depends="jar"> <java jar="${jar.dir}/${ant.project.name}.jar" fork="true"> </java>

    Read the article

  • Layout of Ant build.xml with junit tests

    - by Derk
    In a project I have a folder src for all application source code and a different folder test for all junit test (both with a simular package hierarchy). Now I want that Ant can run all tests in in test folder, bot the problem is that now also files in the src folder with "Test" in the filename are included. This is the test target in the build.xml: <target name="test" depends="build"> <mkdir dir="reports/tests" /> <junit fork="yes" printsummary="yes"> <formatter type="xml"/> <classpath> <path location="${build}/WEB-INF/classes"/> <fileset dir="${projectname.home}/lib"> <include name="servlet-api.jar"/> <include name="httpunit.jar"/> <include name="Tidy.jar"/> <include name="js.jar"/> <include name="junit.jar"/> </fileset> </classpath> <batchtest todir="reports/tests"> <fileset dir="${build}/WEB-INF/classes"> <include name="**/*Test.class"/> </fileset> </batchtest> </junit> And I have added the test folder to the build target: <target name="build" depends="init,init-props,prepare"> <javac source="1.5" debug="true" destdir="${build}/WEB-INF/classes"> <src path="src" /> <src path="test" /> <classpath refid="classpath"/> </javac> </target>

    Read the article

  • Make Ant's delete task fail when a directory exists and is not deleted but not when it doesn't exist

    - by Tim Visher
    I have tho following clean function in my build script and I'd like to know how I can improve it. <target name="clean" description="Clean output directories."> <!-- Must not fail on error because it fails if directories don't exist. Is there really no better way to do this? --> <delete includeEmptyDirs="true" failonerror="false"> <fileset dir="${main.build.directory}" /> <fileset dir="dist" /> <fileset dir="${documentation.build.directory}" /> <fileset dir="/build-testing" /> </delete> </target> Specifically regarding my comment, I'm unhappy with the fact that I can't run this on a fresh box because the directory structure hasn't been set up yet by the other targets. We run the build in such a way that it entirely recreates the structures necessary for testing and deployment every time to avoid stale class files and such. With the way that delete currently is set up, a failure to delete a file does not fail the build and I'd like it to. I don't want it to fail the build if the file doesn't exist though. If it doesn't exist then what I'm asking it to do has already happened. Thoughts?

    Read the article

  • Granite DS Actionscript Code Generation Ant cannot find class error

    - by Roaders
    I am trying to get my Ant build to run the granite DS Actionscript code generation task and am running into some problems. At the moment I am getting this error: BUILD FAILED C...\build.xml:62: Could not load Java class file: SampleDTOOne.class So the .class files are obviously being found. I am not however sure if this error means that the it cannot load the .class file or that it cannot find the actual java source code. My Ant task definition looks like this: <classpath> <pathelement location="C.../src/packages/" /> </classpath> <fileset dir="${base.build.dir}/jc/classes/gpbit/packageName"> <include name="*.class" /> </fileset> </gas3> I have tried many different values for the classpath but cannot get anythign to work. I do not like the path that I am using to find the .class files but again at the moment this is the only one I can get to work. None of the variables seem to make it any easier to get to this location. The fileset is definitely working as it definitely found the .clas files to include the name in the error message. More detailed error message: [gas3] Using output dir: C...trunk\plugin\build/etc/src/as3 [gas3] Using classpath: C...\trunk\plugin\src\packages [gas3] Loading all Java classes referenced by inner fileset(s) { [gas3] java.lang.ClassNotFoundException: SampleDTOOne [gas3] at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1361) any help much appreciated

    Read the article

  • axis-java2wsdl task classpath setting problem

    - by qkrsppopcmpt
    Hey Guys, here is my build.xml <?xml version="1.0" standalone="yes"?> <path id='axis2.classpath'> <fileset dir='D:\Tools\axis2-1.5.1-bin\axis2-1.5.1\lib'> <include name='**/*.jar' /> </fileset> </path> <path id='compiled.class.path'> <fileset dir='./bin/pkg'> <include name='*.class' /> </fileset> </path> <taskdef resource="axis-tasks.properties" classpathref="axis2.classpath" /> <target name="run" > <axis-java2wsdl output="out/TestService.wsdl" location="http://localhost:8080/axis2/service/TestService" namespace="service" classname="TestService"> <classpath refid="compiled.class.path"/> <mapping namespace="TestService" package="pkg"/> </axis-java2wsdl> </target> here is my file structure: prj-bin-pkg-TestService.class/////////// prj-src-pkg-TestService.java/////////// prj-build.xml I get java.lang.ClassNotFoundException: TestService. Can anybody tell me how to fix it? Thanks so much. !!!!!!!!!!!!!

    Read the article

  • How to use query-replace on filesets in emacs

    - by user93341
    Emacs documentation states that you can use query-replace on filesets to perform find/replace on multiple files. This lets you perform certain operations, such as visiting, query-replace, and shell commands on all the files at once. I've opened my particular fileset (i.e. via fileset-open) and attempted query/replace using both: M-% and M-x query-replace but can't get it to work on anything but the file (buffer) I'm currently in.

    Read the article

  • How to create empty folders with maven archetype?

    - by chrsk
    There is an existing issue for this approach, located on Codehaus JIRA #ARCHETYPE-57, but all instructions listed in this ticket failed for me. Also the blog post of marekdec How to get maven archetype to generate empty directories fails for me. The trick within the archetype.xml with the trailing / doesnt works for me: <resources> <resource>src/main/webapp/</resource> Unable to find resource 'archetype-resources/src/main/webapp/' Also the fileSet directory in archetype-metadata.xml does not work for me: <fileSet filtered="true" encoding="UTF-8"> <directory>src/main/webapp/</directory> </fileSet> Is there any other solution? Or did i miss something? Thanks

    Read the article

  • how to specify set of files to be copied in lib while creating war

    - by Jigar Shah
    This is my build target <target name="build-war" depends="build-java"> <war destfile="${dist.dir}/${std.war.file}" webxml="${resources.dir}/WEB-INF/web.xml"> <fileset dir="${jsp.dir}" /> <lib dir="${lib.dir}"/> <classes dir="${build.classes.dir}" /> </war> </target> Here for <lib> can i specify some how a fileset / pattern set ? Basically i want to copy different jar from different places. (Not in one directlry) And That fileset or patternset i want to be defined in another build file which actually imports this build file. <lib refid="${patternset.id}"/>

    Read the article

  • Where are classpath, path and pathelement documented in Ant version 1.8.0?

    - by Robert Menteer
    I'm looking over the documentation that comes with Apache Ant version 1.8.0 and can't find where classpath, path and pathelement are documented. I've found a page that describes path like structures but it doesn't list the valid attributes or nested elements for these. Another thing I can't find in the documentation is a description of the relationships between filelist, fileset, patternset and path and how to convert them back and forth. For instance there has to be an easier way to compile only those classes in one package while removing all class dependencies on the package classes and update documentation. <!-- Get list of files in which we're interested. --> <fileset id = "java.source.set" dir = "${src}"> <include name = "**/Package/*.java" /> </fileset> <!-- Get a COMMA separated list of classes to compile. --> <pathconvert property = "java.source.list" refid = "java.source.set" pathsep = ","> <globmapper from = "${src}/*.@{src.extent}" to = "*.class" /> </pathconvert> <!-- Remove ALL dependencies on package classes. --> <depend srcdir = "${src}" destdir = "${build}" includes = "${java.source.list}" closure = "yes" /> <!-- Get a list of up to date classes. --> <fileset id = "class.uptodate.set" dir = "${build}"> <include name = "**/*.class" /> </fileset> <!-- Get list of source files for up to date classes. --> <pathconvert property = "java.uptodate.list" refid = "class.uptodate.set" pathsep = ","> <globmapper from="${build}/*.class" to="*.java" /> </pathconvert> <!-- Compile only those classes in package that are not up to date. --> <javac srcdir = "${src}" destdir = "${build}" classpathref = "compile.classpath" includes = "${java.source.list}" excludes = "${java.uptodate.list}"/> <!-- Get list of directories of class files for package. --: <pathconvert property = "class.dir.list" refid = "java.source.set" pathsep = ","> <globmapper from = "${src}/*.java" to = "${build}*" /> </pathconvert> <!-- Convert directory list to path. --> <path id = "class.dirs.path"> <dirset dir = "${build}" includes = "class.dir.list" /> </path> <!-- Update package documentation. --> <jdepend outputfile = "${docs}/jdepend-report.txt"> <classpath refid = "compile.classpath" /> <classpath location = "${build}" /> <classespath> <path refid = "class.dirs.path" /> </classespath> <exclude name = "java.*" /> <exclude name = "javax.*" /> </jdepend> Notice there's a number of conversions between filesets, paths and comma separated list just to get the proper 'type' required for the different ant tasks. Is there a way to simplify this while still processing the fewest files in a complex directory structure?

    Read the article

1 2 3 4  | Next Page >