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

Allow simple full chained build #171

Open
Riduidel opened this issue Apr 18, 2014 · 17 comments
Open

Allow simple full chained build #171

Riduidel opened this issue Apr 18, 2014 · 17 comments

Comments

@Riduidel
Copy link
Contributor

Currently, bulding wisdom must be done in 4 steps :

  1. mvn -Pcore
  2. mvn -Pframework
  3. mvn -Pextensions
  4. mvn -Pextensions

Could it be possible to have one full build when no profile is specified ?

@cescoffier
Copy link
Member

On 18 avr. 2014, at 15:01, Nicolas Delsaux [email protected] wrote:

Currently, bulding wisdom must be done in 4 steps :

mvn -Pcore
mvn -Pframework
mvn -Pextensions
mvn -Pextensions
Could it be possible to have one full build when no profile is specified ?

A full build would only work if the wisdom-maven-plugin is already present in the local repository. This is a Maven limitation making impossible to build a plugin (that is an extension) and modules using this plugin (http://jira.codehaus.org/browse/MNG-1911).

Reply to this email directly or view it on GitHub.

@Riduidel
Copy link
Contributor Author

Even with a well defined set of dependencies ?
I have another project where I build a plugin during build, and use it afterwards, and it work like a charm.
Well, obviously, the difference is that I don't extend maven lifecycle :-/

@cescoffier
Copy link
Member

On 18 avr. 2014, at 15:14, Nicolas Delsaux [email protected] wrote:

Even with a well defined set of dependencies ?
I have another project where I build a plugin during build, and use it afterwards, and it work like a charm.
Well, obviously, the difference is that I don't extend maven lifecycle :-/

Yes that’s the issue (the extension). that’s why we have core separated from the rest of the build.

Reply to this email directly or view it on GitHub.

@Riduidel
Copy link
Contributor Author

OK, let me experiment with it a little (unless you've already tried all your maven-fu ?)

@cescoffier
Copy link
Member

On 18 avr. 2014, at 15:18, Nicolas Delsaux [email protected] wrote:

OK, let me experiment with it a little (unless you've already tried all your maven-fu ?)

If you find a way to fix this, I pay you at least a dozen of beer…


Reply to this email directly or view it on GitHub.

@Riduidel
Copy link
Contributor Author

Hrm

Do you want the pull request to check that by yourself ?

[INFO] --- maven-install-plugin:2.4:install (default-install) @ documentation-base ---
[INFO] Installing C:\Users\ndx\Documents\workspaces\git\wisdom\documentation-base\pom.xml to C:\Users\ndx\.m2\repository\org\wisdom-framework\documentation-base\0.5-SNAPSHOT\documentation-base-0.5-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] wisdom-framework-project .......................... SUCCESS [  0.829 s]
[INFO] wisdom-api ........................................ SUCCESS [  7.766 s]
[INFO] wisdom-ipojo-module ............................... SUCCESS [  1.609 s]
[INFO] Maven Wisdom Plugin ............................... SUCCESS [02:17 min]
[INFO] wisdom-test ....................................... SUCCESS [  8.818 s]
[INFO] akka-system ....................................... SUCCESS [  5.928 s]
[INFO] wisdom-engine ..................................... SUCCESS [ 46.768 s]
[INFO] application-configuration ......................... SUCCESS [  1.181 s]
[INFO] content-manager ................................... SUCCESS [  2.092 s]
[INFO] router ............................................ SUCCESS [  2.724 s]
[INFO] crypto ............................................ SUCCESS [  0.737 s]
[INFO] wisdom-base-runtime ............................... SUCCESS [  2.515 s]
[INFO] wisdom-framework-project .......................... SUCCESS [  0.018 s]
[INFO] resource-controller ............................... SUCCESS [  2.466 s]
[INFO] i18n-service ...................................... SUCCESS [ 14.699 s]
[INFO] thymeleaf-template-engine ......................... SUCCESS [  3.349 s]
[INFO] default-error-handler ............................. SUCCESS [  0.508 s]
[INFO] ehcache-cache-service ............................. SUCCESS [ 18.918 s]
[INFO] hibernate-validation-service ...................... SUCCESS [ 18.975 s]
[INFO] wisdom-runtime .................................... SUCCESS [  1.678 s]
[INFO] wisdom-framework-project .......................... SUCCESS [  0.019 s]
[INFO] wisdom-asciidoc-maven-plugin ...................... SUCCESS [ 11.661 s]
[INFO] wisdom-monitor .................................... SUCCESS [  5.594 s]
[INFO] wisdom-framework-project .......................... SUCCESS [  0.020 s]
[INFO] documentation ..................................... SUCCESS [ 15.604 s]
[INFO] samples ........................................... SUCCESS [01:00 min]
[INFO] wisdom-framework-project .......................... SUCCESS [  0.037 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:13 min
[INFO] Finished at: 2014-04-18T15:30:18+01:00
[INFO] Final Memory: 90M/411M
[INFO] ------------------------------------------------------------------------

I'm not yet sure if absolutely all components have been correctly compiled ...

@cescoffier
Copy link
Member

From an empty Maven repo ?
If you repo already have the plugin it works… If you remove the plugin from your local repo, then it’s another story.

On 18 avr. 2014, at 15:31, Nicolas Delsaux [email protected] wrote:

Hrm

Do you want the pull request to check that by yourself ?

[INFO] --- maven-install-plugin:2.4:install (default-install) @ documentation-base ---
[INFO] Installing C:\Users\ndx\Documents\workspaces\git\wisdom\documentation-base\pom.xml to C:\Users\ndx.m2\repository\org\wisdom-framework\documentation-base\0.5-SNAPSHOT\documentation-base-0.5-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] wisdom-framework-project .......................... SUCCESS [ 0.829 s]
[INFO] wisdom-api ........................................ SUCCESS [ 7.766 s]
[INFO] wisdom-ipojo-module ............................... SUCCESS [ 1.609 s]
[INFO] Maven Wisdom Plugin ............................... SUCCESS [02:17 min]
[INFO] wisdom-test ....................................... SUCCESS [ 8.818 s]
[INFO] akka-system ....................................... SUCCESS [ 5.928 s]
[INFO] wisdom-engine ..................................... SUCCESS [ 46.768 s]
[INFO] application-configuration ......................... SUCCESS [ 1.181 s]
[INFO] content-manager ................................... SUCCESS [ 2.092 s]
[INFO] router ............................................ SUCCESS [ 2.724 s]
[INFO] crypto ............................................ SUCCESS [ 0.737 s]
[INFO] wisdom-base-runtime ............................... SUCCESS [ 2.515 s]
[INFO] wisdom-framework-project .......................... SUCCESS [ 0.018 s]
[INFO] resource-controller ............................... SUCCESS [ 2.466 s]
[INFO] i18n-service ...................................... SUCCESS [ 14.699 s]
[INFO] thymeleaf-template-engine ......................... SUCCESS [ 3.349 s]
[INFO] default-error-handler ............................. SUCCESS [ 0.508 s]
[INFO] ehcache-cache-service ............................. SUCCESS [ 18.918 s]
[INFO] hibernate-validation-service ...................... SUCCESS [ 18.975 s]
[INFO] wisdom-runtime .................................... SUCCESS [ 1.678 s]
[INFO] wisdom-framework-project .......................... SUCCESS [ 0.019 s]
[INFO] wisdom-asciidoc-maven-plugin ...................... SUCCESS [ 11.661 s]
[INFO] wisdom-monitor .................................... SUCCESS [ 5.594 s]
[INFO] wisdom-framework-project .......................... SUCCESS [ 0.020 s]
[INFO] documentation ..................................... SUCCESS [ 15.604 s]
[INFO] samples ........................................... SUCCESS [01:00 min]
[INFO] wisdom-framework-project .......................... SUCCESS [ 0.037 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:13 min
[INFO] Finished at: 2014-04-18T15:30:18+01:00
[INFO] Final Memory: 90M/411M
[INFO] ------------------------------------------------------------------------
I'm not yet sure if absolutely all components have been correctly compiled ...


Reply to this email directly or view it on GitHub.

@Riduidel
Copy link
Contributor Author

Aw crap, i forgot that 👍
OK, will test with clean repo

@Riduidel
Copy link
Contributor Author

That's indeed a different story :

[INFO] Scanning for projects...
[WARNING] The POM for org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT is missing, no dependency information available
[ERROR] The build could not read 6 projects -> [Help 1]
[ERROR]   
[ERROR]   The project org.wisdom-framework:i18n-service:0.5-SNAPSHOT (C:\Users\ndx\Documents\workspaces\git\wisdom\framework\i18n-service\pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin org.wisdom-framework:wisdom-maven-plugin:0.5-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT -> [Help 2]
[ERROR]     Unknown packaging: wisdom @ line 16, column 16
[ERROR]   
[ERROR]   The project org.wisdom-framework:ehcache-cache-service:0.5-SNAPSHOT (C:\Users\ndx\Documents\workspaces\git\wisdom\framework\ehcache-cache-service\pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin org.wisdom-framework:wisdom-maven-plugin:0.5-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT -> [Help 2]
[ERROR]     Unknown packaging: wisdom @ line 16, column 16
[ERROR]   
[ERROR]   The project org.wisdom-framework:hibernate-validation-service:0.5-SNAPSHOT (C:\Users\ndx\Documents\workspaces\git\wisdom\framework\hibernate-validation-service\pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin org.wisdom-framework:wisdom-maven-plugin:0.5-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT -> [Help 2]
[ERROR]     Unknown packaging: wisdom @ line 16, column 16
[ERROR]   
[ERROR]   The project org.wisdom-framework:wisdom-monitor:0.5-SNAPSHOT (C:\Users\ndx\Documents\workspaces\git\wisdom\extensions\wisdom-monitor\pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin org.wisdom-framework:wisdom-maven-plugin:0.5-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT -> [Help 2]
[ERROR]     Unknown packaging: wisdom @ line 36, column 16
[ERROR]   
[ERROR]   The project org.wisdom-framework:documentation:0.5-SNAPSHOT (C:\Users\ndx\Documents\workspaces\git\wisdom\documentation-base\documentation\pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin org.wisdom-framework:wisdom-maven-plugin:0.5-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT -> [Help 2]
[ERROR]     Unknown packaging: wisdom @ line 17, column 16
[ERROR]   
[ERROR]   The project org.wisdom-framework:samples:0.5-SNAPSHOT (C:\Users\ndx\Documents\workspaces\git\wisdom\documentation-base\samples\pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin org.wisdom-framework:wisdom-maven-plugin:0.5-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT -> [Help 2]
[ERROR]     Unknown packaging: wisdom @ line 16, column 16
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

@cescoffier
Copy link
Member

However, once installed in your repo, and as soon as you don’t change the lifecycle mapping, it works…. So, most of the time, it’s ok ;-)

On 18 avr. 2014, at 15:37, Nicolas Delsaux [email protected] wrote:

That's indeed a different story :

[INFO] Scanning for projects...
[WARNING] The POM for org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT is missing, no dependency information available
[ERROR] The build could not read 6 projects -> [Help 1]
[ERROR]
[ERROR] The project org.wisdom-framework:i18n-service:0.5-SNAPSHOT (C:\Users\ndx\Documents\workspaces\git\wisdom\framework\i18n-service\pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin org.wisdom-framework:wisdom-maven-plugin:0.5-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT -> [Help 2]
[ERROR] Unknown packaging: wisdom @ line 16, column 16
[ERROR]
[ERROR] The project org.wisdom-framework:ehcache-cache-service:0.5-SNAPSHOT (C:\Users\ndx\Documents\workspaces\git\wisdom\framework\ehcache-cache-service\pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin org.wisdom-framework:wisdom-maven-plugin:0.5-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT -> [Help 2]
[ERROR] Unknown packaging: wisdom @ line 16, column 16
[ERROR]
[ERROR] The project org.wisdom-framework:hibernate-validation-service:0.5-SNAPSHOT (C:\Users\ndx\Documents\workspaces\git\wisdom\framework\hibernate-validation-service\pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin org.wisdom-framework:wisdom-maven-plugin:0.5-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT -> [Help 2]
[ERROR] Unknown packaging: wisdom @ line 16, column 16
[ERROR]
[ERROR] The project org.wisdom-framework:wisdom-monitor:0.5-SNAPSHOT (C:\Users\ndx\Documents\workspaces\git\wisdom\extensions\wisdom-monitor\pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin org.wisdom-framework:wisdom-maven-plugin:0.5-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT -> [Help 2]
[ERROR] Unknown packaging: wisdom @ line 36, column 16
[ERROR]
[ERROR] The project org.wisdom-framework:documentation:0.5-SNAPSHOT (C:\Users\ndx\Documents\workspaces\git\wisdom\documentation-base\documentation\pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin org.wisdom-framework:wisdom-maven-plugin:0.5-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT -> [Help 2]
[ERROR] Unknown packaging: wisdom @ line 17, column 16
[ERROR]
[ERROR] The project org.wisdom-framework:samples:0.5-SNAPSHOT (C:\Users\ndx\Documents\workspaces\git\wisdom\documentation-base\samples\pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin org.wisdom-framework:wisdom-maven-plugin:0.5-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.wisdom-framework:wisdom-maven-plugin:jar:0.5-SNAPSHOT -> [Help 2]
[ERROR] Unknown packaging: wisdom @ line 16, column 16
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Reply to this email directly or view it on GitHub.

@Riduidel
Copy link
Contributor Author

Yeah, in fact it would require developpers to run a mvn -Pcore each time a new version is started (including for releases, which is absolutly terrific).

@cescoffier
Copy link
Member

That’s why the release process is so…. dreadful

On 18 avr. 2014, at 15:45, Nicolas Delsaux [email protected] wrote:

Yeah, in fact it would require developpers to run a mvn -Pcore each time a new version is started (including for releases, which is absolutly terrific).


Reply to this email directly or view it on GitHub.

@Riduidel
Copy link
Contributor Author

Well, after having read the maven doc a little, i must agree with you : build process is insane :-)
So, here is my proposal : split wisdom sub-folders into independent maven projects. As a consequence, instead of having wsdiom being one maven artifact which can't be built in one step, you'll have 4 independant projects that each can be built in one smooth move.

In fact, latest comment of @aheritier gives the official workaround to apply :

The only existing workaround is to extract your extension (or the plugin defining it) in another independent project (which I agree, is often overkill).

My proposal woud be to have

  • wisdom-core (which would be current core folder)
  • wisdom-runtime (which would be a project building framework, extensions, documentation).

This way, the release would be simplified into two project releases. Obviously, for the sake of consistency, wisdom-runtime sub-projects would continue to refer to wisdom-framework as parent pom, but there would be no way to build runtime from wisdom-framework - I guess it's what make releases so awful to read in doc :-).

What do you think about that ?

@cescoffier
Copy link
Member

It would be great to have such structure.

Just before the last release, we discussed this a little bit. The main issue is that having a second repository leads to have two issue trackers, and so on. I would prefer keeping only one issue tracker (just because, I create dozen of issues every day, and I don’t want to think which tracker I have to use).

There is another point that can be interesting to look a bit deeper: git modules. My experience with them is small (to not say inexistent). Maybe we can check if we can use sub modules to link the core within the runtime.

But every effort made to simplify our build process is more than welcome.

On 18 avr. 2014, at 16:18, Nicolas Delsaux [email protected] wrote:

Well, after having read the maven doc a little, i must agree with you : build process is insane :-)
So, here is my proposal : split wisdom sub-folders into independent maven projects. As a consequence, instead of having wsdiom being one maven artifact which can't be built in one step, you'll have 4 independant projects that each can be built in one smooth move.

In fact, latest comment of @aheritier gives the official workaround to apply :

The only existing workaround is to extract your extension (or the plugin defining it) in another independent project (which I agree, is often overkill).
My proposal woud be to have

wisdom-core (which would be current core folder)
wisdom-runtime (which would be a project building framework, extensions, documentation).
This way, the release would be simplified into two project releases. Obviously, for the sake of consistency, wisdom-runtime sub-projects would continue to refer to wisdom-framework as parent pom, but there would be no way to build runtime from wisdom-framework - I guess it's what make releases so awful to read in doc :-).

What do you think about that ?


Reply to this email directly or view it on GitHub.

Riduidel pushed a commit to Riduidel/wisdom that referenced this issue Apr 18, 2014
…en renamed into wisdom/documentation-base

Technical reason is that maven doesn't allow two modules having the same artifactId and, as a convention, modules are named after the containing folder.
As a consequence, I had two choices :
 - rename wisdom/documentation into documentation-base
 - renamed documentation/documentation into .... what ?

I choosed the first because it's only the parent folder, and not the effective artifact which will contain browsable documentation (well, also because i had no idea of a valid name for the second one).
Riduidel pushed a commit to Riduidel/wisdom that referenced this issue Apr 18, 2014
Building wisdom is now a three-step build :

1 - Go into your wisdom/wisdom-framework folder and "mvn install". It will build wisdom framework base pom. This pom is used by both core and components, and define common dependencies, and so on
2 - Go into your wisdom/core folder and "mvn install". it will build wisdom core (and the in-famous maven plugin)
3 - Then go into wisdom/components subfolder and "mvn install". it will build framework, extensions and documentation-base (in this order)

How release work ? Well, exactly the same way, excpeted one also need to change reference to wisdom-framework parent pom in core and components poms before trying to release them.

Having no experience of such a splitted release with git, I don't know which form the tags/branchs will take .. However, i think it is by far simpler than current build process. in fact, the only thing missing would be a shortcut in root folder allowing one to call all three maven builds.
@cescoffier
Copy link
Member

The main issue with your fix is the release tag. It will generate two 'incomplete' tags. Git tags are a view of the complete repository, meaning that if we release the core, the tag contains snapshot versions of the runtime. So tags are not 'full build'. That's why I was mentioning the fact to have a separated project because it's the only way to get the release tag working.

@cescoffier
Copy link
Member

So, to sum up here are the possibilities:

  1. Restructure into two big modules: core and runtime
    That's more or less what @Riduidel proposes. However, we need a parent pom for releases, and the release process cannot be automated using the maven-release-plugin.
+ : 1 repository, 1 issue tracker
- : cannot use the maven-release-plugin
  1. Move core into another repository
    The core project move to their own repository, and are release separately. Obviously there are some dependencies between core and framework.
+ : we can use the maven-release-plugin, but the release is done in two steps (core and then framework)
- : it's a second repository meaning that we may have to handle two issue trackers. 

WDYT ?

@cescoffier
Copy link
Member

I've met @jponge yesterday and he had the same issue in golo-lang. He use a Rake file to ease the bug. Might be a solution.

The rake file is here: https://github.com/golo-lang/golo-lang/blob/master/Rakefile

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

No branches or pull requests

2 participants