maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <j...@codehaus.org>
Subject [jira] (MDEP-108) update site to show how to inject custom unarchiver
Date Thu, 07 Aug 2014 19:30:10 GMT

     [ https://jira.codehaus.org/browse/MDEP-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Robert Scholte updated MDEP-108:
--------------------------------

    Description: 
I'have developed a Maven plugin that defines a new packaging type. Produced artifacts with
this packaging type, have a "car" extension.
Modules, that depends on "car" modules must unpack them to use them. To do so, I configure
the maven-dependency-plugin like this (note that "cecilia-lib" is the name of the packaging
type I've defined):
{code:xml}
<plugin>
  <artifactId>maven-dependency-plugin</artifactId>
  <executions>
    <execution>
      <id>unpack</id>
      <phase>process-resources</phase>
      <goals>
        <goal>unpack-dependencies</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <includeTypes>cecilia-lib</includeTypes>
  </configuration>
</plugin>
{code}
Here, I get the error : 
{noformat}
Unknown archiver type
Embedded error: No such archiver: 'car'.
{noformat}
After some investigations, I add the following in the plexus/components.xml of my plugin:
{code:xml}
<component>
  <role>org.codehaus.plexus.archiver.UnArchiver</role>
  <role-hint>car</role-hint>
  <!-- there is no implementaion of CarUnArchiver, but ZipUnArchive will do the job -->
  <implementation>org.codehaus.plexus.archiver.zip.ZipUnArchiver</implementation>
  <instantiation-strategy>per-lookup</instantiation-strategy>
</component>
{code}
But I still get the same error.

If I had somewhere in my plugin the following code:
{code}
  container.lookup( "org.codehaus.plexus.archiver.Archiver", "car");
  archiverManager.getUnArchiver( "car" )
{code}
It works correctly...

So I can't figure out why it doesn't work from the dependency plugin.


  was:
I'have developed a Maven plugin that defines a new packaging type. Produced artifacts with
this packaging type, have a "car" extension.
Modules, that depends on "car" modules must unpack them to use them. To do so, I configure
the maven-dependency-plugin like this (note that "cecilia-lib" is the name of the packaging
type I've defined):
<plugin>
  <artifactId>maven-dependency-plugin</artifactId>
  <executions>
    <execution>
      <id>unpack</id>
      <phase>process-resources</phase>
      <goals>
        <goal>unpack-dependencies</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <includeTypes>cecilia-lib</includeTypes>
  </configuration>
</plugin>

Here, I get the error : 
Unknown archiver type
Embedded error: No such archiver: 'car'.

After some investigations, I add the following in the plexus/components.xml of my plugin:
<component>
  <role>org.codehaus.plexus.archiver.UnArchiver</role>
  <role-hint>car</role-hint>
  <!-- there is no implementaion of CarUnArchiver, but ZipUnArchive will do the job -->
  <implementation>org.codehaus.plexus.archiver.zip.ZipUnArchiver</implementation>
  <instantiation-strategy>per-lookup</instantiation-strategy>
</component>

But I still get the same error.

If I had somewhere in my plugin the following code:
  container.lookup( "org.codehaus.plexus.archiver.Archiver", "car");
  archiverManager.getUnArchiver( "car" )
It works correctly...

So I can't figure out why it doesn't work from the dependency plugin.



> update site to show how to inject custom unarchiver
> ---------------------------------------------------
>
>                 Key: MDEP-108
>                 URL: https://jira.codehaus.org/browse/MDEP-108
>             Project: Maven Dependency Plugin
>          Issue Type: Improvement
>          Components: unpack-dependencies
>    Affects Versions: 2.0-alpha-4
>            Reporter: Matthieu Leclercq
>            Priority: Minor
>
> I'have developed a Maven plugin that defines a new packaging type. Produced artifacts
with this packaging type, have a "car" extension.
> Modules, that depends on "car" modules must unpack them to use them. To do so, I configure
the maven-dependency-plugin like this (note that "cecilia-lib" is the name of the packaging
type I've defined):
> {code:xml}
> <plugin>
>   <artifactId>maven-dependency-plugin</artifactId>
>   <executions>
>     <execution>
>       <id>unpack</id>
>       <phase>process-resources</phase>
>       <goals>
>         <goal>unpack-dependencies</goal>
>       </goals>
>     </execution>
>   </executions>
>   <configuration>
>     <includeTypes>cecilia-lib</includeTypes>
>   </configuration>
> </plugin>
> {code}
> Here, I get the error : 
> {noformat}
> Unknown archiver type
> Embedded error: No such archiver: 'car'.
> {noformat}
> After some investigations, I add the following in the plexus/components.xml of my plugin:
> {code:xml}
> <component>
>   <role>org.codehaus.plexus.archiver.UnArchiver</role>
>   <role-hint>car</role-hint>
>   <!-- there is no implementaion of CarUnArchiver, but ZipUnArchive will do the job
-->
>   <implementation>org.codehaus.plexus.archiver.zip.ZipUnArchiver</implementation>
>   <instantiation-strategy>per-lookup</instantiation-strategy>
> </component>
> {code}
> But I still get the same error.
> If I had somewhere in my plugin the following code:
> {code}
>   container.lookup( "org.codehaus.plexus.archiver.Archiver", "car");
>   archiverManager.getUnArchiver( "car" )
> {code}
> It works correctly...
> So I can't figure out why it doesn't work from the dependency plugin.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message