On a non-automounted filesystem, "mvn clean" works (so does "mvn package"). On a filesystem that's automounted, "mvn clean" fails in the following way:
$ mvn clean
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building glutmax-sentiment-analysis 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] Failed to read tracking file /nethome/guest/.m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom.lastUpdated
java.io.IOException: Input/output error
at sun.nio.ch.FileDispatcherImpl.lock0(Native Method)
at sun.nio.ch.FileDispatcherImpl.lock(FileDispatcherImpl.java:90)
[...]
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
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 write tracking file /nethome/guest/.m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom.lastUpdated
java.io.IOException: Input/output error
at sun.nio.ch.FileDispatcherImpl.lock0(Native Method)
at sun.nio.ch.FileDispatcherImpl.lock(FileDispatcherImpl.java:90)
[...]
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:13 min
[INFO] Finished at: 2017-07-12T11:34:55-07:00
[INFO] Final Memory: 23M/1445M
[INFO] ------------------------------------------------------------------------
[ERROR] 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: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Input/output 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/PluginResolutionException
$ mvn -version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T12:39:06-07:00)
Maven home: /usr/local/maven
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /usr/local/jdk1.8.0_121/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-514.el7.x86_64", arch: "amd64", family: "unix"
Clearly, I'm missing some kind of configuration information, but searching for answers all I have found was that I need to delete ~/.m2/*, chmod 777 ~/.m2, and made sure my JAVA_HOME is correct. None of the recommendations worked. What am I missing?
Interestingly, Gradle doesn't appear to work on automounted filesystems either.
This seems to be a NFS issue. The JDK delegates to native function call for Linux, and the underlying syscall is failing. Try point Maven local repository directory to the local file system. To be specific, in file apache-maven-${version}/conf/settings.xml, uncomment and update line:
<localRepository>some_local_directory</localRepository>
The following seems to fix the write problem.
By adding "hard,nolock,noac" to the automount description, the user is now able to run "mvn". Unfortunately, a 1 minute build on a local filesystem takes approximately 15 minutes on an automounted filesystem. But that's another question/problem for stackoverflow.
Related
I am currently trying to start developing a Jira plugin. However, I needed to configure the Maven settings to use my company's proxy server. This proxy seems to block the google analytics server.
When I try to create a new plugin project following the official tutorial the step 2 (execute atlas-create-jira-plugin) produces the following error:
PS C:\Users\XXX\Documents\Jira Plugins\test> atlas-create-jira-plugin
Executing: "C:\Applications\Atlassian\atlassian-plugin-sdk-8.2.7\apache-maven-3.5.4\bin\mvn.cmd" com.atlassian.maven.plugins:jira-maven-plugin:8.1.2:create -gs C:\Applications\Atlassian\atlassian-plugin-sdk-8.2.7\apache-maven-3.5.4/conf/settings.xml
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- jira-maven-plugin:8.1.2:create (default-cli) # standalone-pom ---
[INFO] Google Analytics Tracking is enabled to collect AMPS usage statistics.
[INFO] Although no personal information is sent, you may disable tracking by adding <allowGoogleTracking>false</allowGoogleTracking> to the amps plugin configuration in your pom.xml
[INFO] Sending event to Google Analytics: AMPS:jira - Create Plugin
[INFO] using stable product version: 7.13.0
[INFO] using stable data version: 7.13.0
Define value for groupId: : [ERROR] Error making tracking request
java.net.UnknownHostException: www.google-analytics.com
at java.net.AbstractPlainSocketImpl.connect (AbstractPlainSocketImpl.java:184)
at java.net.PlainSocketImpl.connect (PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect (SocksSocketImpl.java:392)
at java.net.Socket.connect (Socket.java:607)
at java.net.Socket.connect (Socket.java:556)
at sun.net.NetworkClient.doConnect (NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer (HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer (HttpClient.java:558)
at sun.net.www.http.HttpClient.<init> (HttpClient.java:242)
at sun.net.www.http.HttpClient.New (HttpClient.java:339)
at sun.net.www.http.HttpClient.New (HttpClient.java:357)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient (HttpURLConnection.java:1226)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0 (HttpURLConnection.java:1205)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect (HttpURLConnection.java:1056)
at sun.net.www.protocol.http.HttpURLConnection.connect (HttpURLConnection.java:990)
at com.dmurph.tracking.JGoogleAnalyticsTracker.dispatchRequest (JGoogleAnalyticsTracker.java:463)
at com.dmurph.tracking.JGoogleAnalyticsTracker.access$100 (JGoogleAnalyticsTracker.java:76)
at com.dmurph.tracking.JGoogleAnalyticsTracker$1.run (JGoogleAnalyticsTracker.java:431)
As I said, I am pretty sure that java.net.UnknownHostException: www.google-analytics.com is caused by my company's proxy.
I then tried to disable google analytics. The problem is: the command does not create any project files until here and so there is no pom.xml that I could edit. When I try to edit the default Maven profile in ~/.m2/settings.xml as described here, Maven complains that the project does not have a pom.xml:
Executing: "C:\Applications\Atlassian\atlassian-plugin-sdk-8.2.7\apache-maven-3.5.4\bin\mvn.cmd" com.atlassian.maven.plugins:jira-maven-plugin:8.1.2:create -gs C:\Applications\Atlassian\atlassian-plugin-sdk-8.2.7\apache-maven-3.5.4/conf/settings.xml
[INFO] Scanning for projects...
[WARNING] The POM for com.atlassian.maven.plugins:jira-maven-plugin:jar:8.1.2 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.268 s
[INFO] Finished at: 2021-06-18T15:08:01+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin com.atlassian.maven.plugins:jira-maven-plugin:8.1.2 or one of its dependencies could not be resolved: Failure to find com.atlassian.maven.plugins:jira-maven-plugin:jar:8.1.2 in 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 -> [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
Finally, when I try to execute atlas-create-jira-plugin -Dallow.google.tracking=false (also described here) I am getting a similar error:
Executing: "C:\Applications\Atlassian\atlassian-plugin-sdk-8.2.7\apache-maven-3.5.4\bin\mvn.cmd" com.atlassian.maven.plugins:jira-maven-plugin:8.1.2:create -gs C:\Applications\Atlassian\atlassian-plugin-sdk-8.2.7\apache-maven-3.5.4/conf/settings.xml -Dallow .google.tracking=false
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.203 s
[INFO] Finished at: 2021-06-18T15:14:56+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\KUJ5MU\Documents\Jira Plugins\test). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
Does anyone have a solution for this problem? How can I tell the Atlassian SDK not to use Google analytics before creating my first project?
Ignore that error. you can see that error occured after "group id:". So just give ur groupid after the error and press enter. it will as k for the other settings. You can contine from there without issues.
I am using Maven to deploy a Java application on GitLab. I receive the following error. From what I understand it is using the the incorrect project and I don't understand which environment variable if they are using one or where they are getting that variable from. Every time I try to debug deploying with Maven on Gitlab I run into a new error is there a proper way to deploy on Gitlab?
This is my yml file
before_script:
- echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list
- curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
- apt-get update && apt-get install -y google-cloud-sdk google-cloud-sdk-app-engine-java
- wget https://www-us.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz
- tar xzvf apache-maven-3.6.0-bin.tar.gz
test:1.1:
image: python:2.7
stage: deploy
environment: Production
only:
- master
script:
- echo $DEPLOY_KEY_FILE_PRODUCTION > $CI_PIPELINE_ID.json
- gcloud auth activate-service-account --key-file $CI_PIPELINE_ID.json
- ./apache-maven-3.6.0/bin/mvn clean appengine:deploy
This is the error
Dec 17, 2018 8:08:54 PM com.google.cloud.tools.appengine.cloudsdk.CloudSdk logCommand
INFO: submitting command: /usr/lib/google-cloud-sdk/bin/gcloud app deploy
[INFO] GCLOUD: ERROR: (gcloud.app.deploy) Permissions error fetching application [apps/gitlab-ci-155816]. Please make sure you are using the correct project ID and that you have permission to view applications on the project.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 45.781 s
[INFO] Finished at: 2018-12-17T20:08:55Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.2:deploy (default-cli) on project appengine-try-java: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.2:deploy failed: Non zero exit: 1 -> [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/PluginExecutionException
I'm using window OS
I'm doing like this (using google api in java)
https://github.com/aliciatang/CalendarSync
when I writing mvn appengine:devserver, It got error
[INFO] Retrieving Google App Engine Java SDK from Maven
Downloading: https://repo.maven.apache.org/maven2/com/google/appengine/appengine-java-sdk/1.9.21/appengine-java-sdk-1.9.21.zip
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34:22 min
[INFO] Finished at: 2017-08-04T18:52:58+09:00
[INFO] Final Memory: 19M/154M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:appengine-maven-plugin:1.9.21:devserver (default-cli) on project gcal: Could not resolve SDK artifact in Maven.: Could not transfer artifact com.google.appengine:appengine-java-sdk:zip:1.9.21 from/to central (https://repo.maven.apache.org/maven2): GET request of: com/google/appengine/appengine-java-sdk/1.9.21/appengine-java-sdk-1.9.21.zip from central failed: Connection reset -> [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
I can't solve this problem!!
This works for me:
gcloud components update //Update gcloud
mvn clean package //Rebuild app
mvn appengine:run //Run on local server (Jetty) (This replace: mvn appengine:devserver)
Go to the browser: http://localhost:8080/
Happy coding !!!
I'm trying to test maven using
mvn archetype:generate -DgroupId=org.sonatype.mavenbook -DartifactId=quickstart -Dversion=1.0-SNAPSHOT -DpackageName=org.sonatype.mavenbook -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.0 -DinteractiveMode=false
After several minutes, the system shows me this:
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-catalog/2.2/archetype-catalog-2.2.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-catalog/2.2/archetype-catalog-2.2.pom (2 KB at 4.4 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-models/2.2/archetype-models-2.2.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-models/2.2/archetype-models-2.2.pom (3 KB at 5.8 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.5.8/plexus-utils-1.5.8.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.5.8/plexus-utils-1.5.8.pom (8 KB at 17.0 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/2.0.2/plexus-2.0.2.pom
Downloading: http://repo.maven.apache.org/maven2/org/apache/ant/ant-parent/1.8.1/ant-parent-1.8.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30:36.874s
[INFO] Finished at: Tue Feb 07 15:59:39 BRST 2012
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate failed: Plugin org.apache.maven.plugins:maven-archetype-plugin:2.2 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-archetype-plugin:jar:2.2 (): Failed to read artifact descriptor for org.codehaus.plexus:plexus-utils:jar:1.5.8: Could not transfer artifact org.codehaus.plexus:plexus:pom:2.0.2 from/to central (http://repo.maven.apache.org/maven2): Read 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
How can I fix this? Thanks in advance!
I too encountered the same problem when I created a project using Idea IDE. Using the below method you can create a stand alone application or a web application without getting any error.
Go to the Terminal. Type below mentioned commands and execute.
For a web application:
mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
For a stand alone application:
mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
This will create the project structure by downloading relevant jars etc. When this is done the project structure has been created. Open up an IDE and direct it to created Project`s Pom.xml file.
The error is:
Failed to read artifact descriptor for org.codehaus.plexus:plexus-utils:jar:1.5.8: Could not transfer artifact org.codehaus.plexus:plexus:pom:2.0.2 from/to central (http://repo.maven.apache.org/maven2): Read timed out
Try again when your network works better (internet connection is better).
Check with ping if you can connect to the http://repo.maven.apache.org/maven2.
may be you should try in the root mode : try with sudo + command
I have encountered this problem when my machine is behind a firewall (corporate network) and I have not set up a proxy in ~/.m2/settings.xml.
The opposite could also be true, a proxy has been defined, but you're no longer connected to that network.
Details about Maven's settings.xml can be found here.
I had the same problem. Maven can't seem to view the plugins, in this case the archetype. This is a network problem. Are you behind a proxy or firewall? If so, follow the instructions given here. Otherwise, set your firewall permissions and you can try using sudo too.
I am trying to modify the PrimeFaces 1.1 sources to fit my application needs. However I ran into trouble compiling the sources.
I am using the sources from:
http://repository.prime.com.tr/org/primefaces/primefaces/1.1/
Downloaded and extracted:
primefaces-1.1-sources.jar
However when i try to run the primefaces-1.1.pom it fails because its referencing to some XML files which contains the tag info, but I couldn't find those in the sources. I assume this build file is for PrimeFaces 2.x?
Or am i missing something? Would be great if you could help me!
Using Maven "Install"
"c:\program files (x86)\jetbrains\intellij idea 10.0\jre\jre\bin\java" -Dclassworlds.conf=D:\Werk\Binaries\Maven\bin\m2.conf -Dmaven.home=D:\Werk\Binaries\Maven -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 10.0\bin" -Dfile.encoding=windows-1252 -classpath "D:\Werk\Binaries\Maven\boot\plexus-classworlds-2.4.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 10.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher --no-plugin-registry --fail-fast --no-plugin-updates --strict-checksums --update-snapshots -f C:\Users\Mark\Downloads\primefaces-1.1-sources\pom.xml install
[WARNING] Command line option -npu is deprecated and will be removed in future Maven versions.
[WARNING] Command line option -npr is deprecated and will be removed in future Maven versions.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.primefaces:primefaces:jar:1.1
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 156, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building primefaces 1.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- xslt-maven-plugin:1.0:transform (generate-ui-metadata) # primefaces ---
[ERROR] XSL file does not exist: C:\Users\Mark\Downloads\primefaces-1.1-sources\src\main\resources-maven-jsf\misc\resolve_entities.xsl
[INFO]
[INFO] --- xslt-maven-plugin:1.0:transform (generate-touch-metadata) # primefaces ---
[ERROR] XSL file does not exist: C:\Users\Mark\Downloads\primefaces-1.1-sources\src\main\resources-maven-jsf\misc\resolve_entities.xsl
[INFO]
[INFO] --- maven-jsf-plugin:1.1.3:generate-tld (generate-ui) # primefaces ---
[INFO] Generating TLD
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.711s
[INFO] Finished at: Thu Dec 30 11:29:43 CET 2010
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.primefaces:maven-jsf-plugin:1.1.3:generate-tld (generate-ui) on project primefaces: Execution generate-ui of goal org.primefaces:maven-jsf-plugin:1.1.3:generate-tld failed. NullPointerException -> [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/PluginExecutionException
Process finished with exit code 1
If you just need to modify a single class (or a few), it may be easiest to take that class's source code alone, modify and compile it with the rest of Primefaces as JAR in the classpath, then replace that single class file in the JAR.