JFrog Artifactory AQL - artifactory

I am currently trying to query Artifactory for specific artifacts related to a core project. All artifacts will be prefixed with a project tag. Example: "proj1-core". I use Artifactory aql to query artifacts using name attribute.
Now I also have a need to query specific type of artifacts - maven, pypi, npm, docker. I am aware of type attribute of artifact domain, but it is not which defines these types. I have seen types have specific properties. Example - npm.*, pypi.*, docker.*.
But for maven it has artifact.* and not for others. I am trying to find a common property which gives the type of the artifact.
Please let me know of any pointers.

The Artifactory query language does not have a field which includes the package type.
You can assume the package type from the repository, which will cover most cases (not including Generic repositories or generic artifacts which are deployed to typed repositories).

Related

Artifactory: how to add properties to a build run?

For a build run in artifactory, exists a tab named "Environment" which contains a section named "System Variables".
Link to image: Environment tab with variables
I need to add some properties there via REST API or artifactoy groovy public api (PAPI).
I managed to create build info with properties (via REST API), but now I need to update it with the properties. Is this possible?
The Environment tab is created according to the build-info JSON deployed to Artifactory using the /api/build REST API. The build-info structure is available at the build-info github project's README file here:
https://github.com/JFrogDev/build-info
When building the JSON you can add properties to it, by adding them to the "properties" section as described in the the above README. This is probably how you added the properties to the build run.
The build-info for a specific build run however is immutable in Artifactory and cannot be modified after it is deployed.

Change repository name in Alfresco

Does anyone know how to set/change a repository name in alfresco?
id=-default-, name=, description=, capabilities=Repository Capabilities
The Alfresco CMIS calls started returning an empty string for name sometime around 5.0, I believe. According to the spec, the name is not a required piece of information. The server is required to return a unique ID for each repository in the system, but that's it.
I do not believe you can change the name without touching Alfresco CMIS implementation Java classes.
Besides, Alfresco only supports a single repository so a name isn't going to add a lot of value.

CMIS with multiple repositories?

I am working on a Java solution which integrates with CMIS repositories. Having chosen OpenCMIS as my open source library, am trying to ensure all test scenarios are covered. I have explored few of the repositories (Alfresco, Chemistry InMemory, Chemistry Fileshare, OpenKM) and none of them seem to provide multiple repositories which I feel is required to be covered as a part of my testing.
Being more specific with the code, below works well with almost all repositories.
Repository soleRepository = sessionFactory.getRepositories(parameter).get(0);
But I want to know if any repository supports (or can be configured to support) this code:
sessionFactory.getRepositories(parameter).get(1)
There are many CMIS servers supporting more than one repository. SharePoint, FileNet, SAP Mobile Documents, ...
Even the OpenCMIS FileShare server supports more than one repository if you configure it. Just add the following lines to your repository.properties file and it will expose second repository:
repository.second = {user.home}
repository.second.readwrite = test, cmisuser
repository.second.readonly = reader

SBT custom conflict manager

I would like to get a better idea of conflicting dependencies between artifacts in my organization. For this, I have created a meta-project that includes all the other top-level projects. To identify conflicts of various transitive dependencies, my idea was to use a conflict manager.
I know I can set a conflict manager like this
conflictManager := ConflictManager.strict
How would I set the strict manager only for com.example packages, and possibly compose it with other more specific managers?
Is it possible to create completely custom dependency managers, which would only warn about conflicts?
I am also thankful for other ideas on solving this problem.
You can do it with
conflictManager := ConflictManager.strict.copy(organization = "com.example.*")
You can vary (Ivy) type of conflict manager, organization and module filters. See this sbt source with it's definition. Also see Ivy docs on types of conflict managers
It seems that you can define a custom Ivy conflict manager setting it's name with ConflictManager("...") (see the Ivy docs on what you can to write there). Although I don't see any way to combine several conflict managers: sbt provides only one setting key conflictManager and sets the ivy manager directly from it.

Access uniquely-named Maven snapshot using ivysettings.xml in sbt?

I use an ivysettings.xml file to configure the repositories to use for sbt, which uses Ivy.
However, it's not able to download a particular snapshot which uses unique naming (i.e. date-based naming). It only tries the patterns listed explicitly in my ivysettings.xml file (which makes sense), so it can't see the details in maven-metadata.xml which tell it the filename of the snapshot jar to download.
I tried specifying the version explicitly instead of as a snapshot in Build.scala:
"com.jolbox" % "bonecp" % "0.8.1-20131105.191813-1"
(which would be my ideal solution, because then it would be cached in our maven repository and I'd be guaranteed to always use the same snapshot), but this generated the wrong URL (there should be an 0.8.1-SNAPSHOT in there, but of course there isn't):
http://maven/nexus/content/groups/softwaretools-snapshot-group/com/jolbox/bonecp/0.8.1-20131105.191813-1/bonecp-0.8.1-20131105.191813-1.pom
I then tried specifying the URL explicitly using from, but this didn't work.
I then tried using latest.integration as the version, but that didn't correctly identify the latest version - it thought it was 0.8.0-rc1, which is clearly wrong.
Download the dependency manually and add it to the lib directory of the project (create it if necessary); remove it from the Build.scala file.

Resources