Coder Social home page Coder Social logo

Comments (4)

searls avatar searls commented on July 24, 2024

Hi @davidpadbury -- apologies for the inconvenience The plugin originally copied everything (even .svn files), then it only copied JS files, then started copying everything (minus some default excludes).

Background: The current rationale for the default is that many JavaScript will try to pull in relative-pathed resources via AJAX, so anything under the $jsSrcDir is copied by default. I'm pretty sure that the operation to move everything is using [FileUtils.copyDirectory](http://commons.apache.org/io/apidocs/org/apache/commons/io/FileUtils.html#copyDirectory(java.io.File,%20java.io.File,%20java.io.FileFilter), which has a sort of clunky API for excluding/filtering.

I like the default where it is, but I think you're right, that an option to filter to only whatever the srcIncludes do (which is */.js by default) makes sense. It's just not trivial because the API being used to copy the directories can't read a normal collection of include/exclude strings.

As a workaround, have you considered limiting your JavaScript to a directory and pointing your $jsSrcDir at that directory, so other resource types aren't included when they don't need to be?

from jasmine-maven-plugin.

davidpadbury avatar davidpadbury commented on July 24, 2024

We're using JavaScript in multiple places in the app so unfortunately I can't limit to a single directory.

You're copying the files using a IOFileFilter and it looks like it's possible to add some kind of filename filter fairly easily (WildcardFileFilter).

I may have a bash at implementing a file filter sometime soon.

from jasmine-maven-plugin.

searls avatar searls commented on July 24, 2024

Cool. I just ask for your help in providing unit tests for it. I'd prefer for it to be configurable via a boolean property in AbstractJasmineMojo, because part of the reason for the existing behavior was feedback from teams who needed exactly the behavior you're trying to avoid :)

from jasmine-maven-plugin.

klieber avatar klieber commented on July 24, 2024

As of version 1.3.1.0 files are no longer copied to the target directory so this issue is no longer relevant.

from jasmine-maven-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.