Bug 1020902 - BPMS: Product release contains source code
BPMS: Product release contains source code
Status: VERIFIED
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.0.0
Unspecified Unspecified
low Severity medium
: DR1
: 6.3.0
Assigned To: Petr Široký
Tomas Livora
:
: 1026693 (view as bug list)
Depends On:
Blocks: 1026695
  Show dependency treegraph
 
Reported: 2013-10-18 09:32 EDT by Tomas Livora
Modified: 2016-03-14 06:36 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Livora 2013-10-18 09:32:34 EDT
Description of problem:
Product release contains *.java files with source code. They should not be there.

Steps to Reproduce:
1. find . -name "*.java"

Actual results:
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/backend/RequestScopedProducer.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/backend/UberFireIdentityProvider.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/backend/AppSetup.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/backend/ApplicationScopedProducer.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/home/HomeProducer.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/navbar/ComplementNavAreaPresenter.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/navbar/LogoWidgetPresenter.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/navbar/LogoWidgetView.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/navbar/AppNavBar.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/navbar/ComplementNavAreaView.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/resources/i18n/AppConstants.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/resources/AppResource.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/resources/images/AppImages.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/perspectives/AdministrationPerspective.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/perspectives/DroolsAuthoringPerspectiveActivity.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/perspectives/DroolsAuthoringPerspective.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/perspectives/AdministrationPerspectiveActivity.java
./standalone/deployments/business-central.war/WEB-INF/classes/org/kie/workbench/client/KieWorkbenchEntryPoint.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/common/rs/ajax_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/common/panels/beforePanel_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/common/panels/afterPanel_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/common/panels/commonRefreshFormPanels_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/login_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/panels/kpi/show_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/panels/navigation/menu/show_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/panels/navigation/tree_005fmenu/show_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/panels/navigation/breadCrumb/show_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/panels/navigation/logout/show_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/panels/advanced_005fhtml/show_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/panels/dashboard/filter/show_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/envelopes/Default_005fEnvelope/shared_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/envelopes/jbpmEnvelope/shared_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/table/view_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/table/cursor_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/colorpicker/js/colorPicker_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/datepicker/js/datetimepicker_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/datepicker/js/datePicker_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/modalDialogComponent/show_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/logout/show_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/bam/displayer/table/table_005fviewer_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/bam/displayer/chart/nvd3_005fpiechart_005fviewer_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/bam/displayer/chart/nvd3_005fcss_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/bam/displayer/chart/nvd3_005fbarchart_005fviewer_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/bam/kpi_005fview_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/bam/dashboard_005ffilter/short_/properties_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/bam/dashboard_005ffilter/short_/show_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/bam/dashboard_005ffilter/filter_005fhelp_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/components/bam/kpi_005fform_005fmanagement_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/section/render_005fpanel_005fmenu_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/section/render_005ftabbed_005fregion_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/section/render_005fsimple_005fregion_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/layouts/jbpmLayout/slider_005fmenu_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/layouts/Default_005ftemplate_005fwith_005fsliding_005fmenu/slider_005fmenu_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/templates/js_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/templates/unassigned_005fpanels_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/templates/section_005fselector_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/templates/footer_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/templates/navigatorDetection_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/templates/content_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/templates/header_005ftop_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/templates/standard_005ftemplate_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/templates/workspace_005fselector_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/templates/styles_jsp.java
./standalone/tmp/work/jboss.web/default-host/dashbuilder/org/apache/jsp/templates/regular_005flayout_jsp.java
./standalone/tmp/work/jboss.web/default-host/business-central/org/apache/jsp/login_jsp.java
./standalone/tmp/work/jboss.web/default-host/business-central/org/apache/jsp/formModeler/fieldHandlers/InputText/input_jsp.java
./standalone/tmp/work/jboss.web/default-host/business-central/org/apache/jsp/formModeler/components/messages/show_jsp.java
./standalone/tmp/work/jboss.web/default-host/business-central/org/apache/jsp/formModeler/components/renderer/component_jsp.java
./standalone/tmp/work/jboss.web/default-host/business-central/org/apache/jsp/formModeler/components/renderer/show_jsp.java
./standalone/tmp/work/jboss.web/default-host/business-central/org/apache/jsp/formModeler/controllerResponse_jsp.java
./standalone/tmp/work/jboss.web/default-host/business-central/org/apache/jsp/formModeler/defaultFormErrors_jsp.java
./standalone/tmp/work/jboss.web/default-host/business-central/org/apache/jsp/org_kie_workbench_KIEWebapp/inlineeditor_jsp.java
./standalone/tmp/work/jboss.web/default-host/business-central/org/apache/jsp/org_kie_workbench_KIEWebapp/simulation/default_jsp.java
./standalone/tmp/work/jboss.web/default-host/business-central/org/apache/jsp/index_jsp.java

Expected results:
No *.java files in the product release.
Comment 3 Alexandre Porcelli 2013-10-23 09:04:14 EDT
This is related to GWT needs - GWT compiler needs access to java source files in order  to translate it to javascript.
Some of the above .java files are not needed like pure backend ones like ApplicationScopedProducer.java and all jsp related as well. If you check, most of the jar's used by application includes source files as well.

Of course would be possible to clean up war and all jars in the assembly phase...
Comment 4 Marek Baluch 2013-11-06 09:25:10 EST
*** Bug 1026693 has been marked as a duplicate of this bug. ***
Comment 7 Ryan Zhang 2014-02-19 07:20:03 EST
Change component to project
Comment 9 Rajesh Rajasekaran 2014-02-20 14:28:50 EST
*** Bug 1026695 has been marked as a duplicate of this bug. ***
Comment 10 Geoffrey De Smet 2014-03-28 11:26:53 EDT
The community build does not build business-central.war. It builds dashbuilder-demo.war, but that does not contain any java source files. I suspect this issue is purely in the product build.

This is probably due to a legacy configured GWT build. A modern maven GWT plugin picks up the sources jars it needs automatically from it's normal jar dependencies, and it puts those sources jars in the GWT compilation path, but it does NOT pollute the war output with those sources jars or require them to be added as dependencies.
Comment 11 Geoffrey De Smet 2014-03-28 11:27:20 EDT
Julian, can someone in your team verify that this issue is indeed only in the product build?
Comment 12 Geoffrey De Smet 2014-03-28 11:46:09 EDT
The trick we use to avoid polluting source files in our wars, is the use of <compileSourcesArtifacts> in gwt-maven-plugin:

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <configuration>
          ...
          <compileSourcesArtifacts>
            <compileSourcesArtifact>org.guvnor:guvnor-inbox-api</compileSourcesArtifact>
            <compileSourcesArtifact>org.guvnor:guvnor-inbox-client</compileSourcesArtifact>
            ...
          </>
        </>
      </>
Comment 14 Tomas Livora 2014-06-23 05:33:54 EDT
The jbpm-console-6.0.1.Final.war file from the community build includes Java files mentioned above too. However, temporary files are also listed in the first post. The actual list of all relevant Java files:

./WEB-INF/classes/org/kie/workbench/backend/UberFireIdentityProvider.java
./WEB-INF/classes/org/kie/workbench/backend/ApplicationScopedProducer.java
./WEB-INF/classes/org/kie/workbench/backend/AppSetup.java
./WEB-INF/classes/org/kie/workbench/client/navbar/ComplementNavAreaPresenter.java
./WEB-INF/classes/org/kie/workbench/client/navbar/AppNavBar.java
./WEB-INF/classes/org/kie/workbench/client/navbar/LogoWidgetView.java
./WEB-INF/classes/org/kie/workbench/client/navbar/LogoWidgetPresenter.java
./WEB-INF/classes/org/kie/workbench/client/navbar/ComplementNavAreaView.java
./WEB-INF/classes/org/kie/workbench/client/KieWorkbenchEntryPoint.java
./WEB-INF/classes/org/kie/workbench/client/security/KieWorkbenchFeatures.java
./WEB-INF/classes/org/kie/workbench/client/resources/images/AppImages.java
./WEB-INF/classes/org/kie/workbench/client/resources/i18n/AppConstants.java
./WEB-INF/classes/org/kie/workbench/client/resources/AppResource.java
./WEB-INF/classes/org/kie/workbench/client/home/HomeProducer.java
./WEB-INF/classes/org/kie/workbench/client/perspectives/AdministrationPerspectiveActivity.java
./WEB-INF/classes/org/kie/workbench/client/perspectives/DroolsAuthoringPerspectiveActivity.java
./WEB-INF/classes/org/kie/workbench/client/perspectives/DroolsAuthoringPerspective.java
./WEB-INF/classes/org/kie/workbench/client/perspectives/AdministrationPerspective.java
./WEB-INF/classes/org/kie/workbench/client/perspectives/M2RepoPerspective.java
./WEB-INF/classes/org/kie/workbench/client/perspectives/M2RepoPerspectiveActivity.java
Comment 16 Tomas Livora 2015-09-07 07:01:01 EDT
I can still see most of the *.java files mentioned above in BPMS 6.2.0 ER1:

./WEB-INF/classes/org/kie/workbench/client/resources/i18n/AppConstants.java
./WEB-INF/classes/org/kie/workbench/client/perspectives/DroolsAuthoringNoContextNavigationPerspective.java
./WEB-INF/classes/org/kie/workbench/client/perspectives/DroolsAuthoringPerspective.java
./WEB-INF/classes/org/kie/workbench/client/perspectives/M2RepoPerspective.java
./WEB-INF/classes/org/kie/workbench/client/perspectives/AdministrationPerspective.java
./WEB-INF/classes/org/kie/workbench/client/KieWorkbenchEntryPoint.java
./WEB-INF/classes/org/kie/workbench/client/RepositoryPreferencesProducer.java
./WEB-INF/classes/org/kie/workbench/client/navbar/ComplementNavAreaView.java
./WEB-INF/classes/org/kie/workbench/client/navbar/LogoWidgetView.java
./WEB-INF/classes/org/kie/workbench/client/navbar/AppNavBar.java
./WEB-INF/classes/org/kie/workbench/client/navbar/LogoWidgetPresenter.java
./WEB-INF/classes/org/kie/workbench/client/navbar/ComplementNavAreaPresenter.java

Alexandre, in comment 3 you have mentioned that GWT needs some of these source code files. Is it still a valid reason to have them in the product build? Cannot they be removed?
Comment 17 Tomas Livora 2015-10-20 11:12:17 EDT
After discussion with Alexandre, I was told that it is possible to completely remove these Java files during the build process. So I am setting this BZ back to ASSIGNED.
Comment 18 Petr Široký 2015-11-26 12:52:01 EST
Fixed on master:
https://github.com/droolsjbpm/kie-wb-distributions/commit/62e79f150c7b7bcfe7433005a5dfba0a1b9414a3

'find -name "*.java"' in kie-wb-distribution-wars/target and kie-drools-wb-distribution-wars/target return empty list after the changes.
Comment 19 Tomas Livora 2016-03-14 06:36:57 EDT
Verified on BPM Suite 6.3.0 DR2

Note You need to log in before you can comment on or make changes to this bug.