You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by turbo-555 <fd...@ticino.com> on 2009/06/17 11:43:57 UTC

Assembly:adding a war module to a tar.gz

hi,

I'm packaging a tar.gz with assembly, I included several filesets from my
project, but now I need to add some files/folders that are in a war (this
war is also taken as an overlay from the project in order to add the
necessary files in the main war package of the project).


I don't understand how I can add the files to my assembled tar.gz...

the war is: com.ctd.webapp.webapp-commons.war-4.5.1-SNAPSHOT (it is
regularly deployed in my local repository) and it is also a dependency in
the pom:

<dependency>
            <groupId>com.ctd.webapp</groupId>
            <artifactId>webapp-commons.war</artifactId>
            <version>${webapp-commons.war.version}</version>
            <type>war</type>
</dependency>


from this war I need to copy a js folder and an index.jsp file (both in the
root directory of the war), but I haven't managed yet to get this done...


i tried to include the whole war:
    <moduleSets>
        <moduleSet>
            <includes>
               
<include>com.ctd.webapp.webapp-commons.war-4.5.1-SNAPSHOT</include>
            </includes>
        </moduleSet>
    </moduleSets>

but:
[WARNING] The following patterns were never triggered in this artifact
inclusion filter:
o  'com.ctd.webapp.webapp-commons.war-4.5.1-SNAPSHOT'

[WARNING] Encountered ModuleSet with no sources or binaries specified.
Skipping.



At first I had:
<fileSet>
 
<directory>overlays/com.ctd.webapp.webapp-commons.war-${webapp-commons.war.version}/js</directory>
  <outputDirectory>js</outputDirectory>
</fileSet>

but this only works where an overlays folder has been created...that's why I
need to replace it..

I tried to follow the guide to set up the plugin...but I haven't understood
how to solve this...


any ideas?

-- 
View this message in context: http://www.nabble.com/Assembly%3Aadding-a-war-module-to-a-tar.gz-tp24070208p24070208.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Assembly:adding a war module to a tar.gz

Posted by turbo-555 <fd...@ticino.com>.
Problem solved:

<dependencySets>
      <dependencySet>
          <includes>
            <include>webapp-commons.war**</include>
          </includes>
          <unpack>true</unpack>
          <unpackOptions>
              <excludes>
                  <exclude>WEB-INF/**</exclude>
                  <exclude>META-INF/**</exclude>
              </excludes>
          </unpackOptions>
      </dependencySet>
  </dependencySets>

by doing so it packages the content of the dependency in my tar.gz, and with
the unpackOptions I make sure the WEB-INF and META-INF folders don't get
packaged.


It wasn't so hard after all was it? :D
-- 
View this message in context: http://www.nabble.com/Assembly%3Aadding-a-war-module-to-a-tar.gz-tp24070208p24073119.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Assembly:adding a war module to a tar.gz

Posted by turbo-555 <fd...@ticino.com>.
I almost solved the problem, I tried once again using the dependencySets...


  <dependencySets>
      <dependencySet>
          <unpack>true</unpack>
          <includes>
            <include>webapp-commons.war**</include>
          </includes>
      </dependencySet>
  </dependencySets>


like this it works, I had to remove "com.ctd.webapp." (can someone explain
to me why?is it because being a project dependency it can handle with less
information?)

now I have to understand also why it works with the ** at the end...I tried
putting there the version number, but it doesn't work...
-- 
View this message in context: http://www.nabble.com/Assembly%3Aadding-a-war-module-to-a-tar.gz-tp24070208p24072957.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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