I'm trying to use the Artifactory Rest API to retrieve the latest published version of a file. The file in question is a simple zip of a bunch of YAML files used for configuration. I can upload and download these files in TeamCity using File Specs, however I can't find any reference of this functionality in the Rest API docs (or indeed, any way to do almost anything that isn't an action on a maven repository)
As you are already using the file specs, you can make use of the same file spec and use the Artifactory query language (AQL) to get the list of files. You can refer to example 2 here in this list.
You can define and use a custom Repository Layout. This way, in order to download the latest version of the file, you can use the [RELEASE] placeholder. The actual latest version will be automatically resolved by the extracted version value based on the layout.
See also:
How to create simple versioning custom layout in Artifactory
How to find the latest artifact version based on layout?
Related
I am first time using OSASP Dependency check using Azure devops. Here this check is not scanning my apex class files and xml metadata files. So I wanna confirm is it scan those or not and what type of file it scan for salesforce projects?
I tried to search from owsap officially site but from where it is not cleared.
From what I understand are APEX files Zipped Library which can contain Jar Files, I think it makes more sense to scan the pipeline which actually contains the code of the Apex Files.
I have created nuget package (.nupkg) and hosted that package directly on one of http servers
http://someserver/location/sub-location/nuget/MyPackage.1.0.0.nupkg
So if i just copy paste this URL in browser, packages gets downloaded immediately.
But, I want to download this package as part of nuget restore command.
I have used section in nuget.config file to download package from Folders, nuget.org, artifactory etc. But this particular case not working.
I don't want to run additional command to download package (for example, i don't want to use Curl )
I want some configuration done so that i can download this package in same way as other packages from other nuget repositories .
I don't want to run nuget server for hosting.
Thanks,
Atul
Sleet is a static NuGet feed generator. Using it, you can generate files and use any web server to serve static files.
However, since this includes a static response to search queries, if anyone uses this feed with Visual Studio's Package Manager UI, it doesn't matter what search terms they type, they'll always get the same search results. When VS searches a package source, it requests a maximum of 25 results, but since Sleet is static, it returns the entire list of every package in the feed. Before Visual Studio 2019 16.7, NuGet would show all the search results and if the Sleet feed contained enough packages, it would crash VS with an out of memory exception. VS was changed to only take the first 25 results and ignore the rest, so it will no longer crash. But this means that it's impossible now in PM UI to see more than the first 25 packages. If search results are not important to you, the Sleet sounds like a good fit.
I have found a dll that is provided via Google Code and I couldn't find it in NuGet. I want this package to be available via a NuGet install, because I want to reuse it in several packages and NuGet seems like the perfect way to do this.
https://code.google.com/p/protobuf-remote/downloads/list
Is it possible for me to generate a nupkg out of these dll's and publish it to NuGet.org? What are the legal limitations to this action?
There are a number of other users that have run into this issue. It seems like the common solution is to create an "Unofficial" package and reference that for the time being (until Google publishes their library as a NuGet). Just make sure to very clearly label the package as unofficial. See these examples.
As for the legal ramifications...
Please look through protobuf-remote license and review the distribution and derived works details. Currently the license is GNU Lesser GPL. Sorry, but you'll have to make your own call on if publishing the NuGet package would be permitted under this license. ;)
I would recommend you instead create a local NuGet package source by pointing to a file share. This can be local on your computer or on a network file share.
Also, if you don't want to update every workstation, you can update the NuGet.config file in your project to point to this source and commit that config file in your source control repository for all users to get automatically. Just note that any change to a NuGet.config file requires you to restart Visual Studio.
And FYI, take a look at how you can chain multiple NuGet.config files.
I'm using ember-cli and I made a custom component using ember-cli syntax & naming conventions. This is a highly reusable component and I'd like to know what is the better way to put it all into a "package" so it's easy to integrate into other projects.
My component use a .js file for the Ember.Component subclass along with a .hbs file for the template and yet another couple of .js files for the necessary Ember.View subclasses. Right now, every file is in its respective folder along with the files for the rest of my project.
How can I isolate the files related to the component and package them for reuse? In Ruby on Rails I use gems for this matter, and in jQuery I used to write plugins by extending $.fn in a single file.
Take advantage of Ember CLI addon system. It's been designed for cases like this one. The process should be easy if you are familiar with Ember CLI already. As Ember CLI addon system's been reworked in the recent past and it's API was changing it's possible that older articles or guides on this topic became out of sync.
The most comprehensive and kept in sync guide on this topic is kristianmandrup's gist Converting libraries to Ember CLI addons.
There is also an Addons tutorials section on the official Ember CLI site.
I'm interested in creating a NuGet package for a documentation tool I'm writing. Ideally, I'd like the user to not have to configure my tool in anyway. In order to do this, I need to be able to read some settings from the Project's .csproj or .vbproj file to get the path of the Xml documentation file generated by the compiler. I also need to add a post-build step to the project.
I've looked through their documentation but I haven't seen any mention of being able to do this. Is this possible? If so, is there any documentation or examples of this available?
Using PowerShell script, you can access the rich VS DTE object model. This allows your package to do all kind of things that NuGet doesn't have specific features for. Look at this help topic for some info on using init.ps1 or install.ps1.