Thanks for that,

but unfortunately its still not working for me.

My "Assembly-Descriptor" project now has the assembly-desc.xml under 
src/main/resources/assemblies. In the resulting jar file I see the package 
"assemblies" with the xml.

In the rest projects i didnt change anything.

My project "Assembly-project" has the dependency to the Descriptor project, but 
I get the same error.

Interesstingly it says

[4] [INFO] Failed to resolve classpath resource: assemblies/assembly-des.xml 
from classloader: org.codehaus.classworlds.realmclassloa...@7c3885

 
but in the deps of the project there is the descriptor project and with it the 
xml file :-(

I'm using maven2 and the maven-assembly-plugin in 2.2-beta-5.

Anymore hints for that ?

Thanks

 


 

 

-----Original Message-----
From: Vincent Latombe <[email protected]>
To: Maven Users List <[email protected]>
Sent: Tue, Sep 7, 2010 7:26 pm
Subject: Re: sharing assembly descriptor


Hi,



- first, you need to put your assembly under

src/main/resources/*assemblies* (as

indicated in the link you provided)

- then, you should be able to reference either the xml using the descriptor

tag like you did



2010/9/7 <[email protected]>



> Hi all,

>

> I'm trying to use a shared assembly descriptor as described in

> http://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html

>

> Unfortunately it fails with

>

> Error:

> java.net.MalformedURLException: no protocol: assembly-desc.xml

>

> My setup is:

>

> 1) A project calles "Assembly-Descriptor" which has the file

> "assembly-desc.xml" under src/main/resources. This is packaged in a jar and

> installed in my local repository

> 2) A project called "Assembly-parent" which is the parent pom for all

> projects which require the descriptor. This is packaged as pom and the pom

> contains:

> <dependencies>

>        <dependency>

>            <groupId>de.test-fw</groupId>

>            <artifactId>Assembly-Descriptor</artifactId>

>            <version>0.0.1-SNAPSHOT</version>

>        </dependency>

>    </dependencies>

>    <build>

>        <pluginManagement>

>            <plugins>

>                <plugin>

>                    <artifactId>maven-assembly-plugin</artifactId>

>                    <version>2.2-beta-5</version>

>                    <configuration>

>                        <descriptors>

>                            <descriptor>assembly-desc.xml</descriptor>

>                        </descriptors>

>                    </configuration>

>                    <executions>

>                        <execution>

>                            <id>make-assembly</id>

>                            <phase>package</phase>

>                            <goals>

>                                <goal>single</goal>

>                            </goals>

>                        </execution>

>                    </executions>

>                </plugin>

>            </plugins>

>        </pluginManagement>

>    </build>

> 3) A project called "Assembly-project", which finally shall use the shared

> descriptor. Its packaged as jar and has the "Assembly-parent" as parent pom.

> Its pom only contains additionally

> <build>

>        <plugins>

>            <plugin>

>                <artifactId>maven-assembly-plugin</artifactId>

>            </plugin>

>        </plugins>

>    </build>

>

> Running this results in the error that it does not find the

> assembly-desc.xml file. The "Assembly-project" does have the dependency to

> the "Assembly-Descriptor" project.

>

> What is going wrong ?

>

> Thanks

>

>

>

>

>

>

>





-- 

Vincent




 

Reply via email to