________________________________
From: Thorsten Schöning <[email protected]>
Sent: Saturday, September 9, 2017 6:25 AM
To: Martin Gainty
Subject: Re: [AXIS2] Some project builds fail if goal "clean" is not used
Guten Tag Martin Gainty,
am Samstag, 9. September 2017 um 02:28 schrieben Sie:
> the built-in maven-compiler-plugin (the default of compile phase) compile
> *default* is not full but incremental compile
> of special note is the lastModGranularityMs parameter which you can set in
> maven-compiler-plugin configuration
But there need to be something then which deletes already existing
compiled Java classes for no reason. Is that maven as well? Doesn't
make sense if it's afterwards not compiling what has been deleted
before. Sounds to me the deletion comes from somewhere else.
MG>maven-compiler-plugin (with incremental) overwrites most recent changed
classes inside target\classes and target\test-classes
MG>maven-compiler-plugin (full compile) compiles and overwrites ALL classes
(changed or not)
MG>as you have already discovered default behaviour for mvn clean is to delete
ALL classes in target\classes and target\test-classes
MG>if you want mvn clean to delete specific filesets then you would configure
maven-clean-plugin excludeDefaultDirectories=true
MG>then specify which specific filesets you want to delete thru include.... or
omit from deletion via excludes e.g.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin>
<configuration>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>src/main/generated</directory>
<followSymlinks>false</followSymlinks>
<!-- Whether standard exclusion patterns, such as those matching CVS and
Subversion metadata files, should be used when calculating the files affected
by this set. For backward compatibility, the default value is true. -->
<useDefaultExcludes>true</useDefaultExcludes>
<includes>
<!-- include deletion of all class files -->
<include>*.class</include>
</includes>
<excludes>
<!-- exclude deletion of template files -->
<exclude>Template*</exclude>
</excludes>
http://maven.apache.org/plugins/maven-clean-plugin/clean-mojo.html
Apache Maven Clean Plugin –
clean:clean<http://maven.apache.org/plugins/maven-clean-plugin/clean-mojo.html>
maven.apache.org
Goal which cleans the build. This attempts to clean a project's working
directory of the files that were generated at build-time. By default, it
discovers and deletes ...
MG>unless you have aspectj -> java or some other conversion in place OR
MG> have specified an ant deletion there should be no "automatic deletion" of
directories in mvn
MG>https://ant.apache.org/manual/Tasks/delete.html
Delete Task - Apache Ant<https://ant.apache.org/manual/Tasks/delete.html>
ant.apache.org
Delete Description. Deletes a single file, a specified directory and all its
files and subdirectories, or a set of files specified by one or more resource
collections.
MG>jenkins of course has its own delete plugin but i didnt hear you are using
that so we will leave that for another day..
Mit freundlichen Grüßen,
Thorsten Schöning
MG>gruss
MG>martin
Thorsten Schöning E-Mail: [email protected]
AM-SoFT IT-Systeme http://www.AM-SoFT.de/
Webpräsenz AM-SoFT IT-Systeme GmbH - Startseite<http://www.am-soft.de/>
www.am-soft.de
AM-SoFT IT-Systeme „Neue Wege entstehen, indem wir sie gehen!“ AM-SoFT GmbH
IT-Systeme, 1989 in Hameln gegründet, ist EDV-Systemhaus,
Internet-Service-Provider ...
Telefon...........05151- 9468- 55
Fax...............05151- 9468- 88
Mobil..............0178-8 9468- 04
AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]