Hi John, 

I see two issues below. The first is that the includes/excludes is only 
available in 2.0-alpha-5-SNAPSHOT. The second is more to your question. You can 
skip specifying a version in the artifactItems if you put that dependency 
version in your dependencyManagement section. Then you can also omit it in your 
dependencies declaration and have only one place to control the version.

--Brian

-----Original Message-----
From: John Coleman [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 16, 2007 8:09 AM
To: Maven Users List
Subject: RE: expand war deps

Hi Stephane,

I grafted an example off the dependency plugin site, but it didn't go too well 
as you can see below! I just want to unpack that JAR instead of add it to lib 
directory.

Any ideas what is wrong? I'm a bit concerned that I have both a declared 
dependency at the top of my pom and then this plugin configuration - could that 
lead to version conflicts, will the plugin config default to the previously 
declared version?

TIA
John



        <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack</id>
                        <phase>package</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.eurobase</groupId>
                                    <artifactId>common-wac</artifactId>
                                    <!--version>1.3-SNAPSHOT</version-->
                                    <type>jar</type>
                                    <overWrite>false</overWrite>
                                    
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
                                    <includes>**/*.class,**/*.xml</includes>
                                    <excludes>**/*test.class</excludes>
                                </artifactItem>
                            </artifactItems>
                            <includes>**/*.java</includes>
                            <excludes>**/*.properties</excludes>
                            
<outputDirectory>${project.build.directory}/wars</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

[INFO]Failed to configure plugin parameters for: 
org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-4



Cause: Cannot find setter nor field in 
org.apache.maven.plugin.dependency.fromConfiguration.ArtifactItem for 'includes'
[INFO]------------------------------------------------------------------------
[DEBUG]Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: 
org.apache.maven.plugins:maven-dependency-plugin. Reason: Unable to parse the 
created DOM for plugin configuration

        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:639)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:551)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:530)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:309)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:276)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:393)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:182)
        at 
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:760)
        at 
org.codehaus.mevenide.netbeans.execute.MavenJavaExecutor.run(MavenJavaExecutor.java:257)
        at 
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:131)



-----Original Message-----
From: Stephane Nicoll [mailto:[EMAIL PROTECTED] 
Sent: 15 August 2007 19:26
To: Maven Users List
Subject: Re: expand war deps

Hi,

Yep you'll need to setup resources:unpack in the generate-resources
phase. Next version of the WAR plugin has a new overlay handling but
we do not consider handling jars for the moment.

Regards,
Stéphane

On 8/15/07, John Coleman <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
>
> I have a WAR project that depends on a JAR.
>
>
>
> Can I expand the contents of the JAR dependency into my webapps classes
> directory automatically with a setting, or do I have to do something
> more manual like setting up a dependency:unpack? Anyone got an example
> pls.
>
>
>
> TIA
>
> John
>
>
>
>
> Eurobase International Limited and its subsidiaries (Eurobase) are unable to 
> exercise control over the content of information in E-Mails. Any views and 
> opinions expressed may be personal to the sender and are not necessarily 
> those of Eurobase. Eurobase will not enter into any contractual obligations 
> in respect of any part of its business in any E-mail.
>
> Privileged / confidential information may be contained in this message and 
> /or any attachments. This E-mail is intended for the use of the addressee(s) 
> only and may contain confidential information. If you are not the / an 
> intended recipient, you are hereby notified that any use or dissemination of 
> this communication is strictly prohibited.  If you receive this transmission 
> in error, please notify us immediately, and then delete this E-mail.
>
> Neither the sender nor Eurobase accepts any liability whatsoever for any 
> defects of any kind either in or arising from this E-mail transmission. 
> E-Mail transmission cannot be guaranteed to be secure or error-free, as 
> messages can be intercepted, lost, corrupted, destroyed, contain viruses, or 
> arrive late or incomplete. Eurobase does not accept any responsibility for 
> viruses and it is your responsibility to scan any attachments.
>
> Eurobase Systems Limited is the main trading company in the Eurobase 
> International Group; registered in England and Wales as company number 
> 02251162; registered address: Essex House, 2 County Place, Chelmsford, Essex 
> CM2 0RE, UK.
>
>


-- 
Large Systems Suck: This rule is 100% transitive. If you build one,
you suck" -- S.Yegge

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to