[PATCH] a helper method to make adding maven bundles more concise...
--------------------------------------------------------------------

                 Key: PAXEXAM-51
                 URL: http://issues.ops4j.org/browse/PAXEXAM-51
             Project: Pax Exam
          Issue Type: Improvement
            Reporter: James Strachan
            Assignee: Toni Menzel
            Priority: Trivial


I found this kind of code to be a little verbose

{code}
mavenBundle().groupId( "org.ops4j.pax.url" ).artifactId( "pax-url-mvn" 
).version( asInProject() )
{code}

so ended up adding a little helper method - it might make sense to add this to 
Pax Exam so if folks are adding loads of maven bundles they can do so in a 
slightly more concise way

{code}

  /**
   * Adds a maven bundle for the given groupId and artifactId while deducing 
the version to use
   * from the 
<code>target/classes/META-INF/maven/dependencies.properties</code> file that is
   * generated via the 
   * <a 
href="http://wiki.ops4j.org/display/paxexam/Pax+Exam+-+Tutorial+1";>depends-maven-plugin
 
   * from ServiceMix</a> 
   */
  public static MavenUrlProvisionOption mavenBundleAsInProject(String groupId, 
String artifactId) {
    return 
mavenBundle().groupId(groupId).artifactId(artifactId).version(asInProject());
  }
{code}

Then this code

{code}
mavenBundle().groupId( "org.ops4j.pax.url" ).artifactId( "pax-url-mvn" 
).version( asInProject() )
{code}

becomes this - (with one less static imports to resolve in your IDE)

{code}
mavenBundleAsInProject("org.ops4j.pax.url", "pax-url-mvn" )
{code}





-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.ops4j.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to