Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
ceylon compile(1)					     ceylon compile(1)

NAME
       ceylon compile -	Compiles Ceylon	and Java source	code and directly pro-
       duces module and	source archives	in a module repository.

SYNOPSIS
       ceylon compile [--apt=module...]	[--auto-export-maven-dependencies]
		      [--cacherep=url] [--cwd=dir] [--ee] [--ee-
		      annotation=value...] [--ee-import=value...]
		      [--encoding=encoding] [--flat-classpath] [--fully-
		      export-maven-dependencies] [--generate-module-info]
		      [--include-dependencies[=flags]] [--incremental]
		      [--javac=option...] [--jdk-provider=module] [--maven-
		      overrides=file] [--no-default-repositories] [--no-osgi]
		      [--no-pom] [--offline] [--osgi-provided-bundles=modules]
		      [--out=url] [--overrides=file] [--pack200]
		      [--pass=secret] [--progress] [--rep=url...]
		      [--resource=dirs...] [--resource-root=folder-name]
		      [--source=dirs...] [--src=dirs...] [--suppress-
		      warning[=warnings...]] [--sysrep=url] [--target=version]
		      [--timeout=seconds] [--user=name]	[--verbose[=flags]]
		      [--] [moduleOrFile]...

DESCRIPTION
       The  default  module  repositories are modules and https://modules.cey-
       lon-lang.org/repo/1, while the default source directory is  source  and
       the  default  resource directory	is resource. The default output	module
       repository is modules.

       The <moduleOrFile> arguments can	be either module names	(without  ver-
       sions)  or file paths specifying	the Ceylon or Java source code to com-
       pile.

       When <moduleOrFile> specifies a module the compiler searches for	compi-
       lation  units  and resource files belonging to the specified modules in
       the specified source and	resource directories. For each specified  mod-
       ule, the	compiler generates a module archive, source archive, and their
       checksum	files in the specified output module repository.

       When <moduleOrFile> specifies a source file only	that file is  compiled
       and the module archive is created or updated with the .class files pro-
       duced. The source file path is treated as relative to the  current  di-
       rectory	(it  still  needs  to  be located either in the	default	source
       folder or in any	folder defined by the configuration file  or  --source
       options!).

       When  <moduleOrFile>  specifies a resource file only that file is added
       to the module archive. The resource file	path is	treated	as relative to
       the  current  directory (it still needs to be located either in the de-
       fault resource folder or	in any folder  defined	by  the	 configuration
       file or --resource options!).

       All  program elements imported by a compilation unit must belong	to the
       same module as the compilation unit, or must belong to a	module that is
       explicitly imported in the module descriptor.

       The compiler searches for dependencies in the following locations:

       o module	archives in the	specified repositories,

       o source	archives in the	specified repositories,	and

       o module	directories in the specified source directories.

OPTIONS
       --apt=module
	      Specifies	the list of modules to use as Java annotation-process-
	      ing modules (default: none). Experimental.

       --auto-export-maven-dependencies
	      When using JBoss Modules (the default), treats all module	depen-
	      dencies between Maven modules as shared.

       --cacherep=url
	      Specifies	the folder to use for caching downloaded modules. (de-
	      fault: ~/.ceylon/cache)

       --cwd=dir
	      Specifies	the current working directory for this tool. (default:
	      the directory where the tool is run from)

       --ee   Enable  "EE  mode" globally for all declarations in the compila-
	      tion

       --ee-annotation=value
	      Override the default annotation types which  trigger  "EE	 mode"
	      with  the	given fully-qualified Java annotation type name.When a
	      declaration is annotated with any	of the listed  annotations  EE
	      module  will be enabled for the top-level	declaration containing
	      that annotated declaration. For example if this option  includes
	      the  value javax.inject.Inject then EE mode would	be enabled for
	      any class	with an	attribute annotatedwith	javax.inject::inject.

       --ee-import=value
	      Override the default module imports which	trigger	"EE mode" with
	      the  given  module imports.When a	module null imports any	of the
	      listed modules EE	mode will be enabled for all  declarations  in
	      the  module.For  example	if  this  option  includes  the	 value
	      javax.javaeeapi or maven:"javax.javaee-api" then EE  mode	 would
	      be enabled for any declaration in	any module which had that null
	      module import.

       --encoding=encoding, -E encoding
	      Sets the encoding	used for reading source	 files(default:	 plat-
	      form-specific).

       --flat-classpath, -F
	      Compiles the Ceylon module using a flat classpath.

       --fully-export-maven-dependencies
	      When using JBoss Modules (the default), treats all module	depen-
	      dencies between Maven modules as shared, even to Ceylon modules.

       --generate-module-info
	      Generate Java 9 (Jigsaw) module-info.class module	descriptor  in
	      the generated Ceylon archive.

       --include-dependencies[=flags]
	      Determines if and	how compilation	of dependencies	should be han-
	      dled. Allowed flags include: never, once,	force, check.

       --incremental
	      Enables incremental compilation.

       --javac=option
	      Passes an	option to the underlying java compiler.

       --jdk-provider=module
	      Specifies	the name of the	module providing the JDK (default: the
	      underlying JDK).

       --maven-overrides=file
	      Specifies	 the XML file to use to	load Maven artifact overrides.
	      See	   http://ceylon-lang.org/documentation/current/refer-
	      ence/repository/maven/  for information. Deprecated: use --over-
	      rides.

       --no-default-repositories
	      Indicates	that the default repositories should not be used.

       --no-osgi
	      Indicates	that the generated car file should  not	 contain  OSGi
	      module declarations.

       --no-pom
	      Indicates	 that  the generated car file should not contain Maven
	      POM module declarations.

       --offline, -L
	      Enables offline mode that	will  prevent  connections  to	remote
	      repositories.

       --osgi-provided-bundles=modules
	      Comma-separated list of module names. The	listed modules are ex-
	      pected to	be OSGI	bundles	provided by the	framework, and will be
	      omitted from the generated MANIFEST 'Required-Bundle' OSGI head-
	      er.

       --out=url, -o url
	      Specifies	the output module repository (which must  be  publish-
	      able). (default: ./modules)

       --overrides=file, -O file
	      Specifies	 the  XML  file	 to  use to load module	overrides. See
	      http://ceylon-lang.org/documentation/current/reference/reposito-
	      ry/maven/	for information. null.

       --pack200
	      Try to make the generated	car file smaller by repacking it using
	      pack200.

       --pass=secret
	      Sets the password	for use	with an	authenticated output reposito-
	      ry (no default).

       --progress
	      Print progress information.

       --rep=url
	      Specifies	 a  module  repository containing dependencies.	Can be
	      specified	multiple  times.  (default:  modules,  ~/.ceylon/repo,
	      https://modules.ceylon-lang.org/repo/1)

       --resource=dirs,	-r dirs
	      Path  to	directory  containing resource files. Can be specified
	      multiple times; you can also specify several paths separated  by
	      your operating system's PATH separator. (default:	./resource)

       --resource-root=folder-name, -R folder-name
	      Sets the special resource	folder name whose files	will end up in
	      the root of the resulting	module CAR file	(default: ROOT).

       --source=dirs
	      An alias for --src (default: ./source)

       --src=dirs, -s dirs
	      Path to directory	containing source files. Can be	specified mul-
	      tiple  times;  you  can  also specify several paths separated by
	      your operating system's PATH separator. (default:	./source)

       --suppress-warning[=warnings], -W
	      Suppress the reporting of	the given warnings. If no warnings are
	      given  then  suppresss  the reporting of all warnings, otherwise
	      just suppresss those which are present. Allowed  flags  include:
	      filenameNonAscii,	 filenameCaselessCollision,  deprecation, com-
	      pilerAnnotation, doclink,	expressionTypeNothing,	unusedDeclara-
	      tion,   unusedImport,   ceylonNamespace,	 javaNamespace,	  sup-
	      pressedAlready, suppressesNothing, unknownWarning,  ambiguousAn-
	      notation,	similarModule, importsOtherJdk,	javaAnnotationElement.

       --sysrep=url
	      Specifies	 the  system  repository containing essential modules.
	      (default:	$CEYLON_HOME/repo)

       --target=version, -t version
	      The JVM that generated .class files should target. Use 7 to tar-
	      get Java 7 JVMs or 8 to target Java 8 JVMs.

       --timeout=seconds, -T seconds
	      Sets  the	 timeout for connections to remote repositories, use 0
	      for no timeout (default: 20).

       --user=name
	      Sets the user name for use with an authenticated output  reposi-
	      tory (no default).

       --verbose[=flags], -d
	      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, ast,
	      code, cmr, benchmark.

COMPILING DEPENDENCIES
       The --include-dependencies option can take the following	flags:

       o null -	Never perform any compilation

       o null -	Only compile when the compiled module is not available

       o null -	Compile	when the sources are newer than	the compiled module

       o null -	Always compile

       If the flag is given without an argument	it's the  same	as  specifying
       check. If no flag is given at all it's the same as specifying never.

CONFIGURATION FILE
       The compile tool	accepts	the following options from the Ceylon configu-
       ration file: defaults.offline, defaults.encoding, compiler.source, com-
       piler.resource  and repositories	(the equivalent	options	on the command
       line always have	precedence).

REPOSITORIES
       Repositories like those specified with the --rep	or --out  options  can
       be file paths, HTTP urls	to remote servers or can be names of reposito-
       ries when prepended with	a + symbol. These names	refer to  repositories
       defined in the configuration file or can	be any of the following	prede-
       fined names +SYSTEM, +CACHE, +LOCAL, +USER, +REMOTE or +MAVEN. For more
       information     see    https://ceylon-lang.org/documentation/1.3/refer-
       ence/repository/tools

SPECIFYING javac OPTIONS
       It is possible to pass options to the javac compiler by prefixing  them
       with  --javac=  and  separating	the javac option from its argument (if
       any) using another =. For example, the option --javac=-g:none is	equiv-
       alent to	javac's	-g:none

       Execute	ceylon	compile	--javac=-help for a list of the	standard javac
       options,	and ceylon compile --javac=-X for a list of  the  non-standard
       javac options.

       null:  There is no guarantee that any particular	javac option or	combi-
       nation of options will work, or continue	to work	in future releases.

				18 August 2017		     ceylon compile(1)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | COMPILING DEPENDENCIES | CONFIGURATION FILE | REPOSITORIES | SPECIFYING javac OPTIONS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=ceylon-compile&sektion=1&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help