ANT build file for the Quickstart example
Deepak S Patwardhan
deepak.patwardhan at itaas.com
Thu Jul 12 09:05:03 PDT 2012
Thanks Paul.
Thats exactly what I needed.
Regards,
Deepak S Patwardhan.
From: Paul Sandoz [mailto:paul.sandoz at oracle.com]
Sent: 12 July 2012 20:30
To: Deepak S Patwardhan
Cc: jigsaw-dev at openjdk.java.net
Subject: Re: ANT build file for the Quickstart example
Hi Deepak,
The error indicates you are not using a version of OpenJDK Jigsaw to
compile. See the "executable" attribute of the javac task.
However, there is a more fundamental issue using the javac ant task since it
knows nothing about the new javac command line options. Thus it will likely
confuse OpenJDK Jigsaw javac by including the "-classpath" option in
addition to the '-modulepath" option explicitly added (which needs to
be <compilerarg line="-modulepath modules" />)
This is why i have been using special ant macros until the ant tasks are
modified.
See the examples, that are ant-based, linked from:
http://earthly-powers.blogspot.co.uk/2012/06/modular-services-with-openjdk
-jigsaw.html
http://earthly-powers.blogspot.co.uk/2012/07/modular-services-with-openjdk
-jigsaw.html
https://github.com/PaulSandoz/openjdk-jigsaw-examples/
Paul.
On Jul 12, 2012, at 3:54 PM, Deepak S Patwardhan wrote:
Hello,
Has anyone written an ANT build file for the Quick start example on Project
jigsaw's homepage ?
Since current Maven is pretty much unusable for Jigsaw projects (right?), I
tried to create an ANT build.xml with the intention to define targets like
compile - compile the code.
dist - prepare the jmod files using jpkg.
install - install the jmod files into project's module library using jmod.
But, I can't get the compile to happen successfully. This is what I tried :
(target init creates the modules/ folder)
<target name="compile" depends="init">
<javac srcdir="src" sourcepath="src/classes" destdir="modules"
fork="yes" includeantruntime="no">
<compilerarg value="-modulepath modules" />
</javac>
</target>
The build fails with this message :
compile:
[javac] Compiling 5 source files to
/home/deepak/Projects/kingdom/kssjava8/jigsaw/modules
[javac] javac: invalid flag: -modulepath modules
[javac] Usage: javac <options> <source files>
[javac] use -help for a list of possible options
Any suggestions ?
Regards,
Deepak S Patwardhan.
More information about the jigsaw-dev
mailing list