Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new symbol: !mavenArtifact #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CyrilDeverson
Copy link

This symbol enables user to define dependencies available from a remote maven repository.
To option is particularly interesting when no pom file is available locallly on the FitNesse server.

Additionally, this enhancement uses an external maven installation (not the embedded one) which make it easier to configure and update.

Copy link
Collaborator

@amolenaar amolenaar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just uncertain about the temp file generation for the to-be fetched artefact.

}

private File createPomFile(MavenArtifactClasspathSymbolType.ParsedSymbol parsedSymbol) throws IOException {
File pomFile = File.createTempFile("fitnesse-maven-classpath-", ".pom");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a way to obtain a resolver and get the dependency directly? Creating a temp file does not look like the right solution for this.

@CyrilDeverson
Copy link
Author

I tried to do so at a first stage (tried to call dependency:get and then dependency:build-classpath). But I didn't find any good way that would not lead me to re-code some internal features of maven so I preferred use mvn just as a normal client would and create a temporary pom file (which is the normal way as a maven point of view).
Please also consider that using the !pomFile symbol you need to put a specific pom file local to the fitnesse server with no way to download it automatically from maven and that is what I wanted to simplify with this new symbol: just define the group/artifact/version your fixture depends on and fitnesse will do the job by delegating dependency resolution to maven.
Could you explain the reason why a temp file doesn't look like the right solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants