Hello,

Thanks for your idea, and yes I think I have got a chick-egg problem, but the 
solution, which works for me, was easy.
The testing framework is used only on „testing“ goal and the test source code 
contains 3 classes only, so I have stored
these classes in a single Git repository and include the classes in defined 
package within my project as a Git submodule.
With this each of my projects has got an equal testing structure without any 
Maven structure. The Maven project contains
The whole project data.

See here 
https://github.com/LightJason/AgentSpeak-Java/tree/developing/src/test/java/org/lightjason/agentspeak

Thanks

Phil




Am 25.03.2019 um 22:44 schrieb Anthony Whitford 
<anth...@whitford.com<mailto:anth...@whitford.com>>:

You can specify a dependency version using an expression like this:  
<version>${project.version}</version>

${project.version} refers to the POM’s project/version value.

Note that you can declare project properties, and use those in expressions too. 
 See this for more details:
- 
https://books.sonatype.com/mvnref-book/reference/resource-filtering-sect-properties.html
 
<https://books.sonatype.com/mvnref-book/reference/resource-filtering-sect-properties.html>


Having said that…. It sounds like you have a chicken-egg problem and that 
really needs to be fixed.  While Maven certainly supports dynamic dependency 
management, it will highlight and prevent poor software engineering practices 
such as cyclic dependencies.  You will discover that even if you can get a 
cyclic build working, the release process will be broken.  And, you will 
undoubtedly run into build race conditions and other bad things.

So, you need to figure out how to isolate the common dependencies into a third 
library to break the cyclic dependency.  Instead of something like this:
-  A depends on B, B depends on A (BAD!)
How about:
-  A depends on C, B depends on C (OK!)

C may be just Interfaces — maybe no implementation.
Your Tess can depend on A — but A should not depend on the Tests — it defeats 
the value of isolating the Tests.


Hope this helps,

Anthony


On Mar 25, 2019, at 11:28 AM, Philipp Kraus 
<philipp.kr...@tu-clausthal.de<mailto:philipp.kr...@tu-clausthal.de>> wrote:

Hello,

I am building an additional testing framework for my framework. I now have the 
following cyclic import of the dependencies "MyFramework imports 
MyTestingFramework" and "MyTestingFramework imports MyFramework".
For example, if MyFramework is version 0.2.1-SNAPSHOT, then MyTestingFramework 
should use the version 0.2.1-SNAPSHOT. Is there a way to get the dependency 
dynamically?

I hope it was understandable
Thanks a lot

Phil


---------------------------------------------------------------------
To unsubscribe, e-mail: 
users-unsubscr...@maven.apache.org<mailto:users-unsubscr...@maven.apache.org>
For additional commands, e-mail: 
users-h...@maven.apache.org<mailto:users-h...@maven.apache.org>


Reply via email to