Coder Social home page Coder Social logo

Grunt modifies source files about mamute HOT 14 OPEN

monitorjbl avatar monitorjbl commented on August 12, 2024
Grunt modifies source files

from mamute.

Comments (14)

csokol avatar csokol commented on August 12, 2024

To package the application we are using the script in
scripts/mvn-package.sh, which copies the build files into a temp dir. This
is a simple solution but I think that we should have a more elegant
solution to fix this.

Chico Sokol

On Wed, Sep 24, 2014 at 1:18 AM, monitorjbl [email protected]
wrote:

Not sure if this is intended or not, but Grunt modifies the actual source
files when it runs in the Maven build. I think this should only happen in
the target directory.


Reply to this email directly or view it on GitHub
#74.

from mamute.

monitorjbl avatar monitorjbl commented on August 12, 2024

Is that a new thing? I tried building the latest from master last night and I saw all of the Javascript/CSS files being modified when I ran git status.

from mamute.

csokol avatar csokol commented on August 12, 2024

Sorry, I wasn't clear enough. To generate the war you should execute the
script:

$ scripts/mvn-package.sh

If you generate the build directly with maven (mvn package) it will modify
js/css files.

Chico Sokol

On Wed, Sep 24, 2014 at 10:29 AM, monitorjbl [email protected]
wrote:

Is that a new thing? I tried building the latest from master last night
and I saw all of the Javascript/CSS files being modified when I ran git
status.


Reply to this email directly or view it on GitHub
#74 (comment).

from mamute.

monitorjbl avatar monitorjbl commented on August 12, 2024

Ah, I see. Want to leave this issue open for that more elegant solution, or is it alright to close it?

from mamute.

csokol avatar csokol commented on August 12, 2024

I you can leave it open. It makes sense to find a solution integrated with
maven.

Chico Sokol

On Wed, Sep 24, 2014 at 10:39 AM, monitorjbl [email protected]
wrote:

Ah, I see. Want to leave this issue open for that more elegant solution,
or is it alright to close it?


Reply to this email directly or view it on GitHub
#74 (comment).

from mamute.

leocwolter avatar leocwolter commented on August 12, 2024

I think we could stop running the grunt task at package phase and execute it explicitly at mvn-package.sh, it should be enough.

from mamute.

leocwolter avatar leocwolter commented on August 12, 2024

Oh, sorry, we can't, this would break previous versions of mamute if they want to update it

from mamute.

csokol avatar csokol commented on August 12, 2024

I prefer to find a way to customize mvn package and remove the shell
script. It's more natural since our project is based on maven.

Chico Sokol

On Wed, Sep 24, 2014 at 11:47 AM, Leonardo Cesar Wolter <
[email protected]> wrote:

Oh, sorry, we can't, this would break previous versions of mamute if they
want to update it


Reply to this email directly or view it on GitHub
#74 (comment).

from mamute.

leocwolter avatar leocwolter commented on August 12, 2024

Yes, but we can't stop running the grunt task on package since the old update-mamute.sh script will call mvn package. If we stop running it will generate an invalid instance of mamute(without any assets)

from mamute.

monitorjbl avatar monitorjbl commented on August 12, 2024

I believe one of the Maven lifecycle events puts all the resources in target. Couldn't you direct Grunt to run against that directory instead?

from mamute.

csokol avatar csokol commented on August 12, 2024

My idea is to run grunt during the package phase, and grunt should be
configured to touch the files in the target/mamute-version/ directory only
(this was how it was done with ant)

Chico Sokol

Yes, but we can't stop running the grunt task on package since the old
update-mamute.sh script will call mvn package. If we stop running it will
generate an invalid instance of mamute(without any assets)


Reply to this email directly or view it on GitHub
#74 (comment).

from mamute.

leocwolter avatar leocwolter commented on August 12, 2024

Yes, it would be great. I'm guessing the plugin supports this: https://github.com/allegro/grunt-maven-plugin#environment

from mamute.

leocwolter avatar leocwolter commented on August 12, 2024

@monitorjbl @csokol any news about that?

from mamute.

xuanit avatar xuanit commented on August 12, 2024

Hi Mamute Team,

In order to build the site by "mvn install", I did modify the pom.xml as below.

  • Copy all files from webapp to a tmp folder before the grunt command executed by using "maven-antrun-plugin".
  • Modify the configurations of Grunt to update the files in the tmp folder.
  • Modify maven-war-plugin to package files from tmp folder instead of webapp.

Regards,
Xuan

from mamute.

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.