Foren

Build Module from Source LR7

thumbnail
Marco Endres, geändert vor 7 Jahren.

Build Module from Source LR7

Regular Member Beiträge: 112 Beitrittsdatum: 22.08.12 Neueste Beiträge
Hey guys

Is it possible to build a module from the liferay source without building all modules, because the modules have dependencies and if i try to build the hole liferay it fails.

Is there a nice manual how to build a module from the source. I only found articles to build 6.1 or 6.2.

thank you
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Build Module from Source LR7

Liferay Legend Beiträge: 14917 Beitrittsdatum: 02.09.06 Neueste Beiträge
Yes you can build modules but yes the whole should build also.

With the individuals, like you said, you get into some dependency issues that you'll need to resolve.

Can you share the failures you're having with building all?






Come meet me at the LSNA!
thumbnail
Marco Endres, geändert vor 7 Jahren.

RE: Build Module from Source LR7

Regular Member Beiträge: 112 Beitrittsdatum: 22.08.12 Neueste Beiträge
Hello David

I try to explain you my problems i got. I work on windows, if that is a problem please tell me.
When I try to build a Tag like 7.0.1 GA2 the : "gradle-plugins-defaults" is missing. In every module you need that.
So try to build the hole modules from the Master (There is the folder "gradle-plugins-defaults" in the SDK) via: gradle build then it fails because of the findBugsMain:

:core:jaxws-osgi-bridge:findbugsMain FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:jaxws-osgi-bridge:findbugsMain'.
> FindBugs rule violations were found. See the report at: file:///C:/DEV/Git/liferay-portal/modules/core/jaxws-osgi-bridge/build/reports/findbugs/main.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED


I added the main.html from the bugs report.

I tried to ignore it but then it fails at the findBugsTest.

Do I need to do some initialisation before I can build it?

Thank you
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Build Module from Source LR7

Liferay Legend Beiträge: 14917 Beitrittsdatum: 02.09.06 Neueste Beiträge
So the core still relies on ant for the build even though it in turn passes off to gradle for a lot of the work.

Use the command "ant all" to build it all up. I think ant actually does some setup and other things to make the gradle environment happy.






Come meet me at the LSNA!
thumbnail
Marco Endres, geändert vor 7 Jahren.

RE: Build Module from Source LR7

Regular Member Beiträge: 112 Beitrittsdatum: 22.08.12 Neueste Beiträge
So did it with the master emoticon

At least it said 'BUILD SUCCESSFUL'. So now how can i get my jar from a specific module? Or if it is builded already where do i find it?

thank you
thumbnail
Marco Endres, geändert vor 7 Jahren.

RE: Build Module from Source LR7

Regular Member Beiträge: 112 Beitrittsdatum: 22.08.12 Neueste Beiträge
Oh i found th bundle that it creates emoticon
If I want to change one small thing in a module, do I have to build the hole portal again?

thank you
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Build Module from Source LR7

Liferay Legend Beiträge: 14917 Beitrittsdatum: 02.09.06 Neueste Beiträge
Well you really don't want to be changing anything. Liferay has methods to override JSPs, install DS services, etc. Every time you change the portal source you're locking yourself into a version lest you reapply changes to the next GA and the next and the next...

What exactly are you trying to change?






Come meet me at the LSNA!
thumbnail
Marco Endres, geändert vor 7 Jahren.

RE: Build Module from Source LR7

Regular Member Beiträge: 112 Beitrittsdatum: 22.08.12 Neueste Beiträge
I tried to change the following bug by myself: LPS-67580

I tried to checkout the ga2 and fix the files, that got changed in this ticket, but it failed. So I decided to build the master and now it works. Now I have to update my other portlets :/

I understand why it is bad to change something, but sometimes you need a fix now and can't wait for the next GA. So it would be easier to simply build one module, where the bug existes instead of the hole master.

It works fine now thank you for your help. First time I built Liferay by myself emoticon

Happy greetings

Marco Endres
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Build Module from Source LR7

Liferay Legend Beiträge: 14917 Beitrittsdatum: 02.09.06 Neueste Beiträge
No, I get it. I was worried however that you were trying to change some core functionality yourself and would face an uphill battle upgrading in the future.

But trying to apply a patch, that to me doesn't face too much future trouble because that code will be in the future releases...







Come meet me at the LSNA!