You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by sc...@netscape.net on 2006/04/26 23:07:07 UTC

Installing a jar into local repository without specifying artifactId, groupId

Hello - I have a jar file that was generated from a Maven 2.0 build. 
The pom.xml file is included inside the jar file. Is there a maven 
command to install the jar file into the local repository without 
having to specify artifactId, groupId, etc? This info is inside the jar 
in the pom.xml file already. I tried to unzip the jar and then do a 
"mvn install:install -DpomFile=<path to pom.xml>" and I got this error:

  [INFO] Cannot execute mojo: install. It requires a project with an 
existing pom.xml, but the build is not using one.

  Whats the best way to get this thing installed into the local 
repository???

 Thanks,

 Scott.


___________________________________________________
Try the New Netscape Mail Today!
Virtually Spam-Free | More Storage | Import Your Contact List
http://mail.netscape.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Installing a jar into local repository without specifying artifactId, groupId

Posted by Allan Ramirez <ar...@exist.com>.
Hi there, it should be mvn install:install-file -DpomFile=<path-to-pom> 
-Dfile=<path-to-jar>

allan

scott2rp789@netscape.net wrote:

> Hello - I have a jar file that was generated from a Maven 2.0 build. 
> The pom.xml file is included inside the jar file. Is there a maven 
> command to install the jar file into the local repository without 
> having to specify artifactId, groupId, etc? This info is inside the 
> jar in the pom.xml file already. I tried to unzip the jar and then do 
> a "mvn install:install -DpomFile=<path to pom.xml>" and I got this error:
>
>  [INFO] Cannot execute mojo: install. It requires a project with an 
> existing pom.xml, but the build is not using one.
>
>  Whats the best way to get this thing installed into the local 
> repository???
>
> Thanks,
>
> Scott.
>
>
> ___________________________________________________
> Try the New Netscape Mail Today!
> Virtually Spam-Free | More Storage | Import Your Contact List
> http://mail.netscape.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


Re: Installing a jar into local repository without specifying artifactId, groupId

Posted by Wayne Fay <wa...@gmail.com>.
Extract the pom.xml from the jar file into the same directory the jar
is located in.

ie
/home/maven/file/file-0.1.jar
/home/maven/file/pom.xml

Then run mvn install:install-file -DpomFile=./pom.xml -Dfile=./file-0.1.jar

Something along these lines should do it. But admittedly I've never
attempted this, specifically. So if it errors out, reply back and
we'll help some more...

Wayne

On 4/26/06, scott2rp789@netscape.net <sc...@netscape.net> wrote:
> Hello - I have a jar file that was generated from a Maven 2.0 build.
> The pom.xml file is included inside the jar file. Is there a maven
> command to install the jar file into the local repository without
> having to specify artifactId, groupId, etc? This info is inside the jar
> in the pom.xml file already. I tried to unzip the jar and then do a
> "mvn install:install -DpomFile=<path to pom.xml>" and I got this error:
>
>  [INFO] Cannot execute mojo: install. It requires a project with an
> existing pom.xml, but the build is not using one.
>
>  Whats the best way to get this thing installed into the local
> repository???
>
>  Thanks,
>
>  Scott.
>
>
> ___________________________________________________
> Try the New Netscape Mail Today!
> Virtually Spam-Free | More Storage | Import Your Contact List
> http://mail.netscape.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Installing a jar into local repository without specifying artifactId, groupId

Posted by Greg Wiley <gr...@orthogony.com>.
scott2rp789@netscape.net wrote:
 > Hello - I have a jar file that was
 > generated from a Maven 2.0 build. The
 > pom.xml file is included inside the
 > jar file. Is there a maven command
 > to install the jar file into the
 > local repository without having to
 > specify artifactId, groupId, etc?
 > This info is inside the jar in the
 > pom.xml file already. I tried to
 > unzip the jar and then do a "mvn
 > install:install -DpomFile=<path to
 > pom.xml>"

Can you view the artifact, group,
and version from the unjarred pom.xml,
then use that information with install:
install-file to install the original
jarred form?

Or is there some reason that the xml
file can't be viewed?

   -dub


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org