You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Rob Moore (JIRA)" <xm...@xml.apache.org> on 2005/07/20 18:42:51 UTC

[jira] Created: (XMLBEANS-180) Add 'javatarget' attribute to ant task so that it behaves like ant javac task

Add 'javatarget' attribute to ant task so that it behaves like ant javac task
-----------------------------------------------------------------------------

         Key: XMLBEANS-180
         URL: http://issues.apache.org/jira/browse/XMLBEANS-180
     Project: XMLBeans
        Type: Improvement
  Components: Tools  
    Versions: Version 2    
    Reporter: Rob Moore
    Priority: Minor
     Fix For: Version 2


I am on a machine running the 1.5 JDK. However, I must generate xmlbean jar files that are compatible with 1.4 JDKs. I expected there to be an attribute similar to that found in the ant javac task that allows one to generate class files for specific VM version, like so:

  <javac srcdir="${src}"
         destdir="${build}"
         source="1.4"
         target="1.4"
  />

I thought that setting the javasource attribute might have this effect, but it does not. As a result of not having this feature, I am unable to generate compatible jars from within ant using my current build process which makes use of the above-mentioned javac attribute.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-180) Add 'javatarget' attribute to ant task so that it behaves like ant javac task

Posted by "Rob Moore (JIRA)" <xm...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XMLBEANS-180?page=comments#action_12316261 ] 

Rob Moore commented on XMLBEANS-180:
------------------------------------

After some more research, it appears that this issue may be solved in the 2.0 release (I was using a beta) insofar as I should be able to build jars use for 1.4 JDKs.

Looking at the source for xxx version 2.0 final org.apache.xmlbeans.impl.tool.XMLBean, I noticed at around line 255:

 if (source != null)

                {

                    javac.setSource(source);

                    javac.setTarget(source);

                }

                else

                {

                    javac.setSource("1.4");

                    javac.setTarget("1.4");

                }

Source seems to be an undocumented attribute that appears to have the same purpose as a combination of source and target in javac. However, looking at the code comments, the attribute seems to be under review:

  //REVIEW this allows people to deal with the case where they drag in

  //more files for compilation than they should.  not sure if this is

  //a good thing or not

  private String source = null;

  public void setSource(String s) { source = s; }

> Add 'javatarget' attribute to ant task so that it behaves like ant javac task
> -----------------------------------------------------------------------------
>
>          Key: XMLBEANS-180
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-180
>      Project: XMLBeans
>         Type: Improvement
>   Components: Tools
>     Versions: Version 2
>     Reporter: Rob Moore
>     Priority: Minor
>      Fix For: Version 2

>
> I am on a machine running the 1.5 JDK. However, I must generate xmlbean jar files that are compatible with 1.4 JDKs. I expected there to be an attribute similar to that found in the ant javac task that allows one to generate class files for specific VM version, like so:
>   <javac srcdir="${src}"
>          destdir="${build}"
>          source="1.4"
>          target="1.4"
>   />
> I thought that setting the javasource attribute might have this effect, but it does not. As a result of not having this feature, I am unable to generate compatible jars from within ant using my current build process which makes use of the above-mentioned javac attribute.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Resolved: (XMLBEANS-180) Add 'javatarget' attribute to ant task so that it behaves like ant javac task

Posted by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XMLBEANS-180?page=all ]
     
Radu Preotiuc-Pietro resolved XMLBEANS-180:
-------------------------------------------

    Fix Version: Version 2.1
                     (was: Version 2)
     Resolution: Fixed

Ok, commited the fix at r292894. Thanks!

> Add 'javatarget' attribute to ant task so that it behaves like ant javac task
> -----------------------------------------------------------------------------
>
>          Key: XMLBEANS-180
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-180
>      Project: XMLBeans
>         Type: Improvement
>   Components: Tools
>     Versions: Version 2
>     Reporter: Rob Moore
>     Priority: Minor
>      Fix For: Version 2.1
>  Attachments: XMLBean.java.diff
>
> I am on a machine running the 1.5 JDK. However, I must generate xmlbean jar files that are compatible with 1.4 JDKs. I expected there to be an attribute similar to that found in the ant javac task that allows one to generate class files for specific VM version, like so:
>   <javac srcdir="${src}"
>          destdir="${build}"
>          source="1.4"
>          target="1.4"
>   />
> I thought that setting the javasource attribute might have this effect, but it does not. As a result of not having this feature, I am unable to generate compatible jars from within ant using my current build process which makes use of the above-mentioned javac attribute.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-180) Add 'javatarget' attribute to ant task so that it behaves like ant javac task

Posted by "Dan Durkin (JIRA)" <xm...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XMLBEANS-180?page=comments#action_12330984 ] 

Dan Durkin commented on XMLBEANS-180:
-------------------------------------

Looks like javasource should be used instead of source.

I'll try and attach a patch.

> Add 'javatarget' attribute to ant task so that it behaves like ant javac task
> -----------------------------------------------------------------------------
>
>          Key: XMLBEANS-180
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-180
>      Project: XMLBeans
>         Type: Improvement
>   Components: Tools
>     Versions: Version 2
>     Reporter: Rob Moore
>     Priority: Minor
>      Fix For: Version 2

>
> I am on a machine running the 1.5 JDK. However, I must generate xmlbean jar files that are compatible with 1.4 JDKs. I expected there to be an attribute similar to that found in the ant javac task that allows one to generate class files for specific VM version, like so:
>   <javac srcdir="${src}"
>          destdir="${build}"
>          source="1.4"
>          target="1.4"
>   />
> I thought that setting the javasource attribute might have this effect, but it does not. As a result of not having this feature, I am unable to generate compatible jars from within ant using my current build process which makes use of the above-mentioned javac attribute.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Updated: (XMLBEANS-180) Add 'javatarget' attribute to ant task so that it behaves like ant javac task

Posted by "Dan Durkin (JIRA)" <xm...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XMLBEANS-180?page=all ]

Dan Durkin updated XMLBEANS-180:
--------------------------------

    Attachment: XMLBean.java.diff

patch fixes the compiling of java 1.5 files.

> Add 'javatarget' attribute to ant task so that it behaves like ant javac task
> -----------------------------------------------------------------------------
>
>          Key: XMLBEANS-180
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-180
>      Project: XMLBeans
>         Type: Improvement
>   Components: Tools
>     Versions: Version 2
>     Reporter: Rob Moore
>     Priority: Minor
>      Fix For: Version 2
>  Attachments: XMLBean.java.diff
>
> I am on a machine running the 1.5 JDK. However, I must generate xmlbean jar files that are compatible with 1.4 JDKs. I expected there to be an attribute similar to that found in the ant javac task that allows one to generate class files for specific VM version, like so:
>   <javac srcdir="${src}"
>          destdir="${build}"
>          source="1.4"
>          target="1.4"
>   />
> I thought that setting the javasource attribute might have this effect, but it does not. As a result of not having this feature, I am unable to generate compatible jars from within ant using my current build process which makes use of the above-mentioned javac attribute.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org