Hi, maybe, I can help you to clarify some maven things. In a standard maven project, those end-to-end tests would normally run in the integration-test phase of the resulted webapp project. Then, you could set up the dependency plugin in the pre-integration-test phase.
Manifold is primary build using ant and follows the some ant conventions e.g. using separate test folders. This requires maven to build extra test projects. The quickstart is an example of how to use the framework. It should be build as the last module after completing all the end-to-tests (maybe you want to change the order?). Regards, Tobias On Wed, Aug 10, 2011 at 1:05 PM, daddy...@gmail.com <daddy...@gmail.com>wrote: > I've thought about this overnight and realized that perhaps the real > problem is that both the end to end tests and the quickstart run should be > in the a phase after install. I wonder is there is any way to make that > happen ? > > Karl > > Sent from my Nokia phone > -----Original Message----- > From: Piergiorgio Lucidi > Sent: 09/08/2011, 10:21 AM > To: connectors-dev@incubator.apache.org > Subject: Re: Does anyone know enough about maven to answer one simple > question? > > > Hi Karl, > > this message just to recap the informations we have talked about during the > chat session. > > Here we have an execution of tests based on some Maven artifacts that must > be generated using an execution of the install phase of Maven. > Maven has it own lifecycle that consists of phases that are executed in a > specific order, you can see the complete list here [1]. > > This means that to allow in our process to have the availability of the new > artifacts, before executing tests, we need to execute maven with the > following command: > > mvn clean install > > The install phase of Maven, as you can see in the page [1], include the > execution of generate-resource phase and test phase, so I think that this > is > the correct way to build and execute tests for the project. > > [1] - > > http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference > > 2011/8/9 Karl Wright <daddy...@gmail.com> > > > A related question: when I run "mvn clean test" I get the following: > > > > >>>>>> > > [ERROR] Failed to execute goal > > org.apache.maven.plugins:maven-dependency-plugin: > > 2.1:copy (copy-war) on project mcf-jettyrunner: Error copying artifact > from > > C:\w > > ip\mcf\trunk\framework\api-service\target\classes to > > C:\wip\mcf\trunk\framework\ > > jetty-runner\target\dependency\classes: File > > C:\wip\mcf\trunk\framework\api-serv > > ice\target\classes does not exist -> [Help 1] > > <<<<<< > > > > This is coming from mcf-jettyrunner, which has dependencies on the > > api-service, crawler-ui, and authority-service wars. These components > > seem to build properly: > > > > >>>>>> > > [INFO] ManifoldCF ........................................ SUCCESS > [0.003s] > > [INFO] ManifoldCF - Framework ............................ SUCCESS > [0.001s] > > [INFO] ManifoldCF - Framework - Core ..................... SUCCESS > [2.864s] > > [INFO] ManifoldCF - Framework - UI Core .................. SUCCESS > [0.678s] > > [INFO] ManifoldCF - Framework - Agents ................... SUCCESS > > [15.180s] > > [INFO] ManifoldCF - Framework - Pull Agent ............... SUCCESS > > [33.034s] > > [INFO] ManifoldCF - Framework - Authority Servlet ........ SUCCESS > [0.832s] > > [INFO] ManifoldCF - Framework - API Servlet .............. SUCCESS > [2.039s] > > [INFO] ManifoldCF - Framework - Authority Service ........ SUCCESS > [0.114s] > > [INFO] ManifoldCF - Framework - API Service .............. SUCCESS > [0.083s] > > [INFO] ManifoldCF - Framework - Crawler UI ............... SUCCESS > [0.088s] > > [INFO] ManifoldCF - Connectors ........................... SUCCESS > [0.001s] > > [INFO] ManifoldCF - Connectors - Active Directory ........ SUCCESS > [0.815s] > > [INFO] ManifoldCF - Connectors - Filesystem .............. SUCCESS > > [26.844s] > > [INFO] ManifoldCF - Connectors - MetaCarta GTS ........... SUCCESS > [1.093s] > > [INFO] ManifoldCF - Connectors - jCIFS ................... SUCCESS > [1.028s] > > [INFO] ManifoldCF - Connectors - JDBC .................... SUCCESS > [1.362s] > > [INFO] ManifoldCF - Connectors - Null Authority .......... SUCCESS > [0.643s] > > [INFO] ManifoldCF - Connectors - Null Output ............. SUCCESS > [0.566s] > > [INFO] ManifoldCF - Connectors - RSS ..................... SUCCESS > [1.401s] > > [INFO] ManifoldCF - Connectors - Solr .................... SUCCESS > [1.037s] > > [INFO] ManifoldCF - Connectors - Web ..................... SUCCESS > [1.624s] > > [INFO] ManifoldCF - Connectors - CMIS .................... SUCCESS > > [32.040s] > > [INFO] ManifoldCF - Framework - Jetty Runner ............. FAILURE > [0.466s] > > <<<<<< > > > > ... but they don't seem to be available in the repository after they > > are built during the test run. Yet the dependencies don't stop the > > tests from trying to execute and copy those wars from the repository. > > Can anyone enlighten me as to why this might be? > > > > Karl > > > > On Tue, Aug 9, 2011 at 8:33 AM, Karl Wright <daddy...@gmail.com> wrote: > > > The maven files use the maven-dependency-plugin to copy wars out of > > > the repository into a place where testing and execution code can find > > > them. This currently requires a build-time dependency, but in fact > > > the wars are not needed unless a test is being run. I would like to > > > somehow set the scope of the code that copies the wars so that the > > > copy only takes place when "test" or "runtime" is the scope. Is there > > > any way to do that? > > > > > > Here's the plugin invocation: > > > > > > <plugin> > > > <artifactId>maven-dependency-plugin</artifactId> > > > <executions> > > > <execution> > > > <id>copy-war</id> > > > <phase>generate-resources</phase> > > > <goals> > > > <goal>copy</goal> > > > </goals> > > > <configuration> > > > <outputDirectory>target/dependency</outputDirectory> > > > <artifactItems> > > > <artifactItem> > > > <groupId>org.apache.chemistry.opencmis</groupId> > > > > > > <artifactId>chemistry-opencmis-server-inmemory-war</artifactId> > > > <version>0.5.0-SNAPSHOT</version> > > > <type>war</type> > > > <overWrite>false</overWrite> > > > </artifactItem> > > > <artifactItem> > > > <groupId>${project.groupId}</groupId> > > > <artifactId>mcf-api-service</artifactId> > > > <version>${project.version}</version> > > > <type>war</type> > > > <overWrite>false</overWrite> > > > </artifactItem> > > > <artifactItem> > > > <groupId>${project.groupId}</groupId> > > > <artifactId>mcf-authority-service</artifactId> > > > <version>${project.version}</version> > > > <type>war</type> > > > <overWrite>false</overWrite> > > > </artifactItem> > > > <artifactItem> > > > <groupId>${project.groupId}</groupId> > > > <artifactId>mcf-crawler-ui</artifactId> > > > <version>${project.version}</version> > > > <type>war</type> > > > <overWrite>false</overWrite> > > > </artifactItem> > > > </artifactItems> > > > </configuration> > > > </execution> > > > </executions> > > > </plugin> > > > > > > > > > Karl > > > > > > > > > -- > Piergiorgio Lucidi > Web: http://about.me/piergiorgiolucidi >