You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by Alasdair Nottingham <no...@apache.org> on 2010/02/27 22:09:20 UTC

Request for advice from a maven expert

Hi,

I have written a new test for the OBR AriesApplicationResolver that
tests the following:

1. Transitive dependencies are correctly worked out
2. By value content is resolved against
3. Stuff in an external repository is resolved against
4. An application resolved with the OBR AriesApplicationResolver can
be installed and started

It all passes, however it depends on the blog sample artefacts, so I
have had to add the following dependencies to the application-itests
pom.xml:

        <dependency>
        	<groupId>org.apache.aries.samples</groupId>
        	<artifactId>blog</artifactId>
        	<version>${version}</version>
        	<scope>test</scope>
        </dependency>
        <dependency>
        	<groupId>org.apache.aries.samples</groupId>
        	<artifactId>blog-persistence</artifactId>
        	<version>${version}</version>
        	<scope>test</scope>
        </dependency>
        <dependency>
        	<groupId>org.apache.aries.samples</groupId>
        	<artifactId>blog-api</artifactId>
        	<version>${version}</version>
        	<scope>test</scope>
        </dependency>
        <dependency>
        	<groupId>org.apache.derby</groupId>
        	<artifactId>derby</artifactId>
        	<version>10.5.3.0_1</version>
        	<scope>test</scope>
        </dependency>

Part of me worries that if the blog sample is updated to provide a
.eba it will depend on the eba-maven-plugin in the application
project, and the itests for the applicaton project depend on the
samples. I do not know maven well enough to know if this would be
considered bad practice, so before I commit I thought I would ask. Is
it ok to add these dependencies?

Thanks
Alasdair

-- 
Alasdair Nottingham
not@apache.org

Re: Request for advice from a maven expert

Posted by David Jencks <da...@yahoo.com>.
That would definitely be a problem were the eba-maven-plugin remain  
where it is but to work around a maven bug that would prevent eba- 
maven-plugin from being used in application-itests I plan to move it  
to a top-level subproject that can be released separately thus  
eliminating the circular dependency.

Hopefully doing this won't cause problems with application.mf  
generation -- using code from application in eba-maven-plugin may  
reintroduce circular dependency problems.

One other comment is that you should only use ${version} when  
referring to modules in the same top level subproject.  Since samples  
is different you should use the explicit 1.0.0-incubating-SNAPSHOT  
version.

david jencks

On Feb 27, 2010, at 1:09 PM, Alasdair Nottingham wrote:

> Hi,
>
> I have written a new test for the OBR AriesApplicationResolver that
> tests the following:
>
> 1. Transitive dependencies are correctly worked out
> 2. By value content is resolved against
> 3. Stuff in an external repository is resolved against
> 4. An application resolved with the OBR AriesApplicationResolver can
> be installed and started
>
> It all passes, however it depends on the blog sample artefacts, so I
> have had to add the following dependencies to the application-itests
> pom.xml:
>
>        <dependency>
>        	<groupId>org.apache.aries.samples</groupId>
>        	<artifactId>blog</artifactId>
>        	<version>${version}</version>
>        	<scope>test</scope>
>        </dependency>
>        <dependency>
>        	<groupId>org.apache.aries.samples</groupId>
>        	<artifactId>blog-persistence</artifactId>
>        	<version>${version}</version>
>        	<scope>test</scope>
>        </dependency>
>        <dependency>
>        	<groupId>org.apache.aries.samples</groupId>
>        	<artifactId>blog-api</artifactId>
>        	<version>${version}</version>
>        	<scope>test</scope>
>        </dependency>
>        <dependency>
>        	<groupId>org.apache.derby</groupId>
>        	<artifactId>derby</artifactId>
>        	<version>10.5.3.0_1</version>
>        	<scope>test</scope>
>        </dependency>
>
> Part of me worries that if the blog sample is updated to provide a
> .eba it will depend on the eba-maven-plugin in the application
> project, and the itests for the applicaton project depend on the
> samples. I do not know maven well enough to know if this would be
> considered bad practice, so before I commit I thought I would ask. Is
> it ok to add these dependencies?
>
> Thanks
> Alasdair
>
> -- 
> Alasdair Nottingham
> not@apache.org