You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Ioannis Canellos <no...@github.com> on 2013/08/05 11:08:30 UTC

[jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

This pull request shows, how integration tests can use the generated features repository (generated by the feature module) so that they don&#39;t require the &quot;install&quot; goal when performing a full build.
You can merge this Pull Request by running:

  git pull https://github.com/iocanel/jclouds-karaf JCLOUDS-225

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds-karaf/pull/25

-- Commit Summary --

  * [JCLOUDS-225] Configured itests to use the generated repo, so that the don&#39;t require installation of artifacts to the local maven repo.

-- File Changes --

    M itests/src/test/java/org/jclouds/karaf/itests/JcloudsFeaturesTestSupport.java (14)
    M itests/src/test/java/org/jclouds/karaf/itests/JcloudsKarafTestSupport.java (61)
    M itests/src/test/java/org/jclouds/karaf/itests/live/AwsEc2LiveTest.java (2)
    M itests/src/test/java/org/jclouds/karaf/itests/live/AwsS3LiveTest.java (4)
    M itests/src/test/java/org/jclouds/karaf/itests/live/CloudFilesUsLiveTest.java (4)
    M itests/src/test/java/org/jclouds/karaf/itests/live/RackspaceLiveTest.java (3)
    M itests/src/test/java/org/jclouds/karaf/itests/special/JcloudsCamelCxfFeaturesTestSupport.java (4)

-- Patch Links --

https://github.com/jclouds/jclouds-karaf/pull/25.patch
https://github.com/jclouds/jclouds-karaf/pull/25.diff


Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Andrew Phillips <no...@github.com>.
Verified locally that the following works:

1. `mvn install` of jclouds
2. `mvn install` of jclouds-labs
3. `mvn install` of jclouds-chef
4. `mvn release:prepare .... -DpreparationGoals="clean install"`

So my vote would be to be to either update the release instructions or (since we know this is needed) replace the
```
<preparationGoals>clean install</preparationGoals>
```
line that 8cc82b0 removed and drop the changes in this PR.

@iocanel @abayer What do you think?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-22141130

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Andrew Phillips <no...@github.com>.
Couple of small comments - the only "real" one being about making the relative paths configurable via a system property.

> jclouds-karaf-pull-requests #15 UNSTABLE

That seems to be checkstyle - [tests look OK](https://jclouds.ci.cloudbees.com/job/jclouds-karaf-pull-requests/15/testReport/)

Thanks, @iocanel!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-22104081

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Andrew Phillips <no...@github.com>.
> #26 has been commited. Can we now close this PR?

I'd first like to see if @iocanel has any responses to some of the review comments made.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-27155706

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Ioannis Canellos <no...@github.com>.
Personally, I don't like this approach, since the problem can be addressed in a less complex way. I just created the PR so that we can all have a feel of how this solution looks like.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-22094637

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Ioannis Canellos <no...@github.com>.
@demobox: I am a bit confused. It has been working for all previous jclouds-karaf releases.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-22105816

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Ignasi Barrera <no...@github.com>.
https://github.com/jclouds/jclouds-karaf/pull/26 has been commited. Can we now close this PR?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-24587372

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Andrew Phillips <no...@github.com>.
> #26 has been commited. Can we now close this PR?

I think so. @iocanel ?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-27155713

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Andrew Phillips <no...@github.com>.
> @@ -40,8 +40,8 @@
>      @Before
>      public void setUp() throws Exception {
>          System.err.println(executeCommand("features:addurl " + String.format(CAMEL_FEATURE_FORMAT,System.getProperty(CAMEL_FEATURE_VERSION_PROPERTY))));
> -        System.err.println(executeCommand("features:removeurl " + String.format(JCLOUDS_FEATURE_FORMAT, "1.3.1")));
> -        System.err.println(executeCommand("features:addurl " + String.format(JCLOUDS_FEATURE_FORMAT,System.getProperty(JCLOUDS_FEATURE_VERSION_PROPERTY))));
> +        System.err.println(executeCommand("features:removeurl " + String.format(MVN_JCLOUDS_FEATURE_FORMAT, "1.3.1")));
> +        System.err.println(executeCommand("features:addurl " + String.format(MVN_JCLOUDS_FEATURE_FORMAT,System.getProperty(JCLOUDS_FEATURE_VERSION_PROPERTY))));

[nit] Space after the comma?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25/files#r5577789

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Andrew Phillips <no...@github.com>.
> +                                    maven().groupId(KARAF_GROUP_ID)
> +                                            .artifactId(KARAF_ARTIFACT_ID)
> +                                            .versionAsInProject()
> +                                            .type("tar.gz"))
> +                            .karafVersion(getKarafVersion())
> +                            .name("Apache Karaf Distro")
> +                            .unpackDirectory(new File("target/paxexam/unpack/")),
> +                    //We are adding the generated features-repo to the list of known repositories so that we don't have to
> +                    // install artifacts to local maven repo to make the tests work.
> +                    editConfigurationFileExtend("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.defaultRepositories", ",file:" + new File("../feature/target/features-repo").getCanonicalPath() + "@snapshots")
> +            );
> +        } catch (IOException e) {
> +            Throwables.propagate(e);
> +        } finally {
> +            return option;
> +        }

What does the finally do? Isn't this just
```
try {
  ...
  return option;
} catch (...) {
  Throwables.propagate(e);
}
```
?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25/files#r5577774

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by BuildHive <no...@github.com>.
[jclouds ยป jclouds-karaf #262](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-karaf/262/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-22096412

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Andrew Phillips <no...@github.com>.
> @@ -63,6 +66,11 @@
>      public static final String JCLOUDS_GROUP_ID = "org.apache.jclouds";
>      public static final String JCLOUDS_ARTIFACT_ID = "jclouds-core";
>  
> +    public static final String MVN_JCLOUDS_FEATURE_FORMAT = "mvn:org.apache.jclouds.karaf/jclouds-karaf/%s/xml/features";
> +    public static final String KARAF_RELATIVE_FEAUTRE_DESCRIPTOR_LOCATION = "../../../../../feature/target/feature.xml";
> +    public static final String ITESTS_RELATIVE_FEAUTRE_DESCRIPTOR_LOCATION = "../feature/target/feature.xml";

Typos: `FEATURE`? Also: make this settable via a system property rather than hard-coding?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25/files#r5577742

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Ioannis Canellos <no...@github.com>.
@demobox: The main question is "do we like this approach or we prefer just changing the default preparation goals?"

I clearly prefer just changing the default preparation goals. The approach in this pull request is adding uneeded complexity to something already really complex.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-22104314

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Andrew Phillips <no...@github.com>.
See https://github.com/jclouds/jclouds-karaf/pull/26 for the "change preparationGoals" version.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-22152176

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Andrew Phillips <no...@github.com>.
> It has been working for all previous jclouds-karaf releases.

In that case, I'm confused too. The [Sonatype OSS parent](http://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom) doesn't seem to change the release-plugin defaults, and those [defaults are](http://maven.apache.org/maven-release/maven-release-plugin/prepare-mojo.html#preparationGoals) `clean verify`.

But it certainly does not seem to work now :-(

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-22113440

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Andrew Phillips <no...@github.com>.
> @@ -161,8 +161,8 @@ public void bundleChanged(BundleEvent event) {
>                  systemProperty("jclouds.aws.credential"),
>                  systemProperty("jclouds.karaf.version",MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID)),
>                  systemProperty("jclouds.version",MavenUtils.getArtifactVersion(JCLOUDS_GROUP_ID, JCLOUDS_ARTIFACT_ID)),
> -                systemProperty("jclouds.featureURL",String.format(JCLOUDS_FEATURE_FORMAT, MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID))),
> -                scanFeatures(String.format(JCLOUDS_FEATURE_FORMAT, MavenUtils.getArtifactVersion(JCLOUDS_KARAF_GROUP_ID, JCLOUDS_KARAF_ARTIFACT_ID)),"jclouds", "jclouds-commands", "jclouds-aws-s3").start()
> +                systemProperty("jclouds.featureURL",getJcloudsKarafConfigFeatureURL()),

[nit] Space after the comma?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25/files#r5577786

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Andrew Phillips <no...@github.com>.
> Mystery solved!

Tada!! Good hunting. Here's where it went:

https://github.com/jclouds/jclouds-karaf/commit/8cc82b050648e7814b39980efb0a2f9839834880

Modify this PR to simply add that back..?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-22118507

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Ignasi Barrera <no...@github.com>.
Reopen it if still makes sense to have it open :)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-30184239

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Andrew Phillips <no...@github.com>.
> I clearly prefer just changing the default preparation goals.

If we can verify that that works, I'd be fine with that, too. Could you test that, by any chance? ;-)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-22105738

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by Ioannis Canellos <no...@github.com>.
Mystery solved!

See https://github.com/jclouds/legacy-jclouds-karaf/blob/master/pom.xml#L128

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-22115920

Re: [jclouds-karaf] [JCLOUDS-225] Configured itests to use the generated repo. (#25)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-karaf-pull-requests #15](https://jclouds.ci.cloudbees.com/job/jclouds-karaf-pull-requests/15/) UNSTABLE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/25#issuecomment-22096909