Hello,

On Wed, Jun 12, 2019 at 8:16 AM Juhan Aasaru <aas...@gmail.com> wrote:

> Hi Courage,
>
> I checked, the artifact is there in the repository. But trying to get
> latest artifact just by generic url like:
>
> http://mifos.jfrog.io/mifos/libs-snapshot/org/apache/fineract/cn/lang/0.1.0-BUILD-SNAPSHOT/lang-0.1.0-BUILD-SNAPSHOT.jar
> can be unrelyiable as some old version could have been cached on the way.
>

may I respectfully disagree with this? I would argue the opposite, and
suggest that it's better to use the "generic" URLs (those with the
-SNAPSHOT, without that timestamp).

For me an e.g. "wget
http://mifos.jfrog.io/mifos/libs-snapshot/org/apache/fineract/cn/lang/0.1.0-BUILD-SNAPSHOT/lang-0.1.0-BUILD-SNAPSHOT.jar";
seems to work just fine, so what's actually the issue?


> The best way would be to determine the unique filename of the latest
> version and then use that instead.
> You can find the unique filename of the latest artifact like this:
>
> https://mifos.jfrog.io/mifos/api/search/latestVersion?g=org.apache.fineract.cn&a=lang&v=0.1.0-BUILD-SNAPSHOT&repos=libs-snapshot-local
> currently returns "0.1.0-BUILD-20190607.052703-26"
> and then pull it like this (added "lang-" and ".jar" to the url):
>
> https://mifos.jfrog.io/mifos/libs-snapshot/org/apache/fineract/cn/lang/0.1.0-BUILD-SNAPSHOT/lang-0.1.0-BUILD-20190607.052703-26.jar
>

For a one time manual use it's OK to use a URL like this. You wrote "I am
just want to manually download the artefact and run the jar file" so it's
probably all good.

More for general background: If one were to hard code this into say some
script, you risk that it breaks soon. The reason is that Maven repository
manager software such as JFrog or Sonatype Nexus (same functionality) will
keep only a handful (configurable) number of timestamps for any given
SNAPSHOT version. So as new 0.1.0-BUILD-SNAPSHOT versions are deployed in
the future, the 20190607.052703-26 could well very get automatically
cleaned up and disappear again.

I updated the documentation with troubleshooting section where I described
> the steps in more detail:
>
> https://cwiki.apache.org/confluence/display/FINERACT/Fineract-CN+Artifactory#Fineract-CNArtifactory-Troubleshooting
>
> I hope that helps.
>

Very nice write up, thank you!!


> Kind regards
> Juhan
>
>
> Kontakt Courage Angeh (<couragean...@gmail.com>) kirjutas kuupƤeval T,
> 11. juuni 2019 kell 22:24:
>
>> Hi Cajetan,
>>
>> Thanks for the suggestion. But I am not running any fineract-cn service
>> so my question is not related to the .m2 directory.
>>
>> I am just want to manually download the artefact and run the jar file so
>> that I can generate some RSA keys for a deployment environment.
>>
>> Regards,
>> Courage.
>>
>>
>> On Tue, Jun 11, 2019 at 3:02 PM Cajetan Rodrigues <rigrod1...@gmail.com>
>> wrote:
>>
>>> Also note that the .me repo is found in the users/<username> in C drive
>>> folder.
>>>
>>> M2 folder contains all your dependencies.
>>>
>>>
>>>
>>> On Wed, Jun 12, 2019, 12:26 AM Cajetan Rodrigues <rigrod1...@gmail.com>
>>> wrote:
>>>
>>>> I have fallen into such issues before.
>>>> So if you are on windows, a folder known as *.m2* is auto-created.
>>>> Just delete that and restart STS (or other S/W).
>>>> It will take a long time, downloading the repositories, but it should
>>>> then work fine.
>>>>
>>>> Regards,
>>>> Cajetan Rodrigues.
>>>>
>>>> On Wed, 12 Jun 2019 at 00:16, Courage Angeh <couragean...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Juhan,
>>>>>
>>>>> Hope this email finds you well.
>>>>>
>>>>> I merged the recent changes you made to fineract-cn-lang but when I
>>>>> visit the online artefact, I see that the artefact was modified was
>>>>> 09-Apr-2019.
>>>>>
>>>>> Based on this documentation:
>>>>> https://cwiki.apache.org/confluence/display/FINERACT/Fineract-CN+Artifactory
>>>>> I presume that when a PR is merged, I should be able to get the
>>>>> updates via 0.1.0-BUILD-SNAPSHOT
>>>>> <https://mifos.jfrog.io/mifos/libs-snapshot/org/apache/fineract/cn/lang/0.1.0-BUILD-SNAPSHOT/>.
>>>>> However, when I visit the artifactory, it shows that the artefact was last
>>>>> updated on the 9th of April 2019.
>>>>>
>>>>
I can see a version which was deployed on 07-Jun-2019 05:27.


> Please, can you help me out?
>>>>>
>>>>> Regards,
>>>>> Courage.
>>>>>
>>>>

Reply via email to