Flying Jay
Flying Jay

Reputation: 359

How to run Apache ant in offline mode?

In the project's build.xml there is this line: <target name="resolve" depends="init-x" unless="offline">

But how to enable the offline mode?

Neither the online documentation nor ant's manpage mentions the "offline" mode.

Upvotes: 0

Views: 428

Answers (1)

user4524982
user4524982

Reputation:

The documentation doesn't mention an offline mode because there is no offline mode in Ant. Whoever wrote your build file made it sensitive to the existence of a property named offline.

Your build file contains a target that uses the unless attribute. This means the target will not be executed if an Ant property with the name offline exists.

When running Ant from the command line you can set it via -Doffline=foo. Note the value of the property doesn't matter for Ant's unless attribute, so -Doffline=false will still mean your target will be skipped.

Upvotes: 1

Related Questions