Page 1 of 1

Changing the source, how to proceed?

Posted: Tue Feb 28, 2012 1:36 am
by Dalla

I´ve been working with Java for 3-4 years, but I haven´t worked that much with Maven except for in simple projects.
I also haven´t worked with framework development at all. But now is a good time to get started :-)

I´m just wondering what would be the best way to proceed. I know there´s an archetype for extending the framework and customizing your own site,
but what if I want to change the acutal source?

I´ve fetched the source from the Git repo, and in my workspace I now have a multi module maven project. So I guess I can just go ahead make my changes to it, build it and import the libs to my project.

What I´m wondering is if there´s a way to make e.g. the BroadLeadDemoSite use the source in my workspace rather than having to build the entire framework and importing the newly compiled libs for every little change that I make?

Hope my question is understandable :-)

Re: Changing the source, how to proceed?

Posted: Mon Mar 05, 2012 3:18 pm
by bpolster
First, let me indicate that this would not be normal usage of the framework. Broadleaf Commerce is designed so that you can extend and modify services, domain, etc. without modifying the actual Broadleaf Commerce source code. You should proceed with caution using this approach as you will essentially hinder your ability to accept future upgrades.

That being said, to use your own modified version of Broadleaf Commerce is easy to do, you will update the "pom" files within the BLC projects / sub-projects that you want to modify. You'll modify the version to your own specific version. For example, you might change <version>1.5.2_GA</version> to <version>1.5.2_MY_VERSION</version>.

Once you run a Maven-install on the projects you've modified, this new version will be "installed" in your local maven repository. From the file system, you could verify this by going to your local repository. For example, mine is located in my home directory in a subdirectory called ".m2".

After that, you now will enter the new version of BLC that you built as a dependency in your BLC demo "pom.xml" file.

Re: Changing the source, how to proceed?

Posted: Mon Mar 05, 2012 4:39 pm
by Dalla
Thanks for your answer!

I was probably a bit unclear in my question, I am fully aware that this is not the way to extend the framework.
Was more trying to understand how to setup my dev environment in case I wanted to contribute to the base framework.

Anyway, you´ve given me the information that I wanted, thanks again!