Maven does not read POM when installing JAR to repository -


I have followed the guidelines for installing a JAR file in my local store.

I run the following command:

  mvn org.apache.maven.plugins: maven-install-plugin: 2.5.2: install-file -Dfile = log4j- weblayout-0.0.1-SNAPSHOT.jar   

The JAR file is created using Maven and it contains a POM file that lists its dependencies. The file path inside the JR is:

  /META-INF/maven/in.ksharma/log4j-weblayout/pom.xml   

Maven installs Artifact but its POM has not read It creates an empty POM file which is zero with any dependency information:

   & Lt; Version & gt; 0.0.1-snapshot and lt; / Edition & gt; & Lt; Details & gt; POM was created from the install: install-file & lt; / Description & gt; & Lt; / Project & gt;   

How can I make sure that POM is installed only inside a jar?

Edit:

The contents of different files inside a jar are as follows.

/META-INF/MANIFEST.MF :

  MANIFEST-VERSION: 1.0 ARCHITECTURE-VERSION: Built forged architecture- By: kshitiz built- By: Apache Maven 3.1.0 Build-JDK: 1.8.0   

/ Meta-INF / Meeven / In Krishna / Log 4 J-WebLayout / Pam. Properties :

  Created by # Maven # Oct 08 19:48:28 IST 2014 version = 0.0.1 - SNAPHOT Group ID = In Krishna Artifact ID = Lodge 4 J- WebLayout   

/META-INF/maven/in.ksharma/log4j-weblayout/pom.xml :

  & lt ; Project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns: xsi = "http://www.w3.org/2001/XMLSchema -instance" xsi: schema location = "http: / /maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> & Lt; modelVersion & gt; 4.0.0 & lt; / ModelVersion & gt; & Lt; Group & gt; In.ksharma & lt; / Group & gt; & Lt; ArtifactId & gt; Log4j-weblayout & lt; / ArtifactId> & Lt; Version & gt; 0.0.1-snapshot and lt; / Edition & gt; & Lt; Packaging & gt; Jar & lt; / Packaging & gt; & Lt; URL & gt; Https: //github.com/Kshitiz-Sharma/log4j-weblayout< / URL & gt; & Lt; Properties & gt; & Lt; Maven.compiler.source & gt; 1.6 & LT; /maven.compiler.source> & Lt; Maven.compiler.target & gt; 1.6 & LT; /maven.compiler.target> & Lt; / Properties & gt; & Lt; Dependency & gt; & Lt ;! - Compile dependencies - & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.apache.velocity & lt; / Group & gt; & Lt; ArtifactId & gt; Velocity & lt; / ArtifactId> & Lt; Version & gt; 1.7 & lt; / Edition & gt; & Lt; Scope & gt; Collection & lt; / Scope & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.jooq & lt; / Group & gt; & Lt; ArtifactId & gt; joor & lt; / ArtifactId> & Lt; Version & gt; 0.9.3 & lt; / Edition & gt; & Lt; Scope & gt; Collection & lt; / Scope & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Commons-When & lt; / Group & gt; & Lt; ArtifactId & gt; Commons-When & lt; / ArtifactId> & Lt; Version & gt; 2.4 & lt; / Edition & gt; & Lt; Scope & gt; Collection & lt; / Scope & gt; & Lt; / Dependencies & gt; & Lt ;! - Dependency provided - & gt; & Lt; Dependency & gt; & Lt; Group & gt; log4j & lt; / Group & gt; & Lt; ArtifactId & gt; log4j & lt; / ArtifactId> & Lt; Version & gt; 1.2.16 & lt; / Edition & gt; & Lt; Scope & gt; Provided & lt; / Scope & gt; & Lt; / Dependencies & gt; & Lt ;! - test dependence - & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.springframework & lt; / Group & gt; & Lt; ArtifactId & gt; Spring core & lt; / ArtifactId> & Lt; Version & gt; 4.0.5.RELEASE & lt; / Edition & gt; & Lt; Scope & gt; Trial & lt; / Scope & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.codehaus.groovy & lt; / Group & gt; & Lt; ArtifactId & gt; Groove-all & lt; / ArtifactId> & Lt; Version & gt; 2.1.8 & lt; / Edition & gt; & Lt; Scope & gt; Trial & lt; / Scope & gt; & Lt; / Dependencies & gt; & Lt; / Dependencies & gt; & Lt; / Project & gt;    

I think you will need to remove and specify pom.xml from jar This is using the following:

  mvn org.apache.maven.plugins: maven-install-plugin: 2.5.2: install-file -Dfile = log4j-weblayout-0.0. 1 -SNAPSHOT .jar -Dompile = pom.xml    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -