You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by afine <gi...@git.apache.org> on 2017/02/15 00:11:17 UTC
[GitHub] zookeeper pull request #178: ZOOKEEPER-2696: Eclipse ant ask no longer deter...
GitHub user afine opened a pull request:
https://github.com/apache/zookeeper/pull/178
ZOOKEEPER-2696: Eclipse ant ask no longer determines correct classpath for tests after ZOOKEEPER-2689
After pulling branch-3.4 i noticed that I could no longer compile and run the tests within my IDE.
The .classpath file generated by the eclipse ant task was missing necessary dependencies. These missing dependencies all appear to be transitive from dependencies brought in by ZOOKEEPER-2689 (which is why ant is able to run the tests). There were two possible ways to fix this, this patch explicitly lists the new transitive dependencies that are required by our test code. Another solution would be to remove `transitive="false"` from `<ivy:cachepath pathid="junit.path.id" conf="test" transitive="false"/>` in the eclipse target of our `build.xml`. This solution would introduce even more transitive dependencies to the .classpath.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/afine/zookeeper ZOOKEEPER-2696
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zookeeper/pull/178.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #178
----
commit bc8d6c35594f24fbb7ebf13066a746f5b7246cd1
Author: Abraham Fine <ab...@cloudera.com>
Date: 2017-02-15T00:03:35Z
ZOOKEEPER-2696: Eclipse ant ask no longer determines correct classpath after ZOOKEEPER-2689
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zookeeper issue #178: ZOOKEEPER-2696: Eclipse ant ask no longer determines c...
Posted by rakeshadr <gi...@git.apache.org>.
Github user rakeshadr commented on the issue:
https://github.com/apache/zookeeper/pull/178
>> I was able to run the unit tests within eclipse or idea (I used WatcherTest as my example) using just the dependencies I added in the patch.
@afine , Probably, you can run `QuorumKerberosAuthTest.java` test case, which needs all these libraries during execution.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zookeeper issue #178: ZOOKEEPER-2696: Eclipse ant ask no longer determines c...
Posted by rakeshadr <gi...@git.apache.org>.
Github user rakeshadr commented on the issue:
https://github.com/apache/zookeeper/pull/178
As per the offline discussion with @afine, identified that `checkstyle ant task` is not working in branch-3.4 and will be raising a new jira task to correct this.
```
checkstyle.check:
set-checkstyle-classpath:
checkstyle:
[checkstyle] log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.BeanUtils).
[checkstyle] log4j:WARN Please initialize the log4j system properly.
[checkstyle] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
BUILD FAILED
$ZK\git\b-3-4-new\build.xml:1595: Unable to create a Checker: cannot initialize module PackageHtml - Unable to instantiate PackageHtml
```
Thanks @afine for the patience. +1 for the simple fix. I will merge this PR to branch-3.4, tomorrow if there is no objection from anyone.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zookeeper issue #178: ZOOKEEPER-2696: Eclipse ant ask no longer determines c...
Posted by rakeshadr <gi...@git.apache.org>.
Github user rakeshadr commented on the issue:
https://github.com/apache/zookeeper/pull/178
> I did not add the transitive="false" because we are not using it for the default configuration on the previous line. If you feel strongly about it I will add it.
As we know, earlier `transitive=false` in build.xml avoids pulling these dependencies. IMHO, we can add `transitive=false` in checkstyle because the related libraries are not needed now.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zookeeper issue #178: ZOOKEEPER-2696: Eclipse ant ask no longer determines c...
Posted by afine <gi...@git.apache.org>.
Github user afine commented on the issue:
https://github.com/apache/zookeeper/pull/178
I did not add the `transitive="false"` because we are not using it for the `default` configuration on the previous line. If you feel strongly about it I will add it.
In addition, since this is only used for setting up dev environments I think it is probably ok to pull in a few dependencies that we do not need.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zookeeper issue #178: ZOOKEEPER-2696: Eclipse ant ask no longer determines c...
Posted by rakeshadr <gi...@git.apache.org>.
Github user rakeshadr commented on the issue:
https://github.com/apache/zookeeper/pull/178
Thanks @afine for reporting this. With newly added dependencies, the compilation error will be resolved. But, I could see while running unit test case in eclipse, it needed all the transitive dependent libraries in classpath. AFAIK, the below set of libraries needed during test run time. Could you please confirm? If yes, then we can think of removing `transitive="false"` from build.xml in order to reduce the length of ivy.xml, right?
- antlr-2.7.7.jar
- mina-core-2.0.7.jar
- mavibot-1.0.0-M1.jar
- ehcache-core-2.4.4.jar
- commons-pool-1.6.jar
- apacheds-core-2.0.0-M15.jar
- apacheds-core-api-2.0.0-M15.jar
- apacheds-core-avl-2.0.0-M15.jar
- apacheds-core-constants-2.0.0-M15.jar
- apacheds-core-shared-2.0.0-M15.jar
- apacheds-i18n-2.0.0-M15.jar
- apacheds-interceptor-kerberos-2.0.0-M15.jar
- apacheds-interceptors-admin-2.0.0-M15.jar
- apacheds-interceptors-authn-2.0.0-M15.jar
- apacheds-interceptors-authz-2.0.0-M15.jar
- apacheds-interceptors-changelog-2.0.0-M15.jar
- apacheds-interceptors-collective-2.0.0-M15.jar
- apacheds-interceptors-event-2.0.0-M15.jar
- apacheds-interceptors-exception-2.0.0-M15.jar
- apacheds-interceptors-journal-2.0.0-M15.jar
- apacheds-interceptors-normalization-2.0.0-M15.jar
- apacheds-interceptors-operational-2.0.0-M15.jar
- apacheds-interceptors-referral-2.0.0-M15.jar
- apacheds-interceptors-schema-2.0.0-M15.jar
- apacheds-interceptors-subtree-2.0.0-M15.jar
- apacheds-interceptors-trigger-2.0.0-M15.jar
- apacheds-jdbm1-2.0.0-M2.jar
- apacheds-jdbm-partition-2.0.0-M15.jar
- apacheds-kerberos-codec-2.0.0-M15.jar
- apacheds-ldif-partition-2.0.0-M15.jar
- apacheds-mavibot-partition-2.0.0-M15.jar
- apacheds-protocol-kerberos-2.0.0-M15.jar
- apacheds-protocol-ldap-2.0.0-M15.jar
- apacheds-protocol-shared-2.0.0-M15.jar
- apacheds-xdbm-partition-2.0.0-M15.jar
- api-all-1.0.0-M20.jar
- api-asn1-api-1.0.0-M20.jar
- api-asn1-ber-1.0.0-M20.jar
- api-i18n-1.0.0-M20.jar
- api-ldap-client-api-1.0.0-M20.jar
- api-ldap-codec-core-1.0.0-M20.jar
- api-ldap-extras-aci-1.0.0-M20.jar
- api-ldap-extras-codec-1.0.0-M20.jar
- api-ldap-extras-codec-api-1.0.0-M20.jar
- api-ldap-extras-sp-1.0.0-M20.jar
- api-ldap-extras-trigger-1.0.0-M20.jar
- api-ldap-extras-util-1.0.0-M20.jar
- api-ldap-model-1.0.0-M20.jar
- api-util-1.0.0-M20.jar
- bcprov-jdk15-140.jar
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zookeeper issue #178: ZOOKEEPER-2696: Eclipse ant ask no longer determines c...
Posted by afine <gi...@git.apache.org>.
Github user afine commented on the issue:
https://github.com/apache/zookeeper/pull/178
Sorry @rakeshadr, I misunderstood your previous comment.
So I have concerns about changing the way dependencies are pulled for the test build for what is a very minor developer inconvenience (a few extra lines in the .classpath file).
While I was unable to get checkstyle to run against branch-3.4 (would appreciate any insight you have on actually doing this) I was able to confirm that changing the way transitives are handled for the checkstyle dependency in branch-3.5 does break the checkstyle ant task.
You did mention that
> the related libraries are not needed now
Are you saying that checkstyle is not being used at all in branch-3.4? I could not find much info while dgging through JIRA.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zookeeper issue #178: ZOOKEEPER-2696: Eclipse ant ask no longer determines c...
Posted by afine <gi...@git.apache.org>.
Github user afine commented on the issue:
https://github.com/apache/zookeeper/pull/178
Hi @rakeshadr
I was able to run the unit tests within eclipse or idea (I used WatcherTest as my example) using just the dependencies I added in the patch.
That being said I would be find removing `transitive="false"`. I would appreciate @phunt opinion on that as he added it originally.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zookeeper issue #178: ZOOKEEPER-2696: Eclipse ant ask no longer determines c...
Posted by afine <gi...@git.apache.org>.
Github user afine commented on the issue:
https://github.com/apache/zookeeper/pull/178
You are correct @rakeshadr , that test fails. I will change the patch to just removing `transitive="false"`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zookeeper pull request #178: ZOOKEEPER-2696: Eclipse ant ask no longer deter...
Posted by afine <gi...@git.apache.org>.
Github user afine closed the pull request at:
https://github.com/apache/zookeeper/pull/178
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zookeeper issue #178: ZOOKEEPER-2696: Eclipse ant ask no longer determines c...
Posted by rakeshadr <gi...@git.apache.org>.
Github user rakeshadr commented on the issue:
https://github.com/apache/zookeeper/pull/178
Please add `transitive="false"` explicitly to checkstyle artifcat.
```
<dependency org="checkstyle" name="checkstyle" rev="5.0"
conf="test->default" transitive="false"/>
```
Otw, this is pulling the following dependencies to the `.classpath`, which is not required.
commons-beanutils-core-1.7.0.jar" />
commons-cli-1.0.jar" />
commons-logging-1.0.3.jar" />
google-collections-0.9.jar" />
We have tried an attempt to simplify `ivy.xml` by removing the `transitive="false"` flag in build.xml. On the other side, we could enforce adding `transitive="false"` explicitly in ivy. This behavior only needed in branch-3.4, because we can use `Kerby` in branch-3.5+ for MiniKdc test automation.
@hanm, @phunt, would be great to see your feedback on the fix.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zookeeper issue #178: ZOOKEEPER-2696: Eclipse ant ask no longer determines c...
Posted by afine <gi...@git.apache.org>.
Github user afine commented on the issue:
https://github.com/apache/zookeeper/pull/178
Hoping you can take a look @rakeshadr
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---