You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Adam George (JIRA)" <ji...@apache.org> on 2018/06/22 10:11:00 UTC

[jira] [Commented] (BUILDR-734) Buildr won't generate a POM in projects with multiple packages

    [ https://issues.apache.org/jira/browse/BUILDR-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16520208#comment-16520208 ] 

Adam George commented on BUILDR-734:
------------------------------------

For what it's worth, I also tried wrapping the "package(:war)" statements in project...do...end blocks as suggested here: https://buildr.apache.org/packaging.html

This, however, just produced the following error:

{quote}
Buildr aborted!
RuntimeError : You can only define a sub project (sql) within the definition of its parent project
/home/atg/dev/workspace/PowerPlanner/buildfile:106:in `block in <top (required)>'
/usr/lib64/ruby/gems/2.5.0/gems/buildr-1.5.6/lib/buildr/core/application.rb:425:in `raw_load_buildfile'
/usr/lib64/ruby/gems/2.5.0/gems/buildr-1.5.6/lib/buildr/core/application.rb:224:in `block in load_buildfile'
/usr/lib64/ruby/gems/2.5.0/gems/buildr-1.5.6/lib/buildr/core/application.rb:219:in `load_buildfile'
{quote}

Not really sure if that's a separate issue or not, but the subproject definitions are definitely nested inside the define...do block as instructed.

> Buildr won't generate a POM in projects with multiple packages
> --------------------------------------------------------------
>
>                 Key: BUILDR-734
>                 URL: https://issues.apache.org/jira/browse/BUILDR-734
>             Project: Buildr
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 1.5.2
>         Environment: Linux (64-bit), Ruby 2.5.0, Buildr 1.5.6
>            Reporter: Adam George
>            Priority: Major
>
> With Buildr 1.5.2+, it seems that when instructions to build ZIP archives are added to the buildfile there is no .pom file generated in the output folder.
> The following simple buildfile is enough to reproduce the issue:
> # Generated by Buildr 1.5.6, change to your liking
> repositories.remote << 'http://repo1.maven.org/maven2'
> DUMMY_DEPENDENCIES = 'org.hamcrest:hamcrest-core:jar:1.3'
> desc "Test project for stackoverflow.com"
> define 'no-pom' do
>   project.group = "test"
>   project.version = '1.0-SNAPSHOT'
>   test.with DUMMY_DEPENDENCIES
>   package(:zip, :file => _("target", "configuration.zip")).include(_("conf"))
>   package(:war).with :libs => [DUMMY_DEPENDENCIES]
> end
> This is based on the classic Maven2 auto-generated project, with {{App.java}} and the "rigorous" {{AppTest.java}}. All I added to it was the conf folder in the project root, which just contains one dummy text file.
> If you run the above then you get a WAR and "configuration.zip" created but no .pom file. If you comment out the instruction to zip the conf folder then you get a .pom file generated along with the WAR file. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)