You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mick Knutson <mi...@gmail.com> on 2007/06/12 00:49:06 UTC

Re: [m2] relocating resource artifacts not in ./classes ANYONE???

I have been hacking at this all day and really need some help please.


this is where I am at:

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>

<source>${basedir}/target/generated-sources</source>
                            </sources>
                            <artifacts>
                                <artifact>
                                    <file>*</file>
                                    <type>java</type>
                                    <classifier>required</classifier>
                                </artifact>
                                <artifact>

<file>${basedir}/target/generated-sources/</file>
                                    <type>xml</type>
                                    <classifier>required</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>


This includes ${basedir}/target/generated-sources/BusinessService.java and
compiles it, but does not include
${basedir}/target/generated-sources/BusinessService-wsdl-mapping.xml into
the war at all.

If I use the <resources> tag I can get it into the war under
/WEB-INF/classes but I need to get it in the war at [root]/WEB-INF/[here]




On 6/11/07, Mick Knutson <mi...@gmail.com> wrote:
>
> I tried the war plugin like this:
>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-war-plugin</artifactId>
>                 <version> 2.0.2</version>
>                 <configuration>
>
> <dependentWarIncludes>${basedir}/target/generated-sources/*.xml</dependentWarIncludes>
>                 </configuration>
>             </plugin>
>
>
> but generated xml files located at
> ${basedir}/target/generated-sources/*.xml do not get included again.
>
>
>
> On 6/11/07, Mick Knutson <mi...@gmail.com> wrote:
> >
> > I have an xml files that is generated and added to
> > ./target/generated-sources/jdev.xml
> >
> > I want to put that into my WAR: /WEB-INF/
> >
> > Right now I can only seem to get it into my WAR: WEB-INF/classes/
> >
> > and that will not work for OAS.
> >
> >
> >
> > On 6/11/07, Barrett Nuzum < Barrett.Nuzum@valtech.com> wrote:
> > >
> > > Hi Mick.
> > >
> > > What exactly are you trying to get in WEB-INF and why?
> > >
> > > I believe most people who need to put additional artifacts in WEB-INF
> > > (say, TLD files)
> > > use either a WAR overlay (http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html
> > > )
> > > or fudge with the dependency plugin (http://maven.apache.org/plugins/maven-dependency-plugin/examples/unpacking-artifacts.html
> > > )
> > > to unpack what they want wherever they want it.
> > >
> > > Barrett
> > >
> > > ::
> > > Barrett Nuzum
> > > Consultant, Skill Development
> > > Direct: 918.640.4414
> > > Fax: 972.789.1340
> > >
> > > Valtech Technologies, Inc.
> > > 5080 Spectrum Drive
> > > Suite 700 West
> > > Addison, Texas 75001
> > > www.valtech.com < http://www.valtech.com/>
> > > making IT business friendly
> > >
> > >
> > > ________________________________
> > >
> > > From: Mick Knutson [mailto:mickknutson@gmail.com]
> > > Sent: Mon 6/11/2007 4:17 PM
> > > To: maven
> > > Subject: Re: [m2] relocating resource artifacts not in ./classes
> > >
> > >
> > >
> > > Anyone have any ideas?
> > >
> > > I also tried to use the build-helper but that only seems to get *.java
> > > files:
> > >
> > >             <plugin>
> > >                 <groupId>org.codehaus.mojo</groupId>
> > >                 <artifactId>build-helper-maven-plugin</artifactId>
> > >                 <executions>
> > >                     <execution>
> > >                         <id>add-source</id>
> > >                         <phase>generate-sources</phase>
> > >                         <goals>
> > >                             <goal>add-source</goal>
> > >                         </goals>
> > >                         <configuration>
> > >                             <sources>
> > >
> > > <source>${basedir}/target/generated-sources</source>
> > >                             </sources>
> > >                             <artifacts>
> > >                                 <artifact>
> > >                                     <file>*</file>
> > >                                     <type>*</type>
> > >
> > >                                     <!--<classifier>optional</classifier>-->
> > >                                 </artifact>
> > >                             </artifacts>
> > >                         </configuration>
> > >                     </execution>
> > >                 </executions>
> > >             </plugin>
> > >
> > >
> > >
> > >
> > >
> > >
> > > On 6/11/07, Mick Knutson < mickknutson@gmail.com > wrote:
> > > >
> > > > I want my resources to go into ./WEB-INF/* not ./WEB-INF/classes/*
> > > >
> > > >         <resources>
> > > >             <resource>
> > > >                 <directory>${basedir}/src/main/resources</directory>
> > >
> > > >                 <filtering>true</filtering>
> > > >             </resource>
> > > >             <resource>
> > > >
> > > <directory>${basedir}/target/generated-sources</directory>
> > > >                 <targetPath>../</targetPath>
> > > >                 <excludes>
> > > >                     <exclude>**/*.java</exclude>
> > > >                 </excludes>
> > > >                 <filtering>true</filtering>
> > > >             </resource>
> > > >         </resources>
> > > >
> > > > The above did not seem to work...
> > > >
> > > >
> > > > --
> > > > ---
> > > > Thanks,
> > > > Mick Knutson
> > > >
> > > > http://www.baselogic.com < http://www.baselogic.com/>
> > > > http://www.blincmagazine.com <http://www.blincmagazine.com/>
> > > > http://www.djmick.com <http://www.djmick.com/ >
> > > > http://www.myspace.com/mickknutson
> > > > http://www.myspace.com/djmick_dot_com
> > > > http://www.myspace.com/sexybeotches
> > > > http://www.thumpradio.com < http://www.thumpradio.com/>
> > > > ---
> > >
> > >
> > >
> > >
> > > --
> > > ---
> > > Thanks,
> > > Mick Knutson
> > >
> > > http://www.baselogic.com < http://www.baselogic.com/>
> > > http://www.blincmagazine.com <http://www.blincmagazine.com/>
> > > http://www.djmick.com <http://www.djmick.com/ >
> > > http://www.myspace.com/mickknutson
> > > http://www.myspace.com/djmick_dot_com
> > > http://www.myspace.com/sexybeotches
> > > http://www.thumpradio.com < http://www.thumpradio.com/>
> > > ---
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > ---
> > Thanks,
> > Mick Knutson
> >
> > http://www.baselogic.com
> > http://www.blincmagazine.com
> > http://www.djmick.com
> > http://www.myspace.com/mickknutson
> > http://www.myspace.com/djmick_dot_com
> > http://www.myspace.com/sexybeotches
> > http://www.thumpradio.com
> > ---
>
>
>
>
> --
> ---
> Thanks,
> Mick Knutson
>
> http://www.baselogic.com
> http://www.blincmagazine.com
> http://www.djmick.com
> http://www.myspace.com/mickknutson
> http://www.myspace.com/djmick_dot_com
> http://www.myspace.com/sexybeotches
> http://www.thumpradio.com
> ---
>



-- 
---
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/djmick_dot_com
http://www.myspace.com/sexybeotches
http://www.thumpradio.com
---