-2

(Maven build failure for my service):Maven Install is giving me this error. and also there is no settings.xml file in .m2 folder.

[INFO] Adapter CSI_ORDERTRACK_STATUS Bundle ............... SUCCESS [  0.581 s]

[INFO] Adapter CSI_ORDERTRACK_STATUS Bundle Dependencies .. SUCCESS [  0.011 s]

[INFO] Adapter CSI_ORDERTRACK_STATUS Bundle Service ....... FAILURE [01:12 min]

[INFO] Adapter CSI_ORDERTRACK_STATUS SWM Zip .............. SKIPPED

[INFO] Adapter CSI_ORDERTRACK_STATUS SWM Package .......... SKIPPED

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE
------------------------------------------------------------------------

[ERROR] Failed to execute goal on project CSI_ORDERTRACK_STATUS-service: Could not resolve dependencies for project maf.service:CSI_ORDERTRACK_STATUS-service:jar:200.0.14: Failed to collect dependencies at maf:adapter-ordertrackdb:jar:200.0.14: Failed to read artifact descriptor for maf:adapter-ordertrackdb:jar:200.0.14: Could not transfer artifact maf:adapter-ordertrackdb:pom:200.0.14 from/to central (https://repo.maven.apache.org/maven2): connect timed out -> [Help 1]
[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 200.0.14 dependency Service_pom is given below:

<groupId>maf.service</groupId>
<artifactId>CSI_ORDERTRACK_STATUS-service</artifactId>
<version>200.0.14</version>
<packaging>jar</packaging>
<name>Adapter CSI_ORDERTRACK_STATUS Bundle Service</name>
<dependencies>
    <dependency>
        <groupId>maf</groupId>
        <artifactId>adapter-ordertrackdb</artifactId>
        <version>200.0.14</version>
    </dependency>
    <dependency>
Mahi
  • 1
  • 1
  • 7
  • Maven is clearly complaining about the artifact not found `maf:adapter-ordertrackdb:pom:200.0.14` – kk. Jun 08 '17 at 15:46
  • maven dependencies folder is not there in my project.and also settings.xml is not present. please help – Mahi Jun 09 '17 at 08:30
  • Maven does not create a directory in your project. Rather it would refer the dependencies from .m2 directory. Settings.xml will be present in your apache-maven-xxx directory. – kk. Jun 09 '17 at 08:43

1 Answers1

0

Have you tried running Maven in offline mode? mvn -o install

By default Maven will try to fetch external dependencies from central.

Try to build af:adapter-ordertrackdb:pom:200.0.14 first (non recursive - mvn -N install), and then try Maven install.

If you could supply the pom's it could be helpful.

thomas77
  • 1,100
  • 13
  • 27
  • @Mahi Please update these dependencies in your question instead of comments. – kk. Jun 08 '17 at 16:22
  • You need to build the dependency first to your local m2 repository. It doesn't exist – thomas77 Jun 08 '17 at 16:22
  • How to build the dependency? Can someone help me.I am new to maven. – Mahi Jun 09 '17 at 08:29
  • Du you have a Maven module called `adapter-ordertrackdb` and a pom.xml for it? If so do a `mvn install -f adapter-ordertrackdb/pom.xml ` (where `adapter-ordertrackdb` is the folder with the folder with code) to build it to your local maven repository. If you can provide all the POMs and the project structure in your question it would be of great help. – thomas77 Jun 09 '17 at 08:48