Eclipse compiler, DSL, ant [message #1061802] |
Tue, 04 June 2013 07:30 |
michael m Messages: 17 Registered: March 2013 |
Junior Member |
|
|
Hi,
i'm trying to create an ant build script to package my dsl project into a jar file.
1. Start Eclipse which contains my grammar project.
2. Run Eclipse Application from here.
3. Create example project.
From here i can debug my dsl files localy.
From eclipse i can export the project (export->jar file) or also generate an ant build file (export->ant buildfile) for it.
But both options generate a different size for the class files compared to the "/bin" folder in eclipse.
If i deploy now the jar file i cannot debug my dsl files anymore. But if i
move the class files which eclipse generated in /bin into the jar file and override
them and deploy again, then it works.
Can someone give me a hint on what the export option of Eclipse is doing different?
Or how to compile my files in ant the same way as eclipse is doing it?
Thanks,
Michael
[Updated on: Tue, 04 June 2013 07:31] Report message to a moderator
|
|
|
|
Re: Eclipse compiler, DSL, ant [message #1061847 is a reply to message #1061817] |
Tue, 04 June 2013 10:57 |
michael m Messages: 17 Registered: March 2013 |
Junior Member |
|
|
Hi Jan,
unfortunately that didn't solve it
In my case it was the /output/src folder instead of the src-gen folder so i adjusted it but its still the same result.
Attach is my build file which is generated from eclipse. (I removed some includes to make it shorter here which are marked by "..."):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="TestExtension">
<property environment="env"/>
<property name="ECLIPSE_HOME" value="/absolute/path/here/eclipse-juno"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<path id="Plug-in Dependencies.libraryclasspath">
<pathelement location="${ECLIPSE_HOME}/plugins/com.ibm.icu_4.4.2.v20110823.jar"/>
...
<pathelement location="../../Dsl/com.my.dsl/bin"/>
</path>
<path id="TestExtension.classpath">
<pathelement location="bin"/>
<path refid="Plug-in Dependencies.libraryclasspath"/>
...
<pathelement location="../commons-codec-1.3.jar"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy includeemptydirs="false" todir="bin">
<fileset dir="output/src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-subprojects,build-project" name="build"/>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
<src path="src"/>
<src path="output/src"/>
<classpath refid="TestExtension.classpath"/>
</javac>
</target>
<target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
</project>
"ant build" basically generates the class files also into the bin folder they just have a different size as if i generate the class files from within eclipse.
Any ideas?
Exporting from eclipse works though. I just can't make it with ant.
Cheers,
Michael
[Updated on: Wed, 05 June 2013 06:38] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02813 seconds