You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by vorpalarrow <ar...@gmail.com> on 2009/03/19 22:46:47 UTC

Ant Javac Target Attribute Issue

I am using:
jdk 1.6.0_11
ant 1.7.1

And I want to target 1.5.

However, using the target attribute below in my build file still generates
"1.6 version" classes.

<javac target="1.5" ...>

I've tried adding the source="1.5" and the bootclasspath="" to the 1.5 jar
files and forking the 1.6 javac just in case.

The only thing that works is installing the 1.5 jdk and using that or fork
the 1.5 javac executable with the 1.5 bootclasspath jars. (rt.jar, jsse.jar,
jce.jar, charsets.jar,...) 

I don't know how to properly target 1.5 with 1.6 in ant. Nothing seems to
work. I know I must be doing something stupid, but I can't figure it out. 

Any help would be extremely appreciated.

Regards,
Jason

-- 
View this message in context: http://www.nabble.com/Ant-Javac-Target-Attribute-Issue-tp22608438p22608438.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Ant Javac Target Attribute Issue

Posted by vorpalarrow <ar...@gmail.com>.
Thank you for your help. Although, I waisted space on the forum talking it
out helped me find my problem.

vorpalarrow wrote:
> 
> inheritAll was set to false. my mistake. Its a multi-level build file so I
> missed one javac call which caused the error. 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Ant-Javac-Target-Attribute-Issue-tp22608438p22611975.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Ant Javac Target Attribute Issue

Posted by vorpalarrow <ar...@gmail.com>.
Yes, that is what I did. However, it doesn't work. Thats why I'm puzzled. The
classes still have the 1.6 version information in them. I've talked to
several developers that use ant regularly and no-one has been able to help
me. 



<project name="foo" default="compile">
        <property name="ant.build.javac.target" value="1.5"/>
    <target name="compile">
        <javac srcdir="."/>
    </target>
</project>

Martin 




-- 
View this message in context: http://www.nabble.com/Ant-Javac-Target-Attribute-Issue-tp22608438p22611434.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Ant Javac Target Attribute Issue

Posted by Martin Gainty <mg...@hotmail.com>.
<project name="foo" default="compile">
        <property name="ant.build.javac.target" value="1.5"/>
    <target name="compile">
        <javac srcdir="."/>
    </target>
</project>

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung / Disclaimer and confidentiality note 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to  please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided.






> Date: Thu, 19 Mar 2009 14:46:47 -0700
> From: arr.mcgarr@gmail.com
> To: user@ant.apache.org
> Subject: Ant Javac Target Attribute Issue
> 
> 
> I am using:
> jdk 1.6.0_11
> ant 1.7.1
> 
> And I want to target 1.5.
> 
> However, using the target attribute below in my build file still generates
> "1.6 version" classes.
> 
> <javac target="1.5" ...>
> 
> I've tried adding the source="1.5" and the bootclasspath="" to the 1.5 jar
> files and forking the 1.6 javac just in case.
> 
> The only thing that works is installing the 1.5 jdk and using that or fork
> the 1.5 javac executable with the 1.5 bootclasspath jars. (rt.jar, jsse.jar,
> jce.jar, charsets.jar,...) 
> 
> I don't know how to properly target 1.5 with 1.6 in ant. Nothing seems to
> work. I know I must be doing something stupid, but I can't figure it out. 
> 
> Any help would be extremely appreciated.
> 
> Regards,
> Jason
> 
> -- 
> View this message in context: http://www.nabble.com/Ant-Javac-Target-Attribute-Issue-tp22608438p22608438.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

_________________________________________________________________
Windows Liveā„¢ Groups: Create an online spot for your favorite groups to meet.
http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009