Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<triggerfile> #329

Open
radut opened this issue Jan 5, 2016 · 1 comment · May be fixed by #955
Open

<triggerfile> #329

radut opened this issue Jan 5, 2016 · 1 comment · May be fixed by #955

Comments

@radut
Copy link

radut commented Jan 5, 2016

Trigger file does not work for me, it always fire up full build even if the files in trigger file didn't change
version 0.26, execution gulp.

                <execution>
                    <id>gulp</id>
                    <goals>
                        <goal>gulp</goal>
                    </goals>
                    <!-- <phase>generate-resources</phase> -->
                    <configuration>
                        <srcdir>${basedir}</srcdir>
                        <arguments>--no-color ${gulp.wiredep} </arguments>
                        <triggerfiles>
                            <triggerfile>gulpfile.js</triggerfile>
                            <triggerfile>bower.json</triggerfile>
                        </triggerfiles>
                    </configuration>
                </execution>
@Cavva79
Copy link
Contributor

Cavva79 commented Dec 19, 2017

+1

I've the same behavior on v1.6

The problem is here https://github.com/eirslett/frontend-maven-plugin/blob/4f21ed9a467fe407f849356957e2b9c27e5eb972/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/MojoUtils.java#L83-100
Where if you have set triggerfile and not set scrdir the return of https://github.com/eirslett/frontend-maven-plugin/blob/4f21ed9a467fe407f849356957e2b9c27e5eb972/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/MojoUtils.java#L91-93
should return triggerfiles == null;.
This just in case srcdir is not set the plugin should think there is not a modification, otherwise it will always fire the execution.

My workaround:

<execution>
	<id>gulp-build</id>
	<goals>
		<goal>gulp</goal>
	</goals>
	<phase>generate-resources</phase>
	<configuration>
		<arguments>build ${frontend.deploy}</arguments>
		<triggerfiles>
			<triggerfile>Gulpfile.js</triggerfile>
			<triggerfile>package.json</triggerfile>
		</triggerfiles>
		<srcdir>src/main/unused</srcdir>
	</configuration>
</execution>
<execution>
	<id>gulp-styles</id>
	<goals>
		<goal>gulp</goal>
	</goals>
	<phase>generate-resources</phase>
	<configuration>
		<arguments>styles ${frontend.deploy}</arguments>
		<srcdir>src/main/frontend/css/</srcdir>
	</configuration>
</execution>
<execution>
	<id>gulp-js</id>
	<goals>
		<goal>gulp</goal>
	</goals>
	<phase>generate-resources</phase>
	<configuration>
		<arguments>javascripts ${frontend.deploy}</arguments>
		<srcdir>src/main/frontend/js/</srcdir>
	</configuration>
</execution>

Cavva79 added a commit to Cavva79/frontend-maven-plugin that referenced this issue Dec 20, 2017
If triggerfile is define and srcdir it isn't any file changed trigger
the build. This behavior should be that just triggerfile must trigger
the build.
@zraexy zraexy linked a pull request Feb 1, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants