Make ant quiet without the -q flag?

One option might be to set the logging level from within the target. You can access loggers by means of a short script task. Something like: <target … > <script language=”javascript”> var logger = project.getBuildListeners( ).firstElement( ); logger.setMessageOutputLevel( 0 ); </script> … </target> I’m not familiar with how Eclipse calls Ant, but it might be … Read more

Generate manifest class-path from in Ant

<path id=”build.classpath”> <fileset dir=”${basedir}”> <include name=”lib/*.jar”/> </fileset> </path> <pathconvert property=”manifest.classpath” pathsep=” “> <path refid=”build.classpath”/> <mapper> <chainedmapper> <flattenmapper/> <globmapper from=”*.jar” to=”lib/*.jar”/> </chainedmapper> </mapper> </pathconvert> <target depends=”compile” name=”buildjar”> <jar jarfile=”${basedir}/${test.jar}”> <fileset dir=”${build}” /> <manifest> <attribute name=”Main-Class” value=”com.mycompany.TestMain”/> <attribute name=”Class-Path” value=”${manifest.classpath}”/> </manifest> </jar> </target> For further information check out this article.

Ivy, what is the master configuration and why is it not pulling jvyaml?

I would suggest restructuring your configurations as follows: <ivy-module version=”2.0″> <info organisation=”com.myspotontheweb” module=”demo”/> <configurations> <conf name=”compile” description=”Libraries needed only for compilation” /> <conf name=”runtime” description=”Libraries only needed at runtime” extends=”compile” /> <conf name=”test” description=”Libraries only needed for testing” extends=”runtime” /> </configurations> <dependencies> <dependency org=”net.java.dev” name=”jvyaml” rev=”0.2.1″ conf=”runtime->default” /> <dependency org=”org.apache.solr” name=”solr-core” rev=”3.6.0″ conf=”runtime->default” /> </dependencies> … Read more

Ant to Maven – multiple build targets

You could do this with profiles… If you really wanted to use two separate profiles and customize the JAR plugin to include and exclude patterns of class and package names, you could easily do this by putting something like this in your POM: <profiles> <profile> <id>everything</id> <build> <plugins> <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> <classifier>everything</classifier> <includes> <include>**/*</include> </includes> … Read more

How do I use Nant/Ant naming patterns?

The rules are: a single star (*) matches zero or more characters within a path name a double star (**) matches zero or more characters across directory levels a question mark (?) matches exactly one character within a path name Another way to think about it is double star (**) matches slash (/) but single … Read more

comparing databases and generating sql script using liquibase

Obtaining the SQL statements, representing the diff between two databases, is a two step operation: Generate the XML “diff” changelog Generate SQL statements Example This example requires a liquibase.properties file (simplifies the command-line parameters): classpath=/path/to/jdbc/jdbc.jar driver=org.Driver url=jdbc:db_url1 username=user1 password=pass1 referenceUrl=jdbc:db_url2 referenceUsername=user2 referencePassword=pass2 changeLogFile=diff.xml Now run the following commands to create the SQL statements: liquibase diffChangeLog … Read more

good ivy tutorial for local repository? [closed]

Creating a local ivy repository is straight forward, maven is not required. Here’s an example of publishing some text files using ivy as a standalone program. I have 3 files I want to publish: src/English.txt src/Spanish.txt src/Irish.txt The ivy file src/ivy.xml details the name of the module and a list of the artifacts being published. … Read more

Create cross platform Java SWT Application

I’ve just run into the same problem. I haven’t tried it yet, but I plan to include versions of swt.jar for all platforms and load the correct one dynamically in the start of the main method. UPDATE: It worked. build.xml includes all jars: <zipfileset dir=”/home/aromanov/workspace/foo/lib” includes=”swt_linux_gtk_x86.jar”/> <zipfileset dir=”/home/aromanov/workspace/foo/lib” includes=”swt_macosx_x86.jar”/> <zipfileset dir=”/home/aromanov/workspace/foo/lib” includes=”swt_win32_x86.jar”/> <zipfileset dir=”/home/aromanov/workspace/foo/lib” includes=”swt_linux_gtk_x64.jar”/> … Read more

How in ant use "<" in text?

When you want to use characters which stand for predefined standard entities in attribute value or text, you must write it as entity. Predefined entity covers ” ‘ < > & In your case you have to write replaceregexp match=”app_name&quot;&gt;(.*)&lt;” (The single quot limits the attribute value here, when a single quote appear IN the … Read more