I'm using https://github.com/webdevwilson/magento-java to connect to my store magento with JAVA for integration system. I installed Maven, openjdk-6-jdk, set up home for java, etc. My information is:
sudo java -version
java version "1.6.0_36"
OpenJDK Runtime Environment (IcedTea6 1.13.8) (6b36-1.13.8-0ubuntu1~14.04)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
sudo mvn -version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.6.0_36, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-43-generic", arch: "amd64", family: "unix"
And when i try in folder for package with contains POM.xml file:
sudo mvn package or sudo mvn install for compile the result is:
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.511s
[INFO] Finished at: Sun Aug 30 19:50:12 EDT 2015
[INFO] Final Memory: 12M/71M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project magento-ws-client: Compilation failure: Compilation failure:
[ERROR] /magento-java/src/main/java/com/magi/magento/service/BaseService.java:[27,34] cannot find symbol
[ERROR] symbol : method getMage_Api_Model_Server_V2_HandlerPort(java.net.URL)
[ERROR] location: interface com.magi.magento.ws.client.MagentoService
[ERROR] /magento-java/src/main/java/com/magi/magento/service/OrderService.java:[112,44] incompatible types
[ERROR] found : com.magi.magento.ws.client.SalesOrderListEntity[]
[ERROR] required: com.magi.magento.ws.client.SalesOrderEntity[]
[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/MojoFailureException
Attention for:
[ERROR] /magento-java/src/main/java/com/magi/magento/service/BaseService.java:[27,34] cannot find symbol
[ERROR] /magento-java/src/main/java/com/magi/magento/service/OrderService.java:[112,44] incompatible types
I have tried to CHANGE version of compiler maven in POM FILE here:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
But the error persists, what should I do? And yes, i tried every tip or link when searched in google, nothing solves. Thanks in advance.
Related
I'm getting the following errors when starting an app:
Error:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.091 s
[INFO] Finished at: 2019-11-29T09:36:53Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project dbproxy: Fatal error compiling: error: invalid target release: 13.0.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/MojoExecutionException
Makefile:53: recipe for target '/root/hue/desktop/libs/librdbms/java-lib/dbproxy-1.0.jar' failed
make[2]: *** [/root/hue/desktop/libs/librdbms/java-lib/dbproxy-1.0.jar] Error 1
make[2]: Leaving directory '/root/hue/desktop/libs/librdbms'
Makefile:106: recipe for target '.recursive-env-install/libs/librdbms' failed
make[1]: *** [.recursive-env-install/libs/librdbms] Error 2
make[1]: Leaving directory '/root/hue/desktop'``
Makefile:148: recipe for target 'desktop' failed
make: *** [desktop] Error 2
mvn --version
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 13.0.1, vendor: Oracle Corporation, runtime: /usr/local/java
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-52-generic", arch: "amd64", family: "unix"
openjdk 13.0.1 2019-10-15
OpenJDK Runtime Environment (build 13.0.1+9)
OpenJDK 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
Please help me to resolve the issue.
Your error says
Fatal error compiling: error: invalid target release: 13.0.1
You are using maven-compiler-plugin 3.0 however you need at least 3.8 to work with Java 13. This can be done with <plugin> tag, although you probably should consider updating Maven to 3.5:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>13</source>
<target>13</target>
</configuration>
</plugin>
Take a look at this article to see what else is needed to work with Java 13.
I tried to build LogicalDoc 6.7.1 with JDK 1.7, maven 3.0.3 and Ant 1.7
but it does not work and get these error , please help?
D:\maqtary\logicaldoc-6.7.1-src\build\poms>mvn -version
Apache Maven 3.0.3 (r1075438; 2011-02-28 09:31:09-0800)
Maven home: C:\Users\PC\Downloads\apache-maven-3.0.3
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_80\jre
Default locale: en_US, platform encoding: Cp1256
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
D:\maqtary\logicaldoc-6.7.1-src\build\poms>mvn install
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.logicaldoc:logicaldoc-parent-pom:62
(D:\maqtary\logicaldoc-6.7.1-src\build\poms\pom.xml) has 1 error
[ERROR] Unresolveable build extension: Error resolving version for plugin
'org.apache.maven.wagon:wagon-ssh' from the repositories [local
(C:\Users\PC\.m2\repository), central (http://repo1.maven.
org/maven2)]: Plugin not found in any plugin repository -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2]
http://cwiki.apache.org/confluence/display/MAVEN/PluginVersionResolutionException
D:\maqtary\logicaldoc-6.7.1-src\build\poms>
</code></pre>
As the error message states, your maven build is failing because something in D:\maqtary\logicaldoc-6.7.1-src\build\poms\pom.xml is telling it to use the maven plugin org.apache.maven.wagon:wagon-ssh, which doesn't exist in maven central repository, or your local repository, and thus the build fails.
It looks like said plugin can be found here
I have installed maven :
C:\Windows\System32>mvn --version
Apache Maven 3.3.3 (7994120775791599e405a7528ec3e0dke21dja06; 2015-04-22T13:57:3
7+02:00)
Maven home: C:\Program Files\Apache Software Foundation\apache-maven-3.3.3
Java version: 1.7.0_51, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_51\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 8", version: "6.2", arch: "amd64", family: "windows"
I am trying to generate Jersey glassfish project with the aid of maven prompt but when I type the following:
D:\maven>mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archety
pes -DinteractiveMode=false \ -DarchetypeVersion=2.17
I am getting this error:
The goal you specified requires a project to execute but there is no POM
in this directory (D:\maven). Please verify you invoked Maven from the correct
directory. -> [Help 1]
I dont understand the error: Which project is required here since I am trying to generate one? And how should I create the pom.xml file? I thought it is created by the project generation.
I appreciate any help.
Edit when I type it without \
D:\maven>mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archety
pes -DinteractiveMode=false -DarchetypeVersion=2.17
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.3:generate (default-cli) > generate-sources
# standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.3:generate (default-cli) < generate-sources
# standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.3:generate (default-cli) # standalone-pom --
-
[INFO] Generating project in Batch mode
[INFO] No archetype defined. Using maven-archetype-quickstart (org.glassfish.jer
sey.archetypes:maven-archetype-quickstart:2.17)
Downloading: https://repo.maven.apache.org/maven2/org/glassfish/jersey/archetype
s/maven-archetype-quickstart/2.17/maven-archetype-quickstart-2.17.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.542 s
[INFO] Finished at: 2015-05-12T16:39:51+02:00
[INFO] Final Memory: 17M/152M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
.3:generate (default-cli) on project standalone-pom: The desired archetype does
not exist (org.glassfish.jersey.archetypes:maven-archetype-quickstart:2.17) -> [
Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
D:\maven>
I'll go for an answer now.
So the first part of your problem was the caracter "\". See this thread
Then for your second problem : it is said The desired archetype does
not exist. This archetype maven-archetype-quickstart doesn't exist in maven repository. Please refer to this link to choose the archetype you are looking for and put it in your command.
At the end you command must have at least 2 argument -DarchetypeGroupId and -DarchetypeArtifactId. For example :
mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes -DarchetypeArtifactId=jersey-quickstart-webapp
I've a Play Framework 1.2.7 project which is managed by Maven. Now I am trying to upgrade to Play Framework version 1.3.0
What am I doing the way, how to properly upgrade from Play framework 1.2 to 1.3?
Maven play plugin in the current pom.xml
<parent>
<groupId>com.google.code.maven-play-plugin</groupId>
<artifactId>play-app-default-parent</artifactId>
<version>1.0.0-beta7</version>
</parent>
Changed play plugin to
<parent>
<groupId>com.google.code.maven-play-plugin</groupId>
<artifactId>play13-app-default-parent</artifactId>
<version>1.0.0-beta7</version>
</parent>
Maven --version
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-12T02:58:10+06:00)
Maven home: /usr/local/Cellar/maven/3.2.3/libexec
Java version: 1.7.0_71, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.10.1", arch: "x86_64", family: "mac"
mvn package clean and mvn install output
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) # gui ---
[INFO]
[INFO] --- play-maven-plugin:1.0.0-beta7:initialize (default-initialize) # gui ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) # gui ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # gui ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 38 source files to /Users/sultan/project/gui/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/sultan/project/gui/app/models/Dataset.java:[7,36] package javax.validation.constraints does not exist
[ERROR] /Users/sultan/project/gui/app/models/AbstractInstance.java:[14,36] package javax.validation.constraints does not exist
[ERROR] /Users/sultan/project/gui/app/models/User.java:[10,36] package javax.validation.constraints does not exist
[ERROR] /Users/sultan/project/gui/app/models/Experiment.java:[19,36] package javax.validation.constraints does not exist
[ERROR] /Users/sultan/project/gui/app/models/AccessGroup.java:[7,36] package javax.validation.constraints does not exist
[INFO] 27 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:16 min
[INFO] Finished at: 2015-01-15T14:45:00+06:00
[INFO] Final Memory: 26M/119M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project gui: Compilation failure: Compilation failure:
[ERROR] /Users/sultan/project/gui/app/models/AbstractInstance.java:[29,6] cannot find symbol
[ERROR] symbol: class NotNull
[ERROR] location: class models.AbstractInstance
[ERROR] /Users/sultan/project/gui/app/models/User.java:[40,6] cannot find symbol
[ERROR] symbol: class NotNull
[ERROR] location: class models.User
[ERROR] /Users/sultan/project/gui/app/models/Experiment.java:[30,6] cannot find symbol
[ERROR] symbol: class NotNull
[ERROR] location: class models.Experiment
[ERROR] /Users/sultan/project/gui/app/models/Experiment.java:[49,6] cannot find symbol
[ERROR] symbol: class NotNull
[ERROR] location: class models.Experiment
[ERROR] symbol: class ConstraintViolationException
[ERROR] location: class controllers.ExperimentController
[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/MojoFailureException
I have tried to upgrade Hibernate but it didn't help
Check if you have marked any dependency as a runtime dependency. Try changing the scope to compile.
play13-app-default-parent:1.0.0-beta7 depends on play 1.3.0-RC1. This version of Play! does not contain validation-api in it's dependencies, it was added in 1.3.0-RC2 but neither 1.3.0-RC2 nor 1.3.0-RC3 were deployed to Maven central. 1.3.0 was deployed.
Next version of play13-app-default-parent will depend on 1.3.0.
For now you have to add one project property to switch to 1.3.0:
<properties>
...
<play.version>1.3.0</play.version>
</properties>
I have installed Maven 3.0.5 on my windows 8 64 bit machine by the following steps:
Downloaded apache-maven-3.0.5.bin.zip and the archive is stored in C:\Program Files\Apache Software Foundation. I changed the environment variables as follows:
M2_HOME with value C:\Program Files\Apache Software Foundation\apache-maven-3.0.5
M2 with value %M2_HOME%\bin
JAVE_HOME with value C:\Program Files\Java\jdk1.8.0_25
PATH with value %M2%;%JAVA_HOME%\bin
after this when i type mvn --version i get
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 19:21:
28+0530)
Maven home: C:\Program Files\Apache Software Foundation\apache-maven-3.0.5
Java version: 1.8.0_25, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_25\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 8", version: "6.2", arch: "amd64", family: "dos"
I have downloaded JDK and JRE in the folders under
C:\Program Files\Java\jdk1.8.0_25
C:\Program Files\Java\jre1.8.0_25
Now for Karma to install I downloaded the Web-Karma-Master zip and the archive is placed under
C:\Program Files\Web-Karma-master\Web-Karma-master
Now when I type mvn clean install in this directory I get the following:
..
...
...
[INFO] karma-mr .......................................... SKIPPED
[INFO] karma-storm ....................................... SKIPPED
[INFO] karma-web-services ................................ SKIPPED
[INFO] web-services-rdf .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.285s
[INFO] Finished at: Wed Oct 29 13:21:14 IST 2014
[INFO] Final Memory: 8M/109M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.codehaus.mojo:exec-maven-plugin:1.1
or one of its dependencie s could not be resolved: Failed
to read artifact descriptor for org.codehaus.mojo:
exec-maven-plugin:jar:1.1: Could not transfer artifact
org.codehaus.mojo:exec-maven-plugin:pom:1.1 from/to central
Connection to http://repo.maven.apache.org refused:
Connection timed out: connect -> [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.
Please help. I have done all the above in the same order as mentioned. But I am not able to resolve this problem.
Archana.
Create a file settings.xml in .m2 folder of your HOME directory. Add the following:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>your.org</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>*.your.org</nonProxyHosts>
</proxy>
</proxies>
</settings>
Remove <username> and <password> tags if your proxy server does not need authentication.
You can look for the values for these in your browser settings.
Also refer to proxies section of maven settings reference.