I did an example and could see that behaviour.
build.xml
---------
<project>
<mkdir dir="target/ant-classes"/>
<javac srcdir="src/main/java" destdir="target/ant-classes"
includeantruntime="false" />
</project>
src/main/java/MyClass.java
--------------------------
public class MyClass {}
pom.xml
-------
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.materne.ant</groupId>
<artifactId>class-size</artifactId>
<version>1.0.0-SNAPSHOT</version>
</project>
Class-Size:
Ant : 122 Byte
Maven: 246 Byte
When adding 'debug="on"' to Ant's <javac> it produces also a 246 Byte class
file.
Jan
> -----Ursprüngliche Nachricht-----
> Von: Jan Matèrne (jhm) [mailto:[email protected]]
> Gesendet: Dienstag, 3. November 2015 17:36
> An: 'Ant Users List'
> Betreff: AW: Class size
>
> Next idea is using different compile flags, e.g. debug.
>
> Jan
>
> > -----Ursprüngliche Nachricht-----
> > Von: aalok singhvi [mailto:[email protected]]
> > Gesendet: Dienstag, 3. November 2015 12:17
> > An: Ant Users List
> > Betreff: Re: Class size
> >
> > Yes...both are using same JDK.
> >
> > On Tue, Nov 3, 2015 at 6:16 AM, Jan Matèrne (jhm) <[email protected]>
> > wrote:
> >
> > > Are you sure that Maven and Ant are using the same JDK?
> > >
> > > Jan
> > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: aalok singhvi [mailto:[email protected]]
> > > > Gesendet: Sonntag, 1. November 2015 22:34
> > > > An: Maven Users List; Ant Users List
> > > > Betreff: Class size
> > > >
> > > > Hello,
> > > > I have a basic question...
> > > >
> > > > If i compile a simple hello world java program using javac in ant
> > > > i get a different size as compared to class compiled with maven
> > plugin.
> > > > My java source and target it 1.6.
> > > >
> > > > What is the reason. Can anyone help me with this. I will really
> > > > appreciate your help.
> > > >
> > > > Thanks
> > > >
> > > > --
> > > > Aalok Singhvi
> > >
> > >
> > > -------------------------------------------------------------------
> -
> > > - To unsubscribe, e-mail: [email protected] For
> > additional
> > > commands, e-mail: [email protected]
> > >
> > >
> >
> >
> > --
> > Aalok Singhvi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected] For additional
> commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]