You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Brad Harper <br...@epsiia.com> on 2006/07/13 18:04:05 UTC

Error in Project Attempting to Use maven-install-plugin with 'lib' Packaging

Hello All:

I'm using M2 'maven-native-plugin' to build C++ libraries and apps. Within
the
overall project structure I have a module to handle a set of 3rd-party
(library) artifacts. Some of these are native libraries (without source) and
some are
built from open source.

I'd like to run

   % mvn install

in the 3rd-party module and have the pre-built libraries simply copied
into the local repository with an </artifactId> that can be expressed in
the </dependencyManagement> part elsewhere.

The POM descriptor for one of these native library sub-modules contains

  <packaging>lib</packaging>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-install-plugin</artifactId>
        <executions>
          <execution>
            <id>install-library</id>
            <phase>install</phase>
            <configuration>
              <groupId>com-epsiia-dxr-third-party</groupId>
              <artifactId>dxr-third-party-com-emc-\
                            centera-fplibrary-WINDOWS-X86</artifactId>
              <version>2.0SP1</version>
              <packaging>lib</packaging>
              <file>FPLibrary.lib</file>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

but maven complains

  [ERROR] BUILD ERROR
  [INFO] ----
  [INFO] Cannot find lifecycle mapping for packaging: 'lib'
  Component descriptor cannot be found in the component \
  repository: org.apache.maven.lifecyle.mapping.LifecycleMappinglib.

The 'maven-native-plugin' is supplied by codehaus.org and the plugin's
use is declared in an ancestor POM descriptor. In modules where C++
source is compiled/linked, the 'install' goal moves the resulting
artifact into the repository.

Any thoughts on how to get 'maven-install-plugin' to acknowledge the
'lib' packaging?

Thanks.

Brad


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


RE: Error in Project Attempting to Use maven-install-plugin with 'lib' Packaging

Posted by Brad Harper <br...@epsiia.com>.
Dan:

I realize that it could be a one-time thing, and I've already
confirmed that  'install:install-file' works (after having to
build 'maven-install-plugin' locally).

It occurred to me that I might be able to add/update the repository
with these third-party binaries automatically, as part of the
normal course for building and installing the *other* third-party
libraries.

Brad

-----Original Message-----
From: dan tran [mailto:dantran@gmail.com]
Sent: Thursday, July 13, 2006 11:27 AM
To: Maven Users List
Subject: Re: Error in Project Attempting to Use maven-install-plugin
with 'lib' Packaging


Brad, since this is a one time shot, install:install-file should work, if
not it is a bug, please file a jira

Another alter native is to use build-helper-maven-plugin to attach your
thirdparty binary to the pom, after that mvn install should work


-Dan



On 7/13/06, Brad Harper <br...@epsiia.com> wrote:
>
> Hello All:
>
> I'm using M2 'maven-native-plugin' to build C++ libraries and apps. Within
> the
> overall project structure I have a module to handle a set of 3rd-party
> (library) artifacts. Some of these are native libraries (without source)
> and
> some are
> built from open source.
>
> I'd like to run
>
>   % mvn install
>
> in the 3rd-party module and have the pre-built libraries simply copied
> into the local repository with an </artifactId> that can be expressed in
> the </dependencyManagement> part elsewhere.
>
> The POM descriptor for one of these native library sub-modules contains
>
> <packaging>lib</packaging>
>
> <build>
>    <plugins>
>      <plugin>
>        <artifactId>maven-install-plugin</artifactId>
>        <executions>
>          <execution>
>            <id>install-library</id>
>            <phase>install</phase>
>            <configuration>
>              <groupId>com-epsiia-dxr-third-party</groupId>
>              <artifactId>dxr-third-party-com-emc-\
>                            centera-fplibrary-WINDOWS-X86</artifactId>
>              <version>2.0SP1</version>
>              <packaging>lib</packaging>
>              <file>FPLibrary.lib</file>
>            </configuration>
>          </execution>
>        </executions>
>      </plugin>
>    </plugins>
> </build>
>
> but maven complains
>
> [ERROR] BUILD ERROR
> [INFO] ----
> [INFO] Cannot find lifecycle mapping for packaging: 'lib'
> Component descriptor cannot be found in the component \
> repository: org.apache.maven.lifecyle.mapping.LifecycleMappinglib.
>
> The 'maven-native-plugin' is supplied by codehaus.org and the plugin's
> use is declared in an ancestor POM descriptor. In modules where C++
> source is compiled/linked, the 'install' goal moves the resulting
> artifact into the repository.
>
> Any thoughts on how to get 'maven-install-plugin' to acknowledge the
> 'lib' packaging?
>
> Thanks.
>
> Brad
>
>
> ---------------------------------------------------------------------
> 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: Error in Project Attempting to Use maven-install-plugin with 'lib' Packaging

Posted by dan tran <da...@gmail.com>.
Brad, since this is a one time shot, install:install-file should work, if
not it is a bug, please file a jira

Another alter native is to use build-helper-maven-plugin to attach your
thirdparty binary to the pom, after that mvn install should work


-Dan



On 7/13/06, Brad Harper <br...@epsiia.com> wrote:
>
> Hello All:
>
> I'm using M2 'maven-native-plugin' to build C++ libraries and apps. Within
> the
> overall project structure I have a module to handle a set of 3rd-party
> (library) artifacts. Some of these are native libraries (without source)
> and
> some are
> built from open source.
>
> I'd like to run
>
>   % mvn install
>
> in the 3rd-party module and have the pre-built libraries simply copied
> into the local repository with an </artifactId> that can be expressed in
> the </dependencyManagement> part elsewhere.
>
> The POM descriptor for one of these native library sub-modules contains
>
> <packaging>lib</packaging>
>
> <build>
>    <plugins>
>      <plugin>
>        <artifactId>maven-install-plugin</artifactId>
>        <executions>
>          <execution>
>            <id>install-library</id>
>            <phase>install</phase>
>            <configuration>
>              <groupId>com-epsiia-dxr-third-party</groupId>
>              <artifactId>dxr-third-party-com-emc-\
>                            centera-fplibrary-WINDOWS-X86</artifactId>
>              <version>2.0SP1</version>
>              <packaging>lib</packaging>
>              <file>FPLibrary.lib</file>
>            </configuration>
>          </execution>
>        </executions>
>      </plugin>
>    </plugins>
> </build>
>
> but maven complains
>
> [ERROR] BUILD ERROR
> [INFO] ----
> [INFO] Cannot find lifecycle mapping for packaging: 'lib'
> Component descriptor cannot be found in the component \
> repository: org.apache.maven.lifecyle.mapping.LifecycleMappinglib.
>
> The 'maven-native-plugin' is supplied by codehaus.org and the plugin's
> use is declared in an ancestor POM descriptor. In modules where C++
> source is compiled/linked, the 'install' goal moves the resulting
> artifact into the repository.
>
> Any thoughts on how to get 'maven-install-plugin' to acknowledge the
> 'lib' packaging?
>
> Thanks.
>
> Brad
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>