1

I am running cucumber-jvm via JUnit and maven. I can get into the source code and make changes to the core code, but these changed do not affect the other projects that run cucumber-jvm.

How do I make changes to the core and have the other projects on my machine be affected? Does maven only run the jars on github? Do I have to create a new cucumber-jvm project and add that project as a dependency instead of:

  <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>1.0.3</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>1.0.2</version>
        <scope>test</scope>
    </dependency>

Thanks.

2 Answers 2

2

You've pulled down the Cucumber-JVM code and modified it locally, yes? Then all you need to do is run a Maven build (not within Eclipse!). This will replace the downloaded dependencies in your Maven repo with newer ones you've changed (but only the ones you've changed). Then your tests should pick up your changes.

If you want to commit your changes back to Cucumber-JVM as enhancements or bug-fixes, and you should, if you feel they'll be useful, you'll need to go through the github pull request process - see the Cucumber-JVM website for details on that.

Sign up to request clarification or add additional context in comments.

Comments

0

As @TrueDub said, you need to clone the project locally, and build it using mvn install. This will build the project and install it in your local repository. Any project you build locally referencing the version of cucumber-jvm you have built in their pom will be using your modified version.

If you need to distribute your version of cucumber-jvm to other environment, the best bet is to use a Nexus repository to deploy your artefact and make it available for others to use within your organization. Make sure you give that artefact a name (or classifier, or version) that distinguishes your version from the official one to avoid potential confusion – in which case poms using your version of cucumber-jvm must be modified to use that particular version.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.