views:

23

answers:

1

Hi all,

I have another project which contains static content (css, images, JS, etc.), and I need that to be copied to the web root directory of jetty for testing. In that project, I output a zip file packaging up all of the images, CSS, etc.

I have several of those virtualhost projects for different clients and my question is, how do I unpack the zip file that was already installed into the maven repository to the jetty web root?

@Update:

Embedded error: Unable to download the artifact from any repository

Try downloading the file manually from the project website.

Then, install it using the command:
    mvn install:install-file -DgroupId= com.virtualhost -DartifactId=something
-Dversion=0.0.1 -Dpackaging=zip -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
    mvn deploy:deploy-file -DgroupId=c com.virtualhost -DartifactId=something-D
version=0.0.1 -Dpackaging=zip -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[i
d]


  com.virtualhost:something:zip:0.0.1

Walter

A: 

It should be possible with dependency:unpack than you could bind on prepare-package phase. See Unpacking specific artifacts for an example (in you case, use a <type>zip</type>).

Pascal Thivent
That file is in the repository as .zip using the maven assembly plugin.
@Walter Yes... and your point is? You *can* depend on an assembly artifact. Aren't you missing a classifier?
Pascal Thivent
@Pascal, it appears that the file is being installed under another name which is causing it to not be seen by the dependency plugin.
@Pascal, how do you respond so quickly to questions? Are you refreshing the page (the main icon at the top changes colors), or is there an extension for Chrome or Firefox or something?
@Walter It depends on your configuration but the assembly plugin is very likely appending the assemblyId during `install` (that's the "normal" behavior).
Pascal Thivent
@Walter I have a 6th sense (and a RSS feed plus some fortuity). Here, I refreshed SO and saw the envelope at the top of the page :)
Pascal Thivent
@Pascal, ic, I totally missed that option (<classifier>). Thanks much.