Problem creating RichFaces page theme - jsf

I'm trying to create a RichFaces page theme using the instructions here. I know NOTHING about Maven, so I've followed the instructions as best I can, but I've run into an error and don't know what I'm doing wrong. I followed the instructions on the page, and then run this command:
mvn archetype:create -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-theme -DarchetypeVersion=3.3.3.Final -DartifactId=test -DgroupId=org.richfaces.docs -Dversion=1.0mvn archetype:create -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-theme -DarchetypeVersion=3.3.3
However, when I run the command I get the following error message:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0:create (default-cli) on project standalone-pom: Error creating from archetype: org.apache.maven.archetype.downloader.DownloadException: Error downloading org.richfaces.cdk:maven-archetype-theme:jar:3.3.3. Could not transfer artifact org.richfaces.cdk:maven-archetype-theme:jar:3.3.3 from/to repository.jboss.com (http://repository.jboss.com/maven2/): Access denied to: http://repository.jboss.com/maven2/org/richfaces/cdk/maven-archetype-theme/3.3.3/maven-archetype-theme-3.3.3.jar
[ERROR] org.richfaces.cdk:maven-archetype-theme:jar:3.3.3
I tried browsing to http://repository.jboss.com/maven2/, but I get an "Access Denied" error, just as stated in the error message. My question is, how do I rectify this? Is there a different URL that I should be using? If so, do I edit the Maven settings.xml file and use the new URL? I'd REALLY appreciate anyone that can give me some direction on this.

The link of the Jboss Repository for Maven specified in the jboss_profile.txt seems to be outdated.
You can try to replace all <url> of all Jboss Repository for Maven with https://repository.jboss.org/nexus/content/groups/public-jboss/ in your Maven settings.xml

Related

runing an Azure DevOps pipeline for a Talend ESB project maven error

I'm trying to run an Azure DevOps pipeline for talend ESB project but I got this error message:
[ERROR] Failed to execute goal on project routines: Could not resolve dependencies for project org.example.local_project.code:routines:jar:7.3.1: Could not find artifact org.talend.libraries:crypto-utils:jar:5.2.0 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :routines
Any help please.
According to the error message log, this error generally occurs when Maven could not download dependencies. Possible causes for this error are:
The POM misses the declaration of the which hosts the
artifact.
The repository you have configured requires authentication and Maven
failed to provide the correct credentials to the server. In this
case, make sure your ${user.home}/.m2/settings.xml contains a
declaration whose matches the of the remote
repository to use. See the Maven Settings Reference for more
details.
The remote repository in question uses SSL and the JVM running Maven
does not trust the certificate of the server.
There is a general network problem that prevents Maven from
accessing any remote repository, e.g. a missing proxy configuration.
You have configured Maven to perform strict checksum validation and
the files to download got corrupted.
Maven failed to save the files to your local repository, see
LocalRepositoryNotAccessibleException for more details.
You can refer to this document to troubleshoot.

Binary Authorization - Deployment failed - Denied by Attestor. Attestor cannot attest to an image in GKE

I was trying to showcase binary authorization to my client as POC. During the deployment, it is failing with the following error message:
pods "hello-app-6589454ddd-wlkbg" is forbidden: image policy webhook backend denied one or more images: Denied by cluster admission rule for us-central1.staging-cluster. Denied by Attestor. Image gcr.io//hello-app:e1479a4 denied by projects//attestors/vulnz-attestor: Attestor cannot attest to an image deployed by tag
I have adhered all steps mentioned in the site.
I have verified the image repeatedly for few occurances, for example using below command to force fully make the attestation:
gcloud alpha container binauthz attestations sign-and-create --project "projectxyz" --artifact-url "gcr.io/projectxyz/hello-app#sha256:82f1887cf5e1ff80ee67f4a820703130b7d533f43fe4b7a2b6b32ec430ddd699" --attestor "vulnz-attestor" --attestor-project "projectxyz" --keyversion "1" --keyversion-key "vulnz-signer" --keyversion-location "us-central1" --keyversion-keyring "binauthz" --keyversion-project "projectxyz"
It throws error as:
ERROR: (gcloud.alpha.container.binauthz.attestations.sign-and-create) Resource in project [project xyz] is the subject of a conflict: occurrence ID "c5f03cc3-3829-44cc-ae38-2b2b3967ba61" already exists in project "projectxyz"
So when I verify, I found the attestion present:
gcloud beta container binauthz attestations list --artifact-url "gcr.io/projectxyz/hello-app#sha256:82f1887cf5e1ff80ee67f4a820703130b7d533f43fe4b7a2b6b32ec430ddd699" --attestor "vulnz-attestor" --attestor-project "projectxyz" --format json | jq '.[0].kind' \
> | grep 'ATTESTATION'
"ATTESTATION"
Here are the screen shots:
Any feedback please?
Thanks in advance.
Thank you for trying Binary Authorization. I just updated the Binary Authorization Solution, which you might find helpful.
A few things I noticed along the way:
... denied by projects//attestors/vulnz-attestor:
There should be a project ID in between projects and attestors, like:
projects/my-project/attestors/vulnz-attestor
Similarly, your gcr.io links should include that same project ID, for example:
gcr.io//hello-app:e1479a4
should be
gcr.io/my-project/hello-app:e1479a4
If you followed a tutorial, it likely asked you to set a variable like $PROJECT_ID, but you may have accidentally unset it or ran the command in a different terminal session.
After pointed to another repository problem solved, but before that you were having problems and there could be many reasons. please contact support with error message if you are having the same problem.

Upload from GitLab to Artifactory during pipeline fails occasionally

Occasionally the first upload of artifacts during a GitLab pipeline fail.
I'm getting the following error message in the logs:
2019-08-01 13:43:14,149 [http-nio-8082-exec-187] [ERROR]
(o.j.s.b.p.t.FilePersistenceHelper:87) - Failed moving
'path_to_artifactory\filestore_pre\dbRecord123.bin' to
'path_to_artifactory\filestore\5e\5ecc5f719b4442b9b04f9010646d34917aca8ca2'.
Access to file denied null 2019-08-01 13:43:14,149
[http-nio-8082-exec-187] [ERROR] (o.a.w.s.RepoFilter :251) - Upload
request of products-stage-qa:file_to_upload failed due to {}
java.nio.file.AccessDeniedException: Failed to persist file with sha1:
5ecc5f719b4442b9b04f9010646d34917aca8ca2
This seems to happen only during builds, but not during other uploads directly by a user.
It doesn't happen all the time, and only on first tries. But I haven't found any logic when the first try fails or succeeds. It doesn't seem to have anything to do with file types or the like. I can't really determine if it has anything to do with network speeds though since I only have access to part of the infrastructure.
I found an open ticket with the same error message, but only for Conan and for us it only happens with ivy repositories
We are using Artifactory 6.9.1 and GitLab 12.0.3 starter
This looks to be a permission issue. You are getting an error message that states that the move failed due to "Access to file denied".
You can try to log in to the server using the "artifactory" user and manually move the file called "path_to_artifactory\filestore_pre\dbRecord123.bin" to "path_to_artifactory\filestore\5e\5ecc5f719b4442b9b04f9010646d34917aca8ca2" and see if you have any issues with this. To log in to the server with the "artifactory" user you can use the command "sudo -s -u artifactory".
You will also need to make sure that all filestore and its subdirectories are owned by the "artifactory" user and have the correct permissions.
Hope this helps.

GitLab API - Unable to access file which is within a directory

I have a GitLab project which is set up as follows:
myserver.com/SuperGroup/SubGroup/SubGroupProject
The tree of the following project is a top-level txt file and a txt file within a directory. I get the tree from the GitLab API with:
myserver.com/api/v4/projects/1/repository/tree?recursive=true
[{"id":"aba61143388f605d3fe9de9033ecb4575e4d9b69","name":"myDirectory","type":"tree","path":"myDirectory","mode":"040000"},{"id":"0e3a2b246ab92abac101d0eb2e96b57e2d24915d","name":"1stLevelFile.txt","type":"blob","path":"myDirectory/1stLevelFile.txt","mode":"100644"},{"id":"3501682ba833c3e50addab55e42488e98200b323","name":"top_level.txt","type":"blob","path":"top_level.txt","mode":"100644"}]
If I request the contents for top_level.txt they are returned without any issue via:
myserver.com/api/v4/projects/1/repository/files/top_level.txt?ref=master
However I am unable to access myDirectory/1stLevelFile.txt with any API call I try. E.g.:
myserver.com/api/v4/projects/1/repository/files/"myDirectory%2F1stLevelFile.txt"?ref=master
and,
myserver.com/api/v4/projects/1/repository/files/"myDirectory%2F1stLevelFile%2Etxt"?ref=master
Results in:
Not Found The requested URL /api/v4/projects/1/repository/files/myDirectory/1stLevelFile.txt was not found on this server.
Apache/2.4.25 (Debian) Server at myserver.com Port 443
myserver.com/api/v4/projects/1/repository/files/"myDirectory/1stLevelFile.txt"?ref=master and,
myserver.com/api/v4/projects/1/repository/files?ref=master&path=myDirectory%2F1stLevelFile.txt
Results in:
error "404 Not Found"
The versions of the components are:
GitLab 10.6.3-ee
GitLab Shell 6.0.4
GitLab Workhorse v4.0.0
GitLab API v4
Ruby 2.3.6p384
Rails 4.2.10
postgresql 9.6.8
According to my research there was a similar bug which was fixed with the 10.0.0 update.
I also added my ssh-key although I doubt it has any effect, following this advice with the same issue in php.
Solution:
I eventually solved it by adjusting the apache installed on the server.
Just follow these instructions: https://gitlab.com/gitlab-org/gitlab-ce/issues/35079#note_76374269
According to your code, I will go thinking you use curl.
If it is the case, why are you adding double quotes to your file path ?
The doc do not contains it.
Can you test it like that please ?
curl --request GET --header 'PRIVATE-TOKEN: XXXXXXXXX' myserver.com/api/v4/projects/1/repository/files/myDirectory%2F1stLevelFile%2Etxt?ref=master

'~/play-services-location/10.2.6/play-services-location-10.2.6.pom'

Face the following error during sync with android studio.
Error:Could not GET 'http://192.168.2.247:8081/artifactory/list/libs-snapshot-local/com/google/android/gms/play-services-location/10.2.6/play-services-location-10.2.6.pom'. Received status code 409 from server: Conflict
Enable Gradle 'offline mode' and sync project
But I never use play location anywhere.
Didn't found any solution. Please help.
The 409 error you are getting from Artifactory is a result of trying to resolve a release artifact from a snapshots repository (libs-snapshot-local). Looking at the URL in the error log you provided, it seems that you are working with the local libs-snapshot-local repository.
You can solve the issue by using a virtual repository, such as libs-snapshot, which aggregates your local snapshot repositories and remote repositories such as JCenter and Maven Central (for serving the request for play-services-location).

Resources