Have you tried first running:
mvn install

To install the dependencies into your local repo, so they are found
during the later build process?

Obviously you'd rather do it all in one step, but this might be a
solution your problem.

Wayne

On 4/13/06, SkipWalker <[EMAIL PROTECTED]> wrote:
>
> I'm trying to get around using the webstart plugin that isn't ready for
> primetime.  In order to do that, I'm trying to use the codehause dependency
> plugin to copy my webstart application project jar, it's other project
> dependencies, and some 3rd party dependencies into a directory in my webapp
> output so they will become part of the resulting war.
>
> I'm trying to do something along the lines of the first suggestion at
> codehaus for the webstart plugin, just not using the webstart plugin itself,
> just the dependency plugin.
>
> http://mojo.codehaus.org/webstart-maven-plugin-parent/webstart-maven-plugin/howto.html
>
> I'm running into the problem that the dependency copy won't copy my own
> project jars common.jar, and webstart-client.jar saying it can't resolve the
> artifacts.  I guess it's looking in the repo and not finding the jars.
>
> The dependency:copy plugin is working fine for the 3rd party dependencies,
> copying them into the appropriate place.  The build is just balking at
> copying my own jars that were created earlier in the multi-project build.
>
> So I guess the crux of my question in is, how can I copy the resulting jars
> from the other projects in my multi-project build into a directory in my
> webapp before it gets packaged?
>
> Any help is appreciated.
>
> Here's the error
> _____________________________________________________________
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>
> GroupId: com.myorg
> ArtifactId: common
> Version: 1.0-SNAPSHOT
>
> Reason: 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.myorg -DartifactId=common\
>        -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
>
>
>  com.myorg:common:jar:1.0-SNAPSHOT
>
> from the specified remote repositories:
>
>  central (http://repo1.maven.org/maven2),
>
> _____________________________________________________
>
> Here's more about my setup:
>
> I've tried this with maven 2.0.3. and 2.0.4
>
> I've got a pretty standard setup.
>
> projects/pom.xml
> projects/common/pom.xml
> projects/webstart-client/pom.xml
> projects/webapp/pom.xml
>
>
> I need to copy the resulting jar artifact from the common project and the
> resulting jar from the webstart-client project into the webapp's client
> directory.
>
> So, in my webapp pom.xml I have:
>
>            <plugin>
>                <groupId>org.codehaus.mojo</groupId>
>                <artifactId>dependency-maven-plugin</artifactId>
>                <executions>
>                    <execution>
>                        <!--
>                            Copy the webstart bundle in as a resource
>                            before packaging starts.
>                        -->
>                        <phase>process-resources</phase>
>                        <goals>
>                            <goal>copy</goal>
>                        </goals>
>                    </execution>
>                </executions>
>                <configuration>
>                    <artifactItems>
>                        <artifactItem>
>                            <groupId>com.myorg</groupId>
>                            <artifactId>common</artifactId>
>                            <version>1.0-SNAPSHOT</version>
>                            <type>jar</type>
>                        </artifactItem>
>                        <artifactItem>
>                            <groupId>com.myorg</groupId>
>                            <artifactId>webstart-client</artifactId>
>                            <version>1.0-SNAPSHOT</version>
>                            <type>jar</type>
>                        </artifactItem>
>                        <artifactItem>
>                            <groupId>jgoodies</groupId>
>                            <artifactId>binding</artifactId>
>                            <version>1.1</version>
>                            <type>jar</type>
>                        </artifactItem>
> <!-- ... other 3rd party libraries -->
>                    </artifactItems>
>
> <outputDirectory>${project.build.directory}/${project.build.finalName}/client</outputDirectory>
>                </configuration>
>            </plugin>
>        </plugins>
>        <finalName>mywebapp</finalName>
>    </build>
>
>    <dependencies>
>        <!-- other module dependencies -->
>        <dependency>
>            <groupId>com.myorg</groupId>
>            <artifactId>common</artifactId>
>            <version>1.0-SNAPSHOT</version>
>            <scope>compile</scope>
>        </dependency>
>        <dependency>
>            <groupId>com.myorg</groupId>
>            <artifactId>webstart-client</artifactId>
>            <version>1.0-SNAPSHOT</version>
>            <scope>compile</scope>
>        </dependency>
> ...
>
> Thanks,
> Skip
>
>
> --
> View this message in context: 
> http://www.nabble.com/Multi-Project-Build%3A-copy-resulting-jars-into-dependent-webapp-t1446168.html#a3906335
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to