Arifactory pypi: get latest version of an egg file - artifactory

We have an artifactory pypi repository on which I push a (versioned) egg file, that I can retrieve with a link of this type
https://artifactoryrepo.com/pipy/myartifact-0.3.egg
however I would like to be able to get the latest available version (with a maven jar I woud do com.mygroup:myartifact:latest). Is there a way to do something like that?

Related

How to override a JMetre plugin jar in a Blazemeter Run

I am trying to troubleshot an error I'm getting in Blazemeter for random-csv-data-set.
The btz.log from the Blazemeter Test run shows the below line...
2021-02-10 10:14:52,518 INFO o.j.r.JARSourceHTTP: Downloading: https://search.maven.org/remotecontent?filepath=com/blazemeter/jmeter-plugins-random-csv-data-set/0.7/jmeter-plugins-random-csv-data-set-0.7.jar
Which could be the point it downloads the jar (latest one?) for the required plugins for my test.
And during the test I am getting an exception from one of the classes in the plugin jar.
I have cloned the plugin project (opensource) and started adding some debug lines and compiled a new jar version.
I was advised If I upload the plugin jar along with my tests files to Blazemeter, the uploaded jar should be taken in for the run. But I still see the exception from the old line numbers which means its still referring to the original jar version 0.7.
How can I override this with my version of the plugin?
I believe you should ask this type of questions via BlazeMeter Support as I doubt that everyone here is fully aware of what's going on there
Whatever.
Looking into Taurus documentation it looks like that Random CSV Data Set Config is being detected and automatically downloaded using JMeter Plugins Manager so in order to prevent Taurus from downloading the "vanilla" version of the plugin which doesn't contain your changes you need to add the following line to your Taurus YAML file:
modules:
jmeter:
detect-plugins: false

Castor library JAR

I have a serious problem, I need the JAR version 1.3.3 or 1.4.1 of :
castor (mainly),
castor ddlgen,
castor codegen and
castor anttasks
I as looking for these but I just found version 1.2 and. lower.
It would be great if some of you can help me.
Thanks in advance.
Havent used that lib but the general workflow is
option 1
In docs for that lib https://github.com/castor-data-binding/castor
it says you can download jar files from Sonatype's OSS snapshot
so go to that link
https://oss.sonatype.org/content/groups/public/org/codehaus/castor/castor-core/
https://oss.sonatype.org/content/groups/public/org/codehaus/castor/castor-anttasks/
and browse around. Here you can find those versions
I guess you are not using maven. You have to use ant or something. In that case you can still to this
option 2
Go to maven repo
https://mvnrepository.com/artifact/org.codehaus.castor
Pick what lib you need for example
https://mvnrepository.com/artifact/org.codehaus.castor/castor-xml/1.4.1
and in table you can find links to jars to download
option 3
If you cant find on maven repo that lib. You can still clone that maven project, and run maven install and it will build jar files locally for you. After that just copy them

How to check what is the latest version of an artifact available in nexus repository?

I have a java desktop app and a launcher that check if a newer version is available, or it will do that. But I can't figure out how to check out if an update (a newer version of the artifact) is available through the nexus api.
Also, I can't download the latest version. I tried the below url but I'm getting a 404.
This works: http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=io.github.bonigarcia&a=webdrivermanager&v=LATEST
This not: http://127.0.0.1:8081/service/local/artifact/maven/redirect?r=maven-group&g=io.github.bonigarcia&a=webdrivermanager&v=LATEST
This artifact is just an example, it exists on my repository
http://127.0.0.1:8081/repository/maven-group/io/github/bonigarcia/webdrivermanager/1.7.0/webdrivermanager-1.7.0.pom
I don't understand what is going on. What I'm missing?
Note: Nexus version 3.4.0-02 (I have to update yet)

Installing Cordova plugin to meteor project using a github tarball link

I'm trying to install a package to my meteor project using a repository in github.
The only way Meteor allow me to install it is using a "tarball" specific link like this:
https://github.com/Wizcorp/phonegap-facebook-plugin/tarball/d8b0f6935a7c6e586188bf85f9da88a1c160790b
Although, the package version referenced in the link is not the one I need (I got that link from an old support post).
Could someone explain me how to obtain that type of link (tarball) from this repository and version (0.12.0)?
https://github.com/Wizcorp/phonegap-facebook-plugin/releases/tag/v0.12.0
So far I have tried:
Copy the tar.gz download link of the right version and running:
meteor add cordova:com.phonegap.plugins.facebookconnect#https://github.com/aogilvie/phonegap-facebook-plugin/archive/0.6.0.tar.gz
Result: "Meteor requires either an exact version, a Git URL with a SHA
reference"
Installing it using the version number:
meteor add cordova:com.phonegap.plugins.facebookconnect#0.12.0
Result: I got "Package installed" but when run ios-device I got the error:
"Failed to fetch plugin com.phonegap.plugins.facebookconnect#0.12.0 via registry".
Downloading the zip file, unzip and put folder in packages folder.
Result: Is not working because is not a package.js inside the folder.
Thanks in advance
You are actually trying to add a Cordova plugin (meteor add cordova:...), not a Meteor package.
Therefore, your trial 3 (local package / plugin) needs a similar meteor add cordova:your-plugin-name#file://packages/folder-to-local-cordova-plugin instead of a meteor add package-name (which will look for a package.js file).
Trial 2 (version number) works only for published plugins.
You should stick with your trial 1 but you have to specify the commit hash (git endpoint + # + commit hash) instead of the tarball link:
meteor add cordova:com.phonegap.plugins.facebookconnect#https://github.com/Wizcorp/phonegap-facebook-plugin.git#c0f8da97a1d65397ada73e958dafed3aeef2e491
See Meteor Guide > Build > Mobile > Native features with Cordova plugins > Installing plugins > Installing a plugin from Git

Is there a URL for the latest snapshot for an artifact in Artifactory?

I would like to make a permalink to the latest snapshot version of an artifact in Artifactory. If we are on 1.0-SNAPSHOT, I would like a URL that downloads the latest 1.0-SNAPSHOT JAR. I can find the latest artifact by locating the artifact on our server at http://hostname/artifactory/libs-snapshot/groupId/artifactId/1.0-SNAPSHOT/. Other than checking the timestamps, I can figure out which one if the latest by opening maven-metadata.xml and matching metadata/versioning/snapshot timestamp and buildNumber with a JAR in the same directory. This could be scripted, but ideally Artifactory already has a way to construct a permalink in this manner. Does Artifactory provide such a URL?
Doing the normal query for the entry with artifactId-1.0-SNAPSHOT.jar in the URL name should return automatically the latest snapshot.
See the doc here
One thing: This is base either on the latest creation date if no pom present, or latest creation of the pom if there are some. Mixing pom and non-pom deployment may results in strange results!
I tried using shell script and it worked for me.
Step1: Get an encrypted password for your user account by clicking on user name or create a common user. Go to using your secure password section in the following link
http://www.jfrog.com/confluence/display/RTF/Centrally+Secure+Passwords
Step 2: In your local machine create a temp folder and type this curl(may be wget for windows) command:
curl -o tmp/foo.jar --user <username>:<encrypted_password> <artifactory_url>/list/libs-snapshot-local/com/search/foo/1.0/foo-1.0-SNAPSHOT.JAR
Your foo.jar in tmp folder is latest version. If we dont give timestamp as like above, it will download latest artifact in that version. Hope this helps!
This might be helpful:
How to download the latest artifact from Artifactory repository?
Although there is no permalink ability in the free version of Artifactory, it can be scripted easily as you suggest. I have provided a quick script to do that in the referenced question.
Hope it helps.
Another portable option is to use the maven command line:
mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get -DartifactId=[artifactId] -DgroupId=[groupId] -Dversion=[version] -Ddest=[dest file]
This works for me (no search API, just direct artifact URL):
curl -O -J --user <username>:<encrypted_password> http://hostname/artifactory/libs-snapshot/groupId/artifactId/1.0-SNAPSHOT/artifactId-1.0-SNAPSHOT.jar
Basically using 1.0-SNAPSHOT in the artifact name downloads the latest version of 1.0-SNAPSHOT snapshot.

Resources