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

Reduce the number of dependencies in Bastion #57

Open
KPull opened this issue Dec 15, 2016 · 3 comments
Open

Reduce the number of dependencies in Bastion #57

KPull opened this issue Dec 15, 2016 · 3 comments
Assignees
Milestone

Comments

@KPull
Copy link
Member

KPull commented Dec 15, 2016

Right now, Bastion has too many dependencies which are not necessarily used by the average user. In particular, I can see two dependencies which we can start with:

  • JUnit 4
  • JMustache

These libraries should be optional dependencies. The user should include them in their own POM file if they are going to use these features in Bastion.

@KPull
Copy link
Member Author

KPull commented Jan 3, 2017

Perhaps we could also get rid of the AssertJ dependency if we rewrite our Assertions objects so that they don't use AssertJ internally.

@KPull KPull modified the milestones: 0.5-BETA, 0.6-BETA Jan 3, 2017
@KPull
Copy link
Member Author

KPull commented Jan 4, 2017

Another alternative for fixing this issue is by using something like the maven-shard-plugin (https://maven.apache.org/plugins/maven-shade-plugin/index.html). It creates an Uber-Jar file containing all the dependency classes needed by Bastion. The Bastion Jar file itself will then have no other dependencies.

I think is a good idea because we could keep using features such as the AssertJ library without having to duplicate the code in that library. It also keeps the Bastion library self-contained as possible as it won't need additional dependencies. Finally, it also fixes the version of libraries in use by a particular Bastion version: if a user uses their own version of AssertJ, for example, Bastion will still use the one that was originally compiled with it (therefore less version conflict bugs).

@KPull
Copy link
Member Author

KPull commented Jan 7, 2017

Another target for the maven-shade-plugin would be copying the DefaultResourceLoader class from Spring Framework Core. Right now, we're depending on the entire Spring Framework Core library just for this class. With the plugin we would copy the bytecode over into Bastion directly, remove the dependency and avoid duplicating code unnecessarily.

@KPull KPull modified the milestones: 0.6-BETA, 1.0 Mar 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant