Deployment failed: repository element was not specified in the POM - java

I imported an Maven application for the Intellij Idea. After configure Spring and Hibernate, i tried to build it. But, Maven return an error to me, the error is:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.571 s
[INFO] Finished at: 2019-07-04T15:49:48-03:00
[INFO] Final Memory: 16M/211M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project GECi: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
[ERROR]
If you can help me, i'll appreciate that :D Thanks

Calling mvn deploy means you want to deploy to a Maven repository. You need to specify that repository in the <distributionManagement> element of the POM.

Related

Unable to download jersey-quickstart-webapp from maven

I am trying download a jersey-quickstart-webapp using maven. I am unable to figure out what is wrong with my command below.
mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes -DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersion=2.2
The errors I get are below: what am I doing wrong here?
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] >>> maven-archetype-plugin:3.0.0:generate (default-cli) > generate-sources # standalone-pom
[INFO] Generating project in Interactive mode
[WARNING] No archetype found in remote catalog. Defaulting to internal catalog
[WARNING] Archetype not found in any catalog. Falling back to central repository
(http://repo.maven.apache.org/maven2).
[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
Downloading: http://repo.maven.apache.org/maven2/org/glassfish/jersey/archetypes/jersey-quickstart-webapp/2.2/jersey-quickstart-webapp-2.2.pom
Downloading: https://repo.maven.apache.org/maven2/org/glassfish/jersey/archetypes/jersey-quickstart-webapp/2.2/jersey-quickstart-webapp-2.2.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.330 s
[INFO] Finished at: 2017-03-29T20:46:00+05:30
[INFO] Final Memory: 14M/139M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.0:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.glassfish.jersey.archetypes:jersey-quickstart-webapp:2.2) -> [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.
The version you have specified is wrong(NOT 2.2 its 2.25.1). Try to run this:
mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes -DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersion=2.25.1
The issue was not with the command but the settings.xml.
I had to add my local artifactory setton

Maven : Not able to download dependencies jta:1.0.1B

I'm receiving following error when I run mvn clean install.
Error says not able to resolve dependencies javax.transaction:jta:jar:1.0.1B
Please note that I'm not refering to javax.transaction:jta:jar:1.0.1B in my pom. May be this dependency is refered by some other dependency that I mentioned in my pom.
Please find the error below
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building sample-webapp Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.810 s
[INFO] Finished at: 2016-12-05T08:43:47+05:30
[INFO] Final Memory: 12M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project sample-webapp: Could not resolve dependencies for project com.ganesh:sample-webapp:war:1.0-SNAPSHOT: Could not find artifact ja
vax.transaction:jta:jar:1.0.1B in central (https://repo.maven.apache.org/maven2), try downloading from http://java.sun.com/products/jta -> [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
that's a legacy library that is not available from Maven Central.
It isn't available because there are still some old Sun-era Javax JARS that are not covered under open source licenses. If you need to access this JTA 1.0.1B library, you will need to replace that dependency using an exclusion.
note: and when I hit this url https://repo.maven.apache.org/maven2/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar in the browser, it return to 404 Not Found then I dont know why you can dowload it.
for more info Why can't I download the javax.transaction:jta:1.0.1B JAR?

The POM for org.picketlink.distribution:picketlink-jbas7:jar:2.8.0. is missing, no dependency information available

I'm trying to run the picketlink quickstarts from:
https://github.com/jboss-developer/jboss-picketlink-quickstarts
More specifically:
https://github.com/jboss-developer/jboss-picketlink-quickstarts/tree/master/picketlink-federation-saml-idp-basic
But in each attempt to install the maven dependencies I get the next error:
Could not find artifact org.picketlink.distribution:picketlink-jbas7:jar:2.8.0.Beta1-SNAPSHOT
Here is the whole log after my $ mvn clean package jboss-as:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PicketLink Quickstart: picketlink-federation-saml-idp-basic 2.8.0.Beta1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.picketlink.distribution:picketlink-jbas7:jar:2.8.0.Beta1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.650 s
[INFO] Finished at: 2015-10-17T01:39:15-05:00
[INFO] Final Memory: 6M/80M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project picketlink-federation-saml-idp-basic: Could not resolve dependencies for project org.picketlink.quickstarts:picketlink-federation-saml-idp-basic:war:2.8.0.Beta1-SNAPSHOT: Could not find artifact org.picketlink.distribution:picketlink-jbas7:jar:2.8.0.Beta1-SNAPSHOT -> [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
I've seen that you might need to add a settings.xml to your maven folder, but I don't know how to make or what to put in that file.
As you already said, maven is telling you that org.picketlink.distribution:picketlink-jbas7:jar:2.8.0.Beta1-SNAPSHOT dependency is missing and I believe this is because you didn't install it previously.
As I can see jboss-picketlink-quickstarts is a bunch of projects which have a parent pom.xml where you can find your project as a module:
<module>picketlink-federation-saml-idp-basic</module>
So, you have to clone the whole jboss-picketlink-quickstarts project and run mvn install from the parent project.
This will lead you with all dependencies that you will need resolved into your local maven repository (usually ~/.m2/repository).
Try it, it will solve your dependency. Some times you have to call maven with -U to force -SNAPSHOT dependencies.
Hope it helps!

creating new project in java with maven

I wanna create a java project with maven, when I type this command in cmd instead of creating a project it gives some error, I guess it is because of some internet problems but I don't know how to solve it. I don't use any proxy and I've tried this command even when my pc's firewall was turned off.
the command I write in cmd is:
mvn archetype:generate -DgroupId=com.companyname.bank -DartifactId=consumerBanking -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
the rezult is:
[INFO] Scanning for projects...
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.4: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4
.
.
.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.167 s
[INFO] Finished at: 2012-05-18T21:09:38-07:00
[INFO] Final Memory: 3M/254M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\a\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
You're posting this in 2014, but the log says:
[INFO] Finished at: 2012-05-18T21:09:38-07:00
If your local clock is wrong, SSL won't work because the certificate will appear to be invalid, and your connection to https://repo.maven.apache.org/ will fail.
Fix your clock.

Magnolia project archetype can not resolve vaadin dependencies

I'm trying to create a Magnolia project archetype:
I'm running
mvn archetype:generate -DarchetypeCatalog=http://nexus.magnolia-cms.com/content/groups/public/
I choose
5: http://nexus.magnolia-cms.com/content/groups/public/ -> info.magnolia.maven.archetypes:magnolia-project-archetype (An archetype to create a Magnolia project (a parent pom and a webapp))
archetype version I choose 1.1.0
Define value for property 'magnolia-version': 5.0.4
When I run the maven build, the webapp build fails because it cant find some vaadin libraries
[WARNING] The POM for org.vaadin.addons:icepush:jar:0.5.3 is missing, no dependency information available
[WARNING] The POM for org.vaadin.addons:cssinject:jar:2.0.3 is missing, no dependency information available
[WARNING] The POM for org.vaadin.addons:gwt-graphics:jar:1.0.0 is missing, no dependency information available
[WARNING] The POM for org.vaadin.addons:ckeditor-wrapper-for-vaadin:jar:7.8.3 is missing, no dependency information available
[WARNING] The POM for org.vaadin.addon:easyuploads:jar:7.0.0 is missing, no dependency information available
[WARNING] The POM for org.vaadin.addons:refresher:jar:1.2.1.7 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] myapp (parent pom) ............................. SUCCESS [0.394s]
[INFO] myapp: webapp .................................. FAILURE [1.305s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.962s
[INFO] Finished at: Wed Sep 18 13:53:45 CEST 2013
[INFO] Final Memory: 7M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project myapp-webapp: Could not resolve dependencies for project myapp-webapp:war:1.0-SNAPSHOT: The following artifacts could not be resolved: org.vaadin.addon:easyuploads:jar:7.0.0, org.vaadin.addons:refresher:jar:1.2.1.7, org.vaadin.addons:cssinject:jar:2.0.3, org.vaadin.addons:icepush:jar:0.5.3, org.vaadin.addons:gwt-graphics:jar:1.0.0, org.vaadin.addons:ckeditor-wrapper-for-vaadin:jar:7.8.3: Failure to find org.vaadin.addon:easyuploads:jar:7.0.0 in http://nexus.magnolia-cms.com/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of magnolia.public has elapsed or updates are forced -> [Help 1]
[ERROR]
Do I need to add some maven repository ?
Solved it by adding following repository in my pom.xml
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>

Categories

Resources