[
https://issues.apache.org/jira/browse/PIG-4417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14995147#comment-14995147
]
Ratandeep Ratti commented on PIG-4417:
--------------------------------------
The current approach for finding the ivysettings.xml from the classpath will
not work as expected if the ivysettings.xml file resides inside a jar.
{code}
if (confFile == null || !confFile.exists()) {
ClassLoader classLoader =
Thread.currentThread().getContextClassLoader();
if (classLoader.getResource(IVY_FILE_NAME) != null) {
confFile = new
File(classLoader.getResource(IVY_FILE_NAME).getFile());
}
}
{code}
Here if the IVY_FILE_NAME resolves to a resource inside a jar
{code}confFile.exists(){code} will always return false . File API does not
understand files bundled inside a jar.
> Pig's register command should support automatic fetching of jars from repo.
> ---------------------------------------------------------------------------
>
> Key: PIG-4417
> URL: https://issues.apache.org/jira/browse/PIG-4417
> Project: Pig
> Issue Type: Improvement
> Reporter: Akshay Rai
> Assignee: Akshay Rai
> Attachments: PIG-4417.1.patch, PIG-4417.2.patch, PIG-4417.3.patch,
> PIG-4417.4.patch
>
>
> Currently Pig's register command takes a local path to a dependency jar .
> This clutters the local file-system as users may forget to remove this jar
> later.
> It would be nice if Pig supported a Gradle like notation to download the jar
> from a repository.
> Ex: At the top of the Pig script a user could add
> register '<group>:<module>:<version>';
> It should be backward compatible and should support a local file path if so
> desired.
> RB: https://reviews.apache.org/r/31662/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)