You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Benson Margulies <bi...@gmail.com> on 2010/11/15 15:54:10 UTC

dependency:unpack and pathnames and excludes

>From the following spec, I get two behaviors that I need to fix
somehow: (1) I get an extra level of directory named after the
artifact in spite of the empty outputDirectory element. (2) the
excludes are apparently completely ignored. Can anyone assist?

  <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
		<executions>
		  <execution>
		    <id>unpack-wrapper</id>
		    <phase>package</phase>
		    <goals>
		      <goal>unpack</goal>
		    </goals>
		    <configuration>
		      <outputDirectory>${project.build.directory}/wrapper</outputDirectory>
		      <artifactItems>
			<artifactItem>
			  <groupId>tanuki</groupId>
			  <artifactId>wrapper-delta-pack-standard</artifactId>
			  <version>3.5.6</version>
			  <type>tar.gz</type>
			  <outputDirectory/>
			  <excludes>**/bin/DemoApp.bat,**/bin/GetHostId.bat,**/bin/*Test*,**/bin/demoapp/bin/testwrapper,conf/*,**/jdoc,**/jdoc.tar.gz,**/lib/wrapperdemo.jar,**/lib/wrappertest.jar,**/src/conf</excludes>
			</artifactItem>
		      </artifactItems>
		    </configuration>
		  </execution>
		</executions>
	    </plugin>

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


Re: dependency:unpack and pathnames and excludes

Posted by Benson Margulies <bi...@gmail.com>.
It turns out that the extra dir was in fact pirate error. But for the
excludes I've followed your advice.

On Mon, Nov 15, 2010 at 1:16 PM, Jon Paynter <ki...@gmail.com> wrote:
> On Mon, Nov 15, 2010 at 6:54 AM, Benson Margulies <bi...@gmail.com>wrote:
>
>> From the following spec, I get two behaviors that I need to fix
>> somehow: (1) I get an extra level of directory named after the
>> artifact in spite of the empty outputDirectory element. (2) the
>> excludes are apparently completely ignored. Can anyone assist?
>>
>>  <plugin>
>>                <groupId>org.apache.maven.plugins</groupId>
>>                <artifactId>maven-dependency-plugin</artifactId>
>>                <executions>
>>                  <execution>
>>                    <id>unpack-wrapper</id>
>>                    <phase>package</phase>
>>                    <goals>
>>                      <goal>unpack</goal>
>>                    </goals>
>>                    <configuration>
>>
>>  <outputDirectory>${project.build.directory}/wrapper</outputDirectory>
>>                      <artifactItems>
>>                        <artifactItem>
>>                          <groupId>tanuki</groupId>
>>
>>  <artifactId>wrapper-delta-pack-standard</artifactId>
>>                          <version>3.5.6</version>
>>                          <type>tar.gz</type>
>>                          <outputDirectory/>
>>
>>  <excludes>**/bin/DemoApp.bat,**/bin/GetHostId.bat,**/bin/*Test*,**/bin/demoapp/bin/testwrapper,conf/*,**/jdoc,**/jdoc.tar.gz,**/lib/wrapperdemo.jar,**/lib/wrappertest.jar,**/src/conf</excludes>
>>                        </artifactItem>
>>                      </artifactItems>
>>                    </configuration>
>>                  </execution>
>>                </executions>
>>            </plugin>
>>
>
> I found the <excludes> and <includes> tags to be useless, so I went and
> listed each artifact ID individually when doing an unpack.
>
> Also, see if its possible to create your initial tar.gz file so the stuff
> you want to include is already excluded -- then you wont have to try and
> exclude anything.
>

Re: dependency:unpack and pathnames and excludes

Posted by Jon Paynter <ki...@gmail.com>.
On Mon, Nov 15, 2010 at 6:54 AM, Benson Margulies <bi...@gmail.com>wrote:

> From the following spec, I get two behaviors that I need to fix
> somehow: (1) I get an extra level of directory named after the
> artifact in spite of the empty outputDirectory element. (2) the
> excludes are apparently completely ignored. Can anyone assist?
>
>  <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-dependency-plugin</artifactId>
>                <executions>
>                  <execution>
>                    <id>unpack-wrapper</id>
>                    <phase>package</phase>
>                    <goals>
>                      <goal>unpack</goal>
>                    </goals>
>                    <configuration>
>
>  <outputDirectory>${project.build.directory}/wrapper</outputDirectory>
>                      <artifactItems>
>                        <artifactItem>
>                          <groupId>tanuki</groupId>
>
>  <artifactId>wrapper-delta-pack-standard</artifactId>
>                          <version>3.5.6</version>
>                          <type>tar.gz</type>
>                          <outputDirectory/>
>
>  <excludes>**/bin/DemoApp.bat,**/bin/GetHostId.bat,**/bin/*Test*,**/bin/demoapp/bin/testwrapper,conf/*,**/jdoc,**/jdoc.tar.gz,**/lib/wrapperdemo.jar,**/lib/wrappertest.jar,**/src/conf</excludes>
>                        </artifactItem>
>                      </artifactItems>
>                    </configuration>
>                  </execution>
>                </executions>
>            </plugin>
>

I found the <excludes> and <includes> tags to be useless, so I went and
listed each artifact ID individually when doing an unpack.

Also, see if its possible to create your initial tar.gz file so the stuff
you want to include is already excluded -- then you wont have to try and
exclude anything.

RE: dependency:unpack and pathnames and excludes

Posted by "Haszlakiewicz, Eric" <EH...@transunion.com>.
________________________________________
>From: Benson Margulies [bimargulies@gmail.com]
>>From the following spec, I get two behaviors that I need to fix somehow: 
>(1) I get an extra level of directory named after the
> artifact in spite of the empty outputDirectory element. 
You might want to check if the artifact you're unpacking has that "extra" directory inside of it.  
If it's in the tarball, then maven can't do anything about it automatically.  

>(2) the excludes are apparently completely ignored. Can anyone assist?
No idea about getting the excludes working.

The way I've handled this in my projects is by unpacking everything, then using the maven-ant-plugin to
copy the things I need to a more convenient place (i.e. w/o the extra directory), and then writing the 
rest of the maven build to use the files from the copied location.

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