You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Brian Topping <to...@codehaus.org> on 2010/05/11 20:52:12 UTC

No such archiver: 'swf'.

We've been successfully using Flex-mojos with our projects under Maven.  It's been working well, but we need to include the .swf artifacts that are generated in an assembly.  That seems to be failing, and I get the following error:

Caused by: org.codehaus.plexus.archiver.manager.NoSuchArchiverException: No such archiver: 'swf'.
	at org.codehaus.plexus.archiver.manager.DefaultArchiverManager.getResourceCollection(DefaultArchiverManager.java:90)
	at org.codehaus.plexus.archiver.manager.DefaultArchiverManager.getResourceCollection(DefaultArchiverManager.java:128)
	at org.codehaus.plexus.archiver.AbstractArchiver.asResourceCollection(AbstractArchiver.java:506)

My assembly descriptor, for reference, is pretty simple:

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
    <id>php-webapp</id>
    <formats>
        <format>zip</format>
    </formats>
    <dependencySets>
        <dependencySet>
            <includes>
              <include>*:swf:*</include>
            </includes>
            <outputDirectory>/</outputDirectory>
            <unpack>false</unpack>
        </dependencySet>
	</dependencySets>
	<fileSets>
		<fileSet>
			<directory>src/main/php</directory>
			<outputDirectory>/</outputDirectory>
		</fileSet>
	</fileSets>
</assembly>

Is this the best way to compose the assembly?  If it is, I presume that I need to create and add an archiver that can deal with .swf (treating it as an opaque blob, presumably).  If not, it would be pretty easy to write a plugin, but I can't imagine I'm the only person running into this issue.

Thanks for any thoughts,

Brian

RE: No such archiver: 'swf'.

Posted by Martin Gainty <mg...@hotmail.com>.
even you can zip the swf you'll still have to deal with .fla and .flv

 

you might want to consider a custom mojo which overrides getSerializingDependency e.g.

 

    public NodeVisitor getSerializingDependency( Writer writer )
    {
        if (  ("swf".equals( outputType ))  || ("fla".equals( outputType ) ) || ("flv".equals(outputType)))
        {
            return new GraphmlDependencyNodeVisitor( writer );
        }
...

     }

 

BTW: your NodeVisitor can extend org.apache.maven.plugin.dependency.treeSerializers.AbstractSerializingVisitor

 

hth
Martin Gainty 
______________________________________________ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité


 
Ez az üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.



 

> From: JNord@nds.com
> To: users@maven.apache.org
> Date: Fri, 14 May 2010 17:32:07 +0100
> Subject: RE: No such archiver: 'swf'.
> 
> I do pretty much the same but specify the group and artifact of the swf (not classifier or type) and it works, so that may give you a workaround requiring no coding.
> 
> /James
> -----Original Message-----
> From: Jörg Schaible [mailto:joerg.schaible@gmx.de]
> Sent: 14 May 2010 16:15
> To: users@maven.apache.org
> Subject: Re: No such archiver: 'swf'.
> 
> Brian Fox wrote:
> 
> > Take a look at the patch for this issue:
> > http://jira.codehaus.org/browse/MDEP-183
> >
> > You would need to do something along the same lines, possibly
> > introducing your own archiver impl, but this shows how you map the
> > extension to the impl.
> 
> Shouldn't the flex mojo already declare in its own component.xml this
> unarchiver and all that is necessary for the dependency-plugin is an
> <extensions>true</extensions> configuration?
> 
> - Jörg
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> **************************************************************************************
> This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.
> 
> NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
> **************************************************************************************
 		 	   		  
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1

RE: No such archiver: 'swf'.

Posted by "Nord, James" <JN...@nds.com>.
I do pretty much the same but specify the group and artifact of the swf (not classifier or type) and it works, so that may give you a workaround requiring no coding.

/James
-----Original Message-----
From: Jörg Schaible [mailto:joerg.schaible@gmx.de]
Sent: 14 May 2010 16:15
To: users@maven.apache.org
Subject: Re: No such archiver: 'swf'.

Brian Fox wrote:

> Take a look at the patch for this issue:
> http://jira.codehaus.org/browse/MDEP-183
>
> You would need to do something along the same lines, possibly
> introducing your own archiver impl, but this shows how you map the
> extension to the impl.

Shouldn't the flex mojo already declare in its own component.xml this
unarchiver and all that is necessary for the dependency-plugin is an
<extensions>true</extensions> configuration?

- Jörg



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



**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

Re: No such archiver: 'swf'.

Posted by Jörg Schaible <jo...@gmx.de>.
Brian Fox wrote:

> Take a look at the patch for this issue:
> http://jira.codehaus.org/browse/MDEP-183
> 
> You would need to do something along the same lines, possibly
> introducing your own archiver impl, but this shows how you map the
> extension to the impl.

Shouldn't the flex mojo already declare in its own component.xml this 
unarchiver and all that is necessary for the dependency-plugin is an 
<extensions>true</extensions> configuration?

- Jörg



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


Re: No such archiver: 'swf'.

Posted by Brian Topping <to...@codehaus.org>.
Thanks Brian, I saw that configuration and realized that was one solution, but needed a non-SNAPSHOT means of completing the task.  I don't know the criteria that an issue gets promoted to configuration level options, but it seems like this issue periodically comes up as new archive formats are created.  It might be useful to have this as build-level configuration

It turns out that 'swc' *is* supported, 'swf' is not.  That actually makes sense, I can't imagine a situation where one would want to create a flattened archive with the contents of a swf since it is already a self-contained module with a single entry point.  This is how I realized I was using the wrong tool for the job, assembly:single with <dependencySet> seems to want to flatten the contents of the dependency into the output archive, where I wanted to include the dependency directly.  

Someone on the flexmojos list pointed out that I could use dependency:copy to handle this.  (So many plugins, so little time ;-))  That's working for me now.

One thing that seems relevant as a general Maven point-of-note, flexmojos has a goal called copy-flex-resources which takes any flex dependencies and adds them to the output WAR for this specific POM, and it gives a warning if the output artifact is not a WAR.  It's convenient, but not a universally applicable solution (such as when the flex resources need to be included in a zip archive).  So the general inquiry here is how dependency artifacts of opaque and previously undefined types should be included into archives such as .zip or .war.  Is this kind of copy-flex-resources thing the best way to do it everywhere?  If not, any thoughts on a better means?

On May 14, 2010, at 10:37 AM, Brian Fox wrote:

> Take a look at the patch for this issue:
> http://jira.codehaus.org/browse/MDEP-183
> 
> You would need to do something along the same lines, possibly
> introducing your own archiver impl, but this shows how you map the
> extension to the impl.
> 
> On Tue, May 11, 2010 at 2:52 PM, Brian Topping <to...@codehaus.org> wrote:
>> We've been successfully using Flex-mojos with our projects under Maven.  It's been working well, but we need to include the .swf artifacts that are generated in an assembly.  That seems to be failing, and I get the following error:
>> 
>> Caused by: org.codehaus.plexus.archiver.manager.NoSuchArchiverException: No such archiver: 'swf'.
>>        at org.codehaus.plexus.archiver.manager.DefaultArchiverManager.getResourceCollection(DefaultArchiverManager.java:90)
>>        at org.codehaus.plexus.archiver.manager.DefaultArchiverManager.getResourceCollection(DefaultArchiverManager.java:128)
>>        at org.codehaus.plexus.archiver.AbstractArchiver.asResourceCollection(AbstractArchiver.java:506)
>> 
>> My assembly descriptor, for reference, is pretty simple:
>> 
>> <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
>>    <id>php-webapp</id>
>>    <formats>
>>        <format>zip</format>
>>    </formats>
>>    <dependencySets>
>>        <dependencySet>
>>            <includes>
>>              <include>*:swf:*</include>
>>            </includes>
>>            <outputDirectory>/</outputDirectory>
>>            <unpack>false</unpack>
>>        </dependencySet>
>>        </dependencySets>
>>        <fileSets>
>>                <fileSet>
>>                        <directory>src/main/php</directory>
>>                        <outputDirectory>/</outputDirectory>
>>                </fileSet>
>>        </fileSets>
>> </assembly>
>> 
>> Is this the best way to compose the assembly?  If it is, I presume that I need to create and add an archiver that can deal with .swf (treating it as an opaque blob, presumably).  If not, it would be pretty easy to write a plugin, but I can't imagine I'm the only person running into this issue.
>> 
>> Thanks for any thoughts,
>> 
>> Brian
> 
> ---------------------------------------------------------------------
> 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: No such archiver: 'swf'.

Posted by Brian Fox <br...@infinity.nu>.
Take a look at the patch for this issue:
http://jira.codehaus.org/browse/MDEP-183

You would need to do something along the same lines, possibly
introducing your own archiver impl, but this shows how you map the
extension to the impl.

On Tue, May 11, 2010 at 2:52 PM, Brian Topping <to...@codehaus.org> wrote:
> We've been successfully using Flex-mojos with our projects under Maven.  It's been working well, but we need to include the .swf artifacts that are generated in an assembly.  That seems to be failing, and I get the following error:
>
> Caused by: org.codehaus.plexus.archiver.manager.NoSuchArchiverException: No such archiver: 'swf'.
>        at org.codehaus.plexus.archiver.manager.DefaultArchiverManager.getResourceCollection(DefaultArchiverManager.java:90)
>        at org.codehaus.plexus.archiver.manager.DefaultArchiverManager.getResourceCollection(DefaultArchiverManager.java:128)
>        at org.codehaus.plexus.archiver.AbstractArchiver.asResourceCollection(AbstractArchiver.java:506)
>
> My assembly descriptor, for reference, is pretty simple:
>
> <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
>    <id>php-webapp</id>
>    <formats>
>        <format>zip</format>
>    </formats>
>    <dependencySets>
>        <dependencySet>
>            <includes>
>              <include>*:swf:*</include>
>            </includes>
>            <outputDirectory>/</outputDirectory>
>            <unpack>false</unpack>
>        </dependencySet>
>        </dependencySets>
>        <fileSets>
>                <fileSet>
>                        <directory>src/main/php</directory>
>                        <outputDirectory>/</outputDirectory>
>                </fileSet>
>        </fileSets>
> </assembly>
>
> Is this the best way to compose the assembly?  If it is, I presume that I need to create and add an archiver that can deal with .swf (treating it as an opaque blob, presumably).  If not, it would be pretty easy to write a plugin, but I can't imagine I'm the only person running into this issue.
>
> Thanks for any thoughts,
>
> Brian

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