lib/reality/generators/standard_artifact_dsl.rb
#
# Define a java artifact. This is a wrapper around the artifact() method
# that makes additional assumptions for java based artifacts. This method
# assumes a maven-style file system layout (i.e. java is stored in main/java or test/java).
# It also assumes that the facet has the fully qualified name of the artifact in a method
# named with the convention "qualified_<artifact_key>_name"
#
# The options supported include those supplied to the artifact method plus:
# * :artifact_category - The option must be one of :main or :test and determines which source hierarchy the code is added to.
#
Define a java artifact. This is a wrapper around the artifact() method
that makes additional assumptions for java based artifacts. This method
assumes a maven-style file system layout .
It also assumes that the facet has the fully qualified name of the artifact in a method
named with the convention "qualified__name"

The options supported include those supplied to the artifact method plus:
:artifact_category - The option must be one of :main or :test and determines which source hierarchy the code is added to.
Define a java artifact . This is a wrapper around the artifact () method that makes additional assumptions for java based artifacts . This method assumes a maven - style file system layout . It also assumes that the facet has the fully qualified name of the artifact in a method named with the convention " qualified__name " The options supported include those supplied to the artifact method plus : : artifact_category - The option must be one of : main or : test and determines which source hierarchy the code is added to .
def java_artifact(template_set_suffix, artifact_key, options = {})
        options = options.dup
        artifact_category = options.delete(:artifact_category) || :main
        Reality::Generators.error("artifact_category '#{artifact_category}' is not a known type") unless [:main, :test].include?(artifact_category)
        filename_pattern = "#{artifact_category}/java/\#{#{self.target_key}.#{self.facet_key}.qualified_#{artifact_key}_name.gsub(\".\",\"/\")}.java"
        file_artifact(template_set_suffix, artifact_key, filename_pattern, options)
      end
def java_artifact ( template_set_suffix , artifact_key , options = { } ) options = options . dup artifact_category = options . delete ( :artifact_category ) || :main Reality :: Generators . error ( "artifact_category '#{artifact_category}' is not a known type" ) unless [ :main , :test ] . include? ( artifact_category ) filename_pattern = "#{artifact_category}/java/\#{#{self.target_key}.#{self.facet_key}.qualified_#{artifact_key}_name.gsub(\".\",\"/\")}.java" file_artifact ( template_set_suffix , artifact_key , filename_pattern , options ) end
Define a java artifact.
Define a java artifact .
template_set_suffix
<not_specific>
artifact_key
<not_specific>
options
<not_specific>