Hi all,I see myself adding files here and there on my projects (JBoss cli commands, shell scripts, SQL scripts...) and I use the touch command in Forge extensively. But how could I add content to these files ? I mostly write Forge scripts, so I would love to do something like that in my script :# Creates a projectproject-new --named test
# Adds a few extra files and directories
mkdir src/main/script ;
touch src/main/resources/insert.sql ; // This creates an empty file
touch src/main/script/wildfly-show.cli --content (((( // This adds content to the file
version
# ####################
# # System Properties
# ####################
/core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)
# ####################
# # Datasource
# ####################
/subsystem=datasources/data-source=ApplicationBlancheH2DS:read-resource
/subsystem=datasources/data-source=ApplicationBlancheH2DS:test-connection-in-pool
/subsystem=datasources/data-source=ApplicationBlancheOracleDS:read-resource
/subsystem=datasources/data-source=ApplicationBlancheOracleDS:test-connection-in-pool
/subsystem=datasources/jdbc-driver=oracle:read-resource
))))
And this command would just create a file with the previous content in it. As you can see, this can be tricky : when to end the content of a file (something similar to <![CDATA[]]>)What do you think ? Any idea to integrate this feature smoothly in Forge ?--
Antonio Goncalves
Software architect and Java Champion
Web site | Twitter | LinkedIn | Paris JUG | Devoxx France