You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rusty Wright <ru...@gmail.com> on 2008/10/10 23:04:19 UTC

maven always wants to download pom?

Why is this happening?  Every time I compile it's trying to download a pom for something I installed in my local repository.

I have a directory COPY_TO_REPO in my project:

  ./COPY_TO_REPO:
  copy.sh  edtftpj-pro-2.1.0.jar  license-1.0.jar

What's in copy.sh is what I got from the documentation on the maven.apache.org web page:

  mvn install:install-file \
    -DgroupId=edtftpj-pro \
    -DartifactId=edtftpj-pro \
    -Dversion=2.1.0 \
    -Dpackaging=jar \
    -Dfile=edtftpj-pro-2.1.0.jar
  mvn install:install-file \
    -DgroupId=edtftpj-pro \
    -DartifactId=license \
    -Dversion=1.0 \
    -Dpackaging=jar \
    -Dfile=license-1.0.jar

Every time I compile it's always trying to download its pom:

mvn -Pdesktop clean compiler:compile
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'compiler'.
[INFO] ------------------------------------------------------------------------
[INFO] Building CARS paper accounting net module (ftp and email)
[INFO]    task-segment: [clean, compiler:compile]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /home/rusty/java/cars/cars_net/target
Downloading: http://repo1.maven.org/maven2/edtftpj-pro/edtftpj-pro/2.1.0/edtftpj-pro-2.1.0.pom
Downloading: http://repo1.maven.org/maven2/edtftpj-pro/license/1.0/license-1.0.pom
[INFO] [compiler:compile]
[INFO] Compiling 5 source files to /home/rusty/java/cars/cars_net/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Fri Oct 10 13:53:01 PDT 2008
[INFO] Final Memory: 5M/11M
[INFO] ------------------------------------------------------------------------

Here's what my .m2 directory looks like for it:

/home/rusty/.m2/repository/edtftpj-pro:
edtftpj-pro/  license/

/home/rusty/.m2/repository/edtftpj-pro/edtftpj-pro:
2.1.0/  maven-metadata-local.xml

/home/rusty/.m2/repository/edtftpj-pro/edtftpj-pro/2.1.0:
edtftpj-pro-2.1.0.jar

/home/rusty/.m2/repository/edtftpj-pro/license:
1.0/  maven-metadata-local.xml

/home/rusty/.m2/repository/edtftpj-pro/license/1.0:
license-1.0.jar

Here's my pom.xml:

<project
    xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://maven.apache.org/POM/4.0.0
        http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>edu.berkeley.ist</groupId>
        <artifactId>cars_parent</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <relativePath>../cars_parent/pom.xml</relativePath>
    </parent>

    <artifactId>cars_net</artifactId>

    <packaging>jar</packaging>

    <name>CARS paper accounting net module (ftp and email)</name>

    <build>
        <finalName>${pom.artifactId}-${pom.version}</finalName>
    </build>

    <!-- =========================== -->

    <dependencies>
        <dependency>
            <groupId>edtftpj-pro</groupId>
            <artifactId>edtftpj-pro</artifactId>
            <version>2.1.0</version>
        </dependency>

        <dependency>
            <groupId>edtftpj-pro</groupId>
            <artifactId>license</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.4</version>
        </dependency>

        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-email</artifactId>
            <version>1.1</version>
        </dependency>
    </dependencies>
</project>

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


Re: maven always wants to download pom?

Posted by Wayne Fay <wa...@gmail.com>.
Depending on the version of the install plugin that you used, the
"generatePom" parameter is either true or false by default (IIRC). It
seems like the version you are using has a "false" value.

As such, reinstall the jar with the same mvn install:install-file
command, but add -DgeneratePom=true to the list of params. Then a
*.pom file will be created in the proper place in the repo, and this
message will go away.

Wayne

On Fri, Oct 10, 2008 at 2:04 PM, Rusty Wright <ru...@gmail.com> wrote:
> Why is this happening?  Every time I compile it's trying to download a pom
> for something I installed in my local repository.
>
> I have a directory COPY_TO_REPO in my project:
>
>  ./COPY_TO_REPO:
>  copy.sh  edtftpj-pro-2.1.0.jar  license-1.0.jar
>
> What's in copy.sh is what I got from the documentation on the
> maven.apache.org web page:
>
>  mvn install:install-file \
>   -DgroupId=edtftpj-pro \
>   -DartifactId=edtftpj-pro \
>   -Dversion=2.1.0 \
>   -Dpackaging=jar \
>   -Dfile=edtftpj-pro-2.1.0.jar
>  mvn install:install-file \
>   -DgroupId=edtftpj-pro \
>   -DartifactId=license \
>   -Dversion=1.0 \
>   -Dpackaging=jar \
>   -Dfile=license-1.0.jar
>
> Every time I compile it's always trying to download its pom:
>
> mvn -Pdesktop clean compiler:compile
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'compiler'.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building CARS paper accounting net module (ftp and email)
> [INFO]    task-segment: [clean, compiler:compile]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [clean:clean]
> [INFO] Deleting directory /home/rusty/java/cars/cars_net/target
> Downloading:
> http://repo1.maven.org/maven2/edtftpj-pro/edtftpj-pro/2.1.0/edtftpj-pro-2.1.0.pom
> Downloading:
> http://repo1.maven.org/maven2/edtftpj-pro/license/1.0/license-1.0.pom
> [INFO] [compiler:compile]
> [INFO] Compiling 5 source files to
> /home/rusty/java/cars/cars_net/target/classes
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Fri Oct 10 13:53:01 PDT 2008
> [INFO] Final Memory: 5M/11M
> [INFO]
> ------------------------------------------------------------------------
>
> Here's what my .m2 directory looks like for it:
>
> /home/rusty/.m2/repository/edtftpj-pro:
> edtftpj-pro/  license/
>
> /home/rusty/.m2/repository/edtftpj-pro/edtftpj-pro:
> 2.1.0/  maven-metadata-local.xml
>
> /home/rusty/.m2/repository/edtftpj-pro/edtftpj-pro/2.1.0:
> edtftpj-pro-2.1.0.jar
>
> /home/rusty/.m2/repository/edtftpj-pro/license:
> 1.0/  maven-metadata-local.xml
>
> /home/rusty/.m2/repository/edtftpj-pro/license/1.0:
> license-1.0.jar
>
> Here's my pom.xml:
>
> <project
>   xmlns="http://maven.apache.org/POM/4.0.0"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="
>       http://maven.apache.org/POM/4.0.0
>       http://maven.apache.org/maven-v4_0_0.xsd">
>  <modelVersion>4.0.0</modelVersion>
>
>   <parent>
>       <groupId>edu.berkeley.ist</groupId>
>       <artifactId>cars_parent</artifactId>
>       <version>0.0.1-SNAPSHOT</version>
>       <relativePath>../cars_parent/pom.xml</relativePath>
>   </parent>
>
>   <artifactId>cars_net</artifactId>
>
>   <packaging>jar</packaging>
>
>   <name>CARS paper accounting net module (ftp and email)</name>
>
>   <build>
>       <finalName>${pom.artifactId}-${pom.version}</finalName>
>   </build>
>
>   <!-- =========================== -->
>
>   <dependencies>
>       <dependency>
>           <groupId>edtftpj-pro</groupId>
>           <artifactId>edtftpj-pro</artifactId>
>           <version>2.1.0</version>
>       </dependency>
>
>       <dependency>
>           <groupId>edtftpj-pro</groupId>
>           <artifactId>license</artifactId>
>           <version>1.0</version>
>       </dependency>
>
>       <dependency>
>           <groupId>commons-lang</groupId>
>           <artifactId>commons-lang</artifactId>
>           <version>2.4</version>
>       </dependency>
>
>       <dependency>
>           <groupId>commons-logging</groupId>
>           <artifactId>commons-logging</artifactId>
>           <version>1.1.1</version>
>       </dependency>
>
>       <dependency>
>           <groupId>org.apache.commons</groupId>
>           <artifactId>commons-email</artifactId>
>           <version>1.1</version>
>       </dependency>
>   </dependencies>
> </project>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: maven always wants to download pom?

Posted by Rusty Wright <ru...@gmail.com>.
Thanks Wayne and Wendy; that was it.

Sorry, I was wrong about using the web site's documentation; the maven command I'm using in my copy.sh is the one from the error message from maven when it can't find the artifact:

Downloading: http://repo1.maven.org/maven2/edtftpj-pro/edtftpj-pro/2.1.0/edtftpj-pro-2.1.0.pom
Downloading: http://repo1.maven.org/maven2/edtftpj-pro/license/1.0/license-1.0.pom
Downloading: http://repo1.maven.org/maven2/edtftpj-pro/edtftpj-pro/2.1.0/edtftpj-pro-2.1.0.jar
Downloading: http://repo1.maven.org/maven2/edtftpj-pro/license/1.0/license-1.0.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) edtftpj-pro:edtftpj-pro:jar:2.1.0

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=edtftpj-pro -DartifactId=edtftpj-pro -Dversion=2.1.0 -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there:
      mvn deploy:deploy-file -DgroupId=edtftpj-pro -DartifactId=edtftpj-pro -Dversion=2.1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  ... etc.



Wendy Smoak wrote:
> On Fri, Oct 10, 2008 at 2:04 PM, Rusty Wright <ru...@gmail.com> wrote:
>> Why is this happening?  Every time I compile it's trying to download a pom
>> for something I installed in my local repository.
> 
> It's trying to download the pom because you don't have the pom in your
> local repo.
> 
> Change your 'mvn install:install-file ...' command to include
> -DgeneratePom=true.  (The default is false, for some reason...)
> 
> http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html#generatePom
> 
>> What's in copy.sh is what I got from the documentation on the
>> maven.apache.org web page:
> 
> Which page, so we can improve it?
> 

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


Re: maven always wants to download pom?

Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Oct 10, 2008 at 2:04 PM, Rusty Wright <ru...@gmail.com> wrote:
> Why is this happening?  Every time I compile it's trying to download a pom
> for something I installed in my local repository.

It's trying to download the pom because you don't have the pom in your
local repo.

Change your 'mvn install:install-file ...' command to include
-DgeneratePom=true.  (The default is false, for some reason...)

http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html#generatePom

> What's in copy.sh is what I got from the documentation on the
> maven.apache.org web page:

Which page, so we can improve it?

-- 
Wendy

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