ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gagnon, Joseph - 0558 - MITLL" <Joseph.Gag...@ll.mit.edu>
Subject How do I create a customized build?
Date Thu, 19 Mar 2015 18:44:35 GMT
First let me preface this question by stating that I'm very much an Ant 
newbie.

I have a Java application that was designed to provide the ability to "plug 
 in" a message transport mechanism (e.g. ActiveMQ) for a given client 
installation.  The code defines interfaces for the transport and then there 
are a number of implementations that conform to the interfaces, providing 
concrete implementations of the transports we support.  The idea is that a 
given client will indicate the transport they want/need to use and we will 
provide them with a build that includes only the classes for the chosen 
implementation. No other transport implementations should be included.  The 
reasons for this are to keep code size down and for 3rd party licensing 
issues.

How do you set up an Ant build file to customize the jar file produced so that 
it only includes a subset of the transport implementations?  Obviously I need 
to somehow get the transport selection into the build file so that it has the 
info it needs.  From what I've read, you have to use properties to get input 
arguments into the script.  Beyond that, I am at a loss as to what to do next.

I'll provide a brief package hierarchy to illustrate what is located where. 
If it makes sense to restructure this in some way, please let me know.

<base package>.impl
	config
		TransportConfig.java	<- Used to unmarshal a file used to configure the 
transport
	transport
		impl				<- Where the supported transport implementations live
			dds.rti
			jms.activemq
			udp
			<transportX>
		<other packages and classes>
	<other packages and classes>
<base package>.service
	TransportFactoryLoader.java	<- Uses a ServiceLoader to load a transport 
factory
						   (currently set up in build file)
<base package>.transport		<- Contains the interfaces the transports must 
implement
	<transport interfaces>

So, as an example, client A will be using ActiveMQ. We want to run the build 
so that only the <base package>.impl.transport.impl.jms.activemq classes are 
included, but nothing from the rti.dds, udp, etc. packages are included. I've 
tried to find information in this area, but have found nothing helps.

I am open to any suggestions and ideas about how to go about this.

Thanks,
Joe Gagnon

Engineer II
Group 58 - Cyber Systems & Technology
MIT Lincoln Laboratory
Lexington, MA


Mime
View raw message