I build the common projects and install it to local repository and then I try to use the same jar package but computer cannot find it.
Firstly, I build and install common into my local repository:
F:\seprate\paymate-commons>mvn -DskipTests install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building paymate-commons 2.6.9
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ paymate-commons ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\seprate\paymate-commons\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ paymate-commons ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ paymate-commons ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ paymate-commons ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.16:test (default-test) @ paymate-commons ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ paymate-commons ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ paymate-commons ---
[INFO] Installing F:\seprate\paymate-commons\target\paymate-commons-2.6.9.jar to C:\Users\Lu Sheng\.m2\repository\au\com\paymate\paymate-commons\2.6.9\paymate-commons-2.6.9.jar
[INFO] Installing F:\seprate\paymate-commons\pom.xml to C:\Users\Lu Sheng\.m2\repository\au\com\paymate\paymate-commons\2.6.9\paymate-commons-2.6.9.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.841 s
[INFO] Finished at: 2016-07-28T10:18:01+10:00
[INFO] Final Memory: 11M/155M
[INFO] ------------------------------------------------------------------------
After that I try to build paymate-model which is depending on paymate-commons
F:\seprate\paymate-model>mvn -o -DskipTests install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building paymate-model 2.6.9
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.944 s
[INFO] Finished at: 2016-07-28T10:21:22+10:00
[INFO] Final Memory: 7M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project paymate-model: Could not resolve dependencies for project au.com.paymate:paymate-model:jar:2.6.9: Failed to collect dependencies at au.com.paymate:paymate-commons:jar:2.6.9: Failed to read artifact descriptor for au.com.paymate:paymate-commons:jar:2.6.9: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact au.com.paymate:projects:pom:2.6.9 has not been downloaded from it before. -> [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 find no mate I use mvn -DskipTests install or mvn -DskipTests install I do not use the local repositry But I can find jar file in default local repositry.
C:\Users\Username\.m2\repository\au\com\paymate\paymate-commons\2.6.9
How to make computer know the jar position and use it? Do I need to do some setting on pom.xml?