You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dave Brosius (JIRA)" <ji...@apache.org> on 2011/04/20 07:21:05 UTC

[jira] [Created] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

[patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
------------------------------------------------------------------------------------------------------------

                 Key: DERBY-5200
                 URL: https://issues.apache.org/jira/browse/DERBY-5200
             Project: Derby
          Issue Type: Improvement
          Components: Build tools
    Affects Versions: 10.7.1.1
            Reporter: Dave Brosius
            Priority: Trivial
             Fix For: 10.8.1.3


if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Brosius updated DERBY-5200:
--------------------------------

    Attachment: auto_download_junit.diff

if the download fails for some reason, log messages, but don't fail the built in case developer is in a disconnected state.

> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.8.1.3
>
>         Attachments: auto_download_junit.diff, auto_download_junit.diff, auto_download_junit.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035701#comment-13035701 ] 

Myrna van Lunteren commented on DERBY-5200:
-------------------------------------------

I changed the BUILDING.html a little, so now there's more about the junit property under the customized build area, and the requirements section is unchanged. Committed to trunk with revision 1124438.

> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.9.0.0
>
>         Attachments: DERBY_5200_2.diff, auto_download_junit.diff, auto_download_junit.diff, auto_download_junit.diff, update_instructions.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-5200:
--------------------------------------

    Attachment: DERBY_5200_2.diff

Adding a patch that checks if junit is set; if it's set, but junit.jar is not there, the build will error out; if it's set and junit.jar is there, it will use that one; if junit is not set, it will get junit.jar and copy it into basedir/tools/java and use it from there.
Added a comment to BUILDING.html too.

This worked for me, if there are no comments, I'll commit tomorrow. 

> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.9.0.0
>
>         Attachments: DERBY_5200_2.diff, auto_download_junit.diff, auto_download_junit.diff, auto_download_junit.diff, update_instructions.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031591#comment-13031591 ] 

Knut Anders Hatlen commented on DERBY-5200:
-------------------------------------------

Downloading junit.jar automatically when needed sounds like a useful improvement. If I understand the patch correctly, it will install junit.jar when running the junit-all target, which is the target that runs the tests. But before running the tests, one would have to build the tests, which also requires junit.jar. So it is very likely that junit.jar is already there when junit-all is invoked, otherwise the test couldn't have been built. Should perhaps the testing target (the target that builds the tests) also depend on install_junit?

> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.8.1.3
>
>         Attachments: auto_download_junit.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034496#comment-13034496 ] 

Dave Brosius commented on DERBY-5200:
-------------------------------------


that seems reasonable.


> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.9.0.0
>
>         Attachments: auto_download_junit.diff, auto_download_junit.diff, auto_download_junit.diff, update_instructions.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Brosius updated DERBY-5200:
--------------------------------

    Attachment: auto_download_junit.diff

version 2

> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.8.1.3
>
>         Attachments: auto_download_junit.diff, auto_download_junit.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032361#comment-13032361 ] 

Knut Anders Hatlen commented on DERBY-5200:
-------------------------------------------

Perhaps init is a bit too early? That target is also invoked if you build the product only, not just when you build the tests. If you have for example a packaging script that runs something like "ant buildsource buildjars", this doesn't currently require junit.jar, but now it will start trying to download junit.jar automatically, and will fail if it's running in an environment without connectivity. I think it would be good to limit the downloading to the case where junit.jar is needed and doesn't already exist.

> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.8.1.3
>
>         Attachments: auto_download_junit.diff, auto_download_junit.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5200:
--------------------------------------

    Attachment: update_instructions.diff

The attached patch updates the build instructions with a note about JUnit now being downloaded automatically if it's missing. Committed revision 1102645.

> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.9.0.0
>
>         Attachments: auto_download_junit.diff, auto_download_junit.diff, auto_download_junit.diff, update_instructions.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031943#comment-13031943 ] 

Dave Brosius commented on DERBY-5200:
-------------------------------------

Good point, pretty silly by me, added new patch that does this work in 'init'

> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.8.1.3
>
>         Attachments: auto_download_junit.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034497#comment-13034497 ] 

Dave Brosius commented on DERBY-5200:
-------------------------------------

>>  Or is it ok to change this so it will only download junit.jar if the junit property is not set? 

that seems reasonable

> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.9.0.0
>
>         Attachments: auto_download_junit.diff, auto_download_junit.diff, auto_download_junit.diff, update_instructions.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Brosius updated DERBY-5200:
--------------------------------

    Attachment: auto_download_junit.diff

> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.8.1.3
>
>         Attachments: auto_download_junit.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032126#comment-13032126 ] 

Dag H. Wanvik commented on DERBY-5200:
--------------------------------------

I cloned a fresh sandbox and tested this patch, and it did the right thing. +1 from me. 

Aside: I did need to set up proxy for my ant first, though (I was behind a firewall in this case). My Gnome desktop is configured correctly to handle proxies, so setting and exporting ANT_ARGS="-autoproxy" in my shell worked for me. Cf. http://ant.apache.org/manual/proxy.html


> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.8.1.3
>
>         Attachments: auto_download_junit.diff, auto_download_junit.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen resolved DERBY-5200.
---------------------------------------

          Resolution: Fixed
       Fix Version/s:     (was: 10.8.1.3)
                      10.9.0.0
            Assignee: Dave Brosius
    Issue & fix info:   (was: [Patch Available])

Thanks, Dave!

As a future improvement we may consider limiting the downloading to when we're building the tests, so that those who only care about building the product don't need to download it at all. But this looks like an improvement that's worth checking in as it is. Committed revision 1102636.

> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.9.0.0
>
>         Attachments: auto_download_junit.diff, auto_download_junit.diff, auto_download_junit.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034473#comment-13034473 ] 

Myrna van Lunteren commented on DERBY-5200:
-------------------------------------------

I have a question regarding this fix.
I thought an alternative to having junit.jar in java/tools/junit.jar was if you have a property for junit in a properties file.
So I have a line like this in my local.properties:
    junit=/local1/junit/junit.jar
This way I keep out one more non-checked in file and I need only one junit.jar for a number of checked-out branches.

Since the fix for this bug went in, the build downloads junit.jar, which I think is pointless in my set-up.

Did I do something wrong in making use of this property? Or is it ok to change this so it will only download junit.jar if the junit property is not set?




> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.9.0.0
>
>         Attachments: auto_download_junit.diff, auto_download_junit.diff, auto_download_junit.diff, update_instructions.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5200) [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.

Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Brosius updated DERBY-5200:
--------------------------------

    Attachment:     (was: auto_download_junit.diff)

> [patch] embellish build.xml to automatically install junit.jar in the correct directory if it doesn't exist.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5200
>                 URL: https://issues.apache.org/jira/browse/DERBY-5200
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.7.1.1
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 10.8.1.3
>
>         Attachments: auto_download_junit.diff
>
>
> if tools/java/junit.jar doesn't exist, automatically install it from the central maven repository (location overrideable in local.properties) when running junit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira