Netbeans 8.2 Maven java fx error in building project - maven

I worked on netbeans 8.2 so there when i create a project on maven -javafx the project does not buiilt it gives the following error.
Failed to execute goal org.apache.maven.plugins:maven-archetype-
plugin:3.0.1:generate (default-cli) on project standalone-pom:
Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate failed:
Plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.1
or one of its dependencies could not be resolved:
The following artifacts could not be resolved: org.codehaus.groovy:groovy:jar:1.8.3,
org.apache.ant:ant:jar:1.8.1:
Could not transfer artifact org.codehaus.groovy:groovy:jar:1.8.3 from/to central
(http://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
A picture is also attached please help me solve this problem.picture of the problem

It appears you cannot reach the maven repository to download the dependencies!
see This question it helps find out which is the problem.
The url http://repo.maven.apache.org/maven2 you are using is it correct?
Can you reach this address from the machine on which you run the maven build?

Related

Spring MVC issues in STS 3.7.3

I am getting this error on importing https://github.com/spring-projects/spring-mvc-showcase in STS 3.7.3:---
Description Resource Path Location Type
Failure to transfer org.codehaus.mojo:aspectj-maven-plugin:pom:1.2 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.codehaus.mojo:aspectj-maven-plugin:pom:1.2 from/to central: connect timed out pom.xml /spring-mvc-showcase line 1 Maven pom Loading Problem
Edit
Mvn is ok now but pom.xml error still persists if I remove the errors and do maven clean I get errors as:
[INFO] https://repo.maven.apache.org/maven2/org/codehaus/mojo/aspectj-maven-plugin/1.2/aspectj-maven-plugin-1.2.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [ERROR] Plugin org.codehaus.mojo:aspectj-maven-plugin:1.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:aspectj-maven-plugin:jar:1.2: Could not transfer artifact org.codehaus.mojo:aspectj-maven-plugin:pom:1.2 from/to central: connect timed out -> [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/PluginResolutionException
First of all STS is build on Eclipse. So you can easily install the IDE Integration Eclipse IDE - M2Eclipse for STS. You can see how here. If you want to use it with this integration plugin you dont need to have a local maven repository.
Resolving Maven dependencies from the Eclipse workspace without installing to local Maven repository
But its also possible to use maven as a local system repository. Download is here and follow the steps for the installation and configuration here.
To see if you have a valid maven installation done, you can test it by typing mvn -v in a cmd shell or using STS -> right click on your project -> run as -> maven build or maven install.
Update:
I would say delete the project from your workspace and try it again. Download the project from gitHub as a zip file and import it again to your workspace. Right Click -> import -> existing maven project.
If you need to use a proxy for your connection you have to create a settings.xml in your .m2 folder. Look here for more info

Maven says archetype does not exist

I am trying to create a JPA based project using Maven and eclipse. I tried using the jpa-maven-archetype from create new maven project in the eclipse project creation, but it shot back this error
Could not resolve archetype com.rfc.maven.archetypes:jpa-maven-archetype:RELEASE from any of the configured repositories.
Could not resolve artifact com.rfc.maven.archetypes:jpa-maven-archetype:pom:RELEASE
Failed to resolve version for com.rfc.maven.archetypes:jpa-maven-archetype:pom:RELEASE: Could not find metadata com.rfc.maven.archetypes:jpa-maven-archetype/maven-metadata.xml in local (/home/sebastian/.m2/repository)
Failed to resolve version for com.rfc.maven.archetypes:jpa-maven-archetype:pom:RELEASE: Could not find metadata com.rfc.maven.archetypes:jpa-maven-archetype/maven-metadata.xml in local (/home/sebastian/.m2/repository)
Basically the eclipse plugin is looking into my local repositories instead of remote ones. So I tried going the command line and explicitly specifying the remote repository with the following command
mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create \
-DgroupId=com.something -DartifactId=jpaexample \
-DarchetypeArtifactId=jpa-maven-archetype \
-DarchetypeVersion=RELEASE \
-DremoteRepositories=http://maven.rodcoffin.com/repo \
-DinteractiveMode=false
And I got this error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create (default-cli) on project standalone-pom: Error creating from archetype: Error attempting to download archetype. Error downloading. Failed to resolve version for org.apache.maven.archetypes:jpa-maven-archetype:jar:RELEASE: Could not find metadata org.apache.maven.archetypes:jpa-maven-archetype/maven-metadata.xml in local (/home/sebastian/.m2/repository)
[ERROR] org.apache.maven.archetypes:jpa-maven-archetype:jar:RELEASE
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] id0 (http://maven.rodcoffin.com/repo, releases=true, snapshots=true)
[ERROR] -> [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/MojoExecutionException
It seems that repo maven.rodcoffin.com/repo is not working, or there is something wrong with my maven setup. I am not sure which one, if some one could give me pointers on where to search for, that would be helpful.
Also if repo maven.rodcoffin.com/repo is not working. What are my other options to create a JPA archetype project. Do I have to make a simple maven project and then convert it to a JPA as shown here.
EDIT: I just weaseled out of the problem by creating a maven quick type achetype and then using the persistence.xml for my project.
So just ignore this question.

Download gwtp-carstore steps

I would like to try a copy of gwtp-carstore.
Step 1: Download https://github.com/ArcBees/GWTP via GitHub app
Step 2: In eclipse select import Maven Projects then browse to gwtp-carstore
I then get the error
No marketplace entries found to handle maven-gae-plugin:0.9.6:unpack in Eclipse. Please see Help for more information.
I select resolve later - then I get the error
Could not get configured mojo for org.apache.maven.plugins:maven-checkstyle-plugin:2.7:checkstyle {execution: validate}
Plugin org.apache.maven.plugins:maven-checkstyle-plugin:2.7 or one of its dependencies could not be resolved: Failure to find com.gwtplatform:gwtp-build-tools:jar:1.1-SNAPSHOT in http://repository.apache.org/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of apache.snapshots has elapsed or updates are forced
From the command line I've run
mvn generate-sources and I get the errors
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.7:checkstyle (validate) on project gwtp-carstore: Execution validate of goal org.apache.maven.plugins:maven-checkstyle-plugin:2.7:checkstyle failed: Plugin org.apache.maven.plugins:maven-checkstyle-plugin:2.7 or one of its dependencies could not be resolved: Could not find artifact com.gwtplatform:gwtp-build-tools:jar:1.1-SNAPSHOT in apache.snapshots (http://repository.apache.org/snapshots) -> [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/PluginResolutionException
Any suggestions?
Cheers
Step 1 - Took a github checkout
Step 2 - Import into eclipse as maven project (it just downloaded half the internet i guess!!)
Step 3 - Use "Quick Fix" option from the "Marker" view to solve two maven errors as you report.
Step 4 - Fix error for "Update project configuration" account of above POM changes.
Remove/Disable the checkstyle plugin if the above steps do not help.

Deployment from Weblogic using Maven (Netbeans)

Anyone know how it can make a starting deploy the weblogic using Maven application settings? Maven weblogic already managed to insert the plugins and dependencies but contrary to the way I have had problems. Any tips?
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project jsf-scrumtoys:
Failed to deploy artifacts: Could not transfer artifact com.sun.faces:jsf-scrumtoys:war:0.1 from/to nexus-site (http://central_nexus/server): Failed to transfer file: http://central_nexus/server/com/sun/faces/jsf-scrumtoys/0.1/jsf-scrumtoys-0.1.war.
Return code is: 503, ReasonPhrase:Service Unavailable. -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Maven build issues - can anyone help me in knowing why I see this error when I do run as maven install

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project resteasy: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.10 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-surefire-plugin:jar:2.10 (): Failed to read artifact descriptor for org.apache.maven.shared:maven-common-artifact-filters:jar:1.3: Could not transfer artifact org.apache.maven.shared:maven-common-artifact-filters:pom:1.3 from/to central (http://repo.maven.apache.org/maven2): Remotely Closed [id: 0x3004ed34, /192.168.200.22:59080 :> repo.maven.apache.org/93.184.215.223:80] -> [Help 1]
You can try a couple of options:
Use the debugging options. This will produce a lot of output, and probably you'll be able to understand whats really going on.
mvn -X test
In case you're running some kind of proxy on the repository (Nexus, Artifactory, and so on), you can try to disable it in your settings.xml and try to bring the artifact directly from the central repository.
Its theoretically possible that something went wrong in your local repository (by default ~/.m2) In this case try to remove all the packages from ''org.apache.maven.shared:maven-common-artifact-filters:jar:1.3'' and rerun the build.
How this helps

Resources