<ceylon-import-jar> Ant task

Usage

Note: You must declare the tasks with a <typedef>.

To import the example-foo-1.1.jar file in a Ceylon repository residing in the build directory as version 1.1 of module com.example.foo:

<target name="import" depends="ceylon-ant-taskdefs">
  <ceylon-import-jar jar="example-foo-1.1.jar"
    module="com.example.foo/1.1">
    <rep url="build"/>
  </ceylon-import-jar>
</target>

Description

Imports a jar file into a Ceylon module repository

The <ceylon-import-jar> ant task wraps the ceylon import-jar command.

Attributes

Attribute Description Required
jar

The jar file to import. This is equivalent to the jar-file argument.

Yes
module

The module to import. This is equivalent to the module argument.

Yes
cacheRep

Equivalent to the --cacherep command line option. Specifies the folder to use for caching downloaded modules. (default: ~/.ceylon/cache)

No
config

Equivalent to the --config command line option. Specifies the configuration file to use for this tool. (default: ./.ceylon/config)

No
cwd

Equivalent to the --cwd command line option. Specifies the current working directory for this tool. (default: the directory where the tool is run from)

No
descriptor

Equivalent to the --descriptor command line option. Specify a module.xml or module.properties file to be used as the module descriptor

No
errorProperty

The ant property to set to true in the event of an error

No
executable

The location of the ceylon executable script.

No
failOnError

Whether an error in executing this task should fail the ant build

No
force

Equivalent to the --force command line option. Skips sanity checks and forces publication of the JAR.

No
fork

Whether the task should be run in a separate VM (default: false)

No
inheritAll

Whether a task should inherit environment and properties. Only applies when forked == true.

No
noDefaultRepositories

Equivalent to the --no-default-repositories command line option. Indicates that the default repositories should not be used.

No
offline

Equivalent to the --offline command line option. Enables offline mode that will prevent connections to remote repositories.

No
out

Equivalent to the --out command line option. Specifies the output module repository (which must be publishable). (default: ./modules)

No
overrides

Equivalent to the --overrides command line option. Specifies the XML file to use to load module overrides. See http://ceylon-lang.org/documentation/current/reference/repository/maven/ for information. Experimental.

No
pass

Equivalent to the --pass command line option. Sets the password for use with an authenticated output repository (no default).

No
resultProperty

The ant property to set to the Ceylon program exit code

No
sourceJar

The jar file to import. This is equivalent to the source-jar-file argument.

No
stacktraces

Equivalent to the --stacktraces command line option. If an error propagates to the top level tool, print its stack trace.

No
sysRep

Equivalent to the --sysrep command line option. Specifies the system repository containing essential modules. (default: $CEYLON_HOME/repo)

No
user

Equivalent to the --user command line option. Sets the user name for use with an authenticated output repository (no default).

No
verbose

Equivalent to the --verbose command line option. Produce verbose output. If no flags are given then be verbose about everything, otherwise just be verbose about the flags which are present. Allowed flags include: all, loader.

No

Nested elements

<define>

A <define> element is used to set system properties for the ant task being executed. Equivalent to the --define command line option. Set a system property

The value for the system property can either be passed as a value attribute:

<define key="org.example.helloworld.greeting" value="Hi"/>

or it can be the text between the begin and end tags:

<define key="org.example.helloworld.greeting">Hi</define>

Alternatively, it is posible to dispense with the attributes and use the syntax

<define>org.example.helloworld.greeting=Hi</define>
Element Description Required
key

The property to be defined

No
value

The value of the define

No

<missingDependencyPackages>

Equivalent to the --missing-dependency-packages command line option. Specifies which packages a missing dependency contains. Can be specified multiple times. Format: module-name/module-version=package-wildcard(,package-wildcard)*, where package-wildcard supports *, ** and ? wildcards.

Element Description Required
module

The missing module name and version

No

<rep>

A module repository containing dependencies. Can be specified multiple times. Defaults to <rep url="./modules"/>.

Element Description Required
url

The URL or path of the module repository.

Yes, unless a `refid` is given
refid

A reference to a <rep> defined outside this task.

No

<reposet>

A set of module repositories containing dependencies. Can be specified multiple times. Default to modules.

A <reposet> element contains a number of <repo> and/or <reposet> elements. It can be defined at the top level, and then used by reference using the refid attribute so you don't have to repeat the same list of repositories all the time.

Element Description Required
refid

A reference to a <reposet> defined elsewhere.

No

See also