Would you please help me to understand how to take advantage of the Ant work that you have done. Namely how to use amc-ant.jar and SmcJarWrapper. I've seen SMC_Tutorial.pdf and I've created Ant targets before but I still need a little extra help.
SMC: V6.6.0
Language: Java
IDE: IntelliJ IDEA V14.1
Thanks,
Bill
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
where:
${bin.dir} is a relative path to the directory containing smc-ant.jar
${smc.jar} is the relative path to Smc.jar file.
${smc.classpath} is the same as the class path used for javac.
${smc.dir} is the relative path to where the resulting SMC output file is place.
${ERemoteApp.sm} is defined using the following ant target:
where
${src.dir} is the relative path to the project source file directory.
I hope this example clears things up. I realize that IntelliJ IDEA uses a different project directory structure and build targets than NetBeans, but they are close enough where you can modify the above to work with IntelliJ.
Charles
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you Charles. I have it building now but it generates a new java file every time that I run the SMC-Compile target even if the source .sm file has not changed. The SMC Tutorial says that it should only rerun when the .sm file changes. Also, how could I specify more arguments (ie. -verbose)?
Here is what I have...
<target name="SMC-Compile" depends="-post-init">
<taskdef classname="net.sf.smc.ant.SmcJarWrapper" classpath="${basedir}\..\..\Infrastructure\ExternalDependencies\Smc\bin/smc-ant.jar" name="smc-compile">
<smc-compile smcjar="${smc.jar}" classpath="${smc.classpath}" target="java" destdir="${gen.absolute.dir}" smfile="${MyFsm.sm}">
</smc-compile></taskdef></target>
Here is how I use SmcJarWrapper in my ant builds. What follows is from a NetBeans project build.xml:<target name="-pre-compile">
<taskdef classname="net.sf.smc.ant.SmcJarWrapper" classpath="${bin.dir}/smc-ant.jar" name="smc-compile"><smc-compile smcjar="${smc.jar}" classpath="${smc.classpath}" target="java7" destdir="${src.dir}/net/sf/eBus/client/" smfile="${ERemoteApp.sm}">
</smc-compile></taskdef></target>where:
${bin.dir} is a relative path to the directory containing smc-ant.jar
${smc.jar} is the relative path to Smc.jar file.
${smc.classpath} is the same as the class path used for javac.
${smc.dir} is the relative path to where the resulting SMC output file is place.
${ERemoteApp.sm} is defined using the following ant target:<target name="-post-init">
<property name="ERemoteApp.sm" location="${src.dir}/net/sf/eBus/client/ERemoteApp.sm">
</property></target>where
${src.dir} is the relative path to the project source file directory.I hope this example clears things up. I realize that IntelliJ IDEA uses a different project directory structure and build targets than NetBeans, but they are close enough where you can modify the above to work with IntelliJ.CharlesANT BuildSent from sourceforge.net because you indicated interest in https://sourceforge.net/p/smc/discussion/27865/To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Last edit: Bill Thorpe 2016-04-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Would you please help me to understand how to take advantage of the Ant work that you have done. Namely how to use amc-ant.jar and SmcJarWrapper. I've seen SMC_Tutorial.pdf and I've created Ant targets before but I still need a little extra help.
SMC: V6.6.0
Language: Java
IDE: IntelliJ IDEA V14.1
Thanks,
Bill
Here is how I use SmcJarWrapper in my ant builds. What follows is from a NetBeans project build.xml:
<target name="-pre-compile">
<taskdef classname="net.sf.smc.ant.SmcJarWrapper" classpath="${bin.dir}/smc-ant.jar" name="smc-compile"></taskdef></target>
where:
${bin.dir} is a relative path to the directory containing smc-ant.jar
${smc.jar} is the relative path to Smc.jar file.
${smc.classpath} is the same as the class path used for javac.
${smc.dir} is the relative path to where the resulting SMC output file is place.
${ERemoteApp.sm} is defined using the following ant target:
<target name="-post-init">
<property name="ERemoteApp.sm" location="${src.dir}/net/sf/eBus/client/ERemoteApp.sm">
</property></target>
where
${src.dir} is the relative path to the project source file directory.
I hope this example clears things up. I realize that IntelliJ IDEA uses a different project directory structure and build targets than NetBeans, but they are close enough where you can modify the above to work with IntelliJ.
Charles
Thank you Charles. I have it building now but it generates a new java file every time that I run the SMC-Compile target even if the source .sm file has not changed. The SMC Tutorial says that it should only rerun when the .sm file changes. Also, how could I specify more arguments (ie. -verbose)?
Here is what I have...
<target name="SMC-Compile" depends="-post-init">
<taskdef classname="net.sf.smc.ant.SmcJarWrapper" classpath="${basedir}\..\..\Infrastructure\ExternalDependencies\Smc\bin/smc-ant.jar" name="smc-compile">
<smc-compile smcjar="${smc.jar}" classpath="${smc.classpath}" target="java" destdir="${gen.absolute.dir}" smfile="${MyFsm.sm}">
</smc-compile></taskdef></target>
<target name="-post-init">
<property name="smc.jar" location="${basedir}\..\..\Infrastructure\ExternalDependencies\Smc\bin\Smc.jar">
<property name="smc.classpath" location="${basedir}\..\..\Infrastructure\ExternalDependencies\Smc\bin\smc-ant.jar">
<property name="MyFsm.sm" location="${source.absolute.dir}/MyFsm.sm">
</property></property></property></target>
-Bill
To: [smc:discussion] 27865@discussion.smc.p.re.sf.net
Sent: Thursday, April 14, 2016 6:43 AM
Subject: [smc:discussion] ANT Build
Here is how I use SmcJarWrapper in my ant builds. What follows is from a NetBeans project build.xml:<target name="-pre-compile">
<taskdef classname="net.sf.smc.ant.SmcJarWrapper" classpath="${bin.dir}/smc-ant.jar" name="smc-compile"><smc-compile smcjar="${smc.jar}" classpath="${smc.classpath}" target="java7" destdir="${src.dir}/net/sf/eBus/client/" smfile="${ERemoteApp.sm}">
</smc-compile></taskdef></target>where:
${bin.dir} is a relative path to the directory containing smc-ant.jar
${smc.jar} is the relative path to Smc.jar file.
${smc.classpath} is the same as the class path used for javac.
${smc.dir} is the relative path to where the resulting SMC output file is place.
${ERemoteApp.sm} is defined using the following ant target:<target name="-post-init">
<property name="ERemoteApp.sm" location="${src.dir}/net/sf/eBus/client/ERemoteApp.sm">
</property></target>where
${src.dir} is the relative path to the project source file directory.I hope this example clears things up. I realize that IntelliJ IDEA uses a different project directory structure and build targets than NetBeans, but they are close enough where you can modify the above to work with IntelliJ.CharlesANT BuildSent from sourceforge.net because you indicated interest in https://sourceforge.net/p/smc/discussion/27865/To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Last edit: Bill Thorpe 2016-04-18