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

ASF GitHub Bot commented on QUARKS-139:
---------------------------------------

Github user bjhargrave commented on a diff in the pull request:

    https://github.com/apache/incubator-quarks/pull/131#discussion_r66337307
  
    --- Diff: 
console/server/src/main/java/quarks/console/server/ServerUtil.java ---
    @@ -45,31 +53,35 @@ private String getPath() {
          * @return a File object
          */
         private File getTopDirFilePath() {
    +        String topDirProp = System.getProperty("top.dir.file.path");
    +        if (topDirProp != null) {
    +          return new File(topDirProp);
    +        }
             File jarFile = new File(getPath());
             return jarFile.getParentFile().getParentFile().getParentFile();
         }
     
    -    // create new filename filter
    -    FilenameFilter fileNameFilter = new FilenameFilter() {
    -
    -        @Override
    -        public boolean accept(File dir, String name) {
    -            if (name.equals("webapps")) {
    -                return true;
    -            }
    -            else {
    -                return false;
    -            }
    -        }
    -    };
         /**
          * Returns the File object representing the "webapps" directory
          * @return a File object or null if the "webapps" directory is not 
found
          */
         private File getWarFilePath() {
    -        File[] foundFiles = getTopDirFilePath().listFiles(fileNameFilter);
    -        if (foundFiles.length == 1) {
    -            return foundFiles[0];
    +        List<File> foundFiles = new ArrayList<>();
    --- End diff --
    
    It had to change because this code is badly dependent upon the structure of 
the build. It assumed that the jars all sit in target/java... getTopDirFilePath 
assume ../../.. from the jar to find the webapp. Since the gradle build uses 
normal gradle output locations, the webapp folder is elsewhere. 
c52ecf7ca8ec1f31ed99c4e944f02185f56833c4 is the commit to be more flexible in 
locating the webapps folder in the build.


> Adopt a build system, such as gradle, that supports transitive dependency 
> management
> ------------------------------------------------------------------------------------
>
>                 Key: QUARKS-139
>                 URL: https://issues.apache.org/jira/browse/QUARKS-139
>             Project: Quarks
>          Issue Type: Improvement
>          Components: Analytics, API, Applications, Connectors, Console, 
> Documentation, Miscellaneous, Runtime, Samples, Test, Utils
>            Reporter: Lance Feagan
>              Labels: build
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> By moving to a build system that supports transitive dependency management, 
> the repository size can be decreased and users can more easily integrate 
> quarks with their own applications by allowing the version of a dependency to 
> float within an acceptable range, assuming proper semantic versioning of the 
> dependencies.
> I have an initial set of work for this effort completed using gradle. Nearly 
> all sub-projects build at this time--the notable exception being the 
> android-dependent sub-projects. The other notable missing element is the 
> integration of JaCoCo. In both cases, these should be simple additions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to