Re: Handling of LICENSE.txt and NOTICE.txt on trunk
I've implemented another solution, this time not dragging all of the
classes that Groovy needs into the classloader, which appears to have
caused the car plugin to freak out.
I added a new mojo to the tools-maven-plugin, 'copy-legal-files' that
is very specific and only handles the copy of the LICENSE.txt and
NOTICE.txt files for inclusion into archives, as in:
org.apache.geronimo.genesis.plugins
tools-maven-plugin
1.0.0-SNAPSHOT
install-legal-files
generate-resources
copy-legal-files
I have also cleaned up the remaining (I think) resource includes that
were causing the Eclipse plugin to generate bunk .classpath files. If
someone want to give it a whirl and let me know if Eclipse complains
about any overlapping directories...
--jason
On 8/21/06, Jason Dillon <[EMAIL PROTECTED]> wrote:
I recently discovered that if a parent pom adds an antrun plugin
execution to build, that children can not add dependencies, which
causes some problems further down in the build. I was going to use
antrun to install LICENSE.txt and NOTICE.txt into target/classes/META-
INF as a work around to the problem that occurs when we added them to
build/resources that caused the maven-eclipse-plugin to barf.
So I finally gave up and create a new plugin which allows Groovy
scripts to be executed inline and with the AntBuilder we can execute
Ant bits, as well as perform logic operations all within a pom. And
I setup the project-config pom to add an execution that will copy
LICENSE.txt and NOTICE.txt from the module root to target/classes/
META-INF for all modules unless the packaging is pom, with:
org.apache.geronimo.genesis.plugins
script-maven-plugin
1.0.0-SNAPSHOT
install-licenses-and-notice
generate-resources
groovy
if (project.packaging != "pom") {
def ant = new AntBuilder()
def dir = "${project.basedir}/target/
classes/META-INF"
ant.mkdir(dir: dir)
ant.copy(todir: dir) {
fileset(dir: "${project.basedir}") {
include(name: "LICENSE.txt")
include(name: "NOTICE.txt")
}
}
}
The new script-maven-plugin is a tad different than the groovy-maven-
plugin in the mojo sandbox, primarily allows the code for the script
to be defined in the pom or at an external URL. Also allows extra
dependencies to be added outside of the normal Maven plugin
dependency mechanism, since antrun has shown that it is broken for
parent and child configurations.
There are still however a few issues remaining that prevent `mvn
eclipse:eclipse` from generating clean .classpath files, which will
be fixed when we move modules to use the standard m2 layout.
--jason
Re: Handling of LICENSE.txt and NOTICE.txt on trunk
Okay, I take it back... Maven plugin dependency handling is
completely broke, as it pollutes the classpath of other plugins...
With this change the car plugin starts to barf... so for the time
being I'm backing this out.
--jason
On Aug 21, 2006, at 10:54 PM, Jason Dillon wrote:
I recently discovered that if a parent pom adds an antrun plugin
execution to build, that children can not add dependencies, which
causes some problems further down in the build. I was going to use
antrun to install LICENSE.txt and NOTICE.txt into target/classes/
META-INF as a work around to the problem that occurs when we added
them to build/resources that caused the maven-eclipse-plugin to barf.
So I finally gave up and create a new plugin which allows Groovy
scripts to be executed inline and with the AntBuilder we can
execute Ant bits, as well as perform logic operations all within a
pom. And I setup the project-config pom to add an execution that
will copy LICENSE.txt and NOTICE.txt from the module root to target/
classes/META-INF for all modules unless the packaging is pom, with:
org.apache.geronimo.genesis.plugins
script-maven-plugin
1.0.0-SNAPSHOT
install-licenses-and-notice
generate-resources
groovy
if (project.packaging != "pom") {
def ant = new AntBuilder()
def dir = "${project.basedir}/target/
classes/META-INF"
ant.mkdir(dir: dir)
ant.copy(todir: dir) {
fileset(dir: "${project.basedir}") {
include(name: "LICENSE.txt")
include(name: "NOTICE.txt")
}
}
}
The new script-maven-plugin is a tad different than the groovy-
maven-plugin in the mojo sandbox, primarily allows the code for the
script to be defined in the pom or at an external URL. Also allows
extra dependencies to be added outside of the normal Maven plugin
dependency mechanism, since antrun has shown that it is broken for
parent and child configurations.
There are still however a few issues remaining that prevent `mvn
eclipse:eclipse` from generating clean .classpath files, which will
be fixed when we move modules to use the standard m2 layout.
--jason
Handling of LICENSE.txt and NOTICE.txt on trunk
I recently discovered that if a parent pom adds an antrun plugin
execution to build, that children can not add dependencies, which
causes some problems further down in the build. I was going to use
antrun to install LICENSE.txt and NOTICE.txt into target/classes/META-
INF as a work around to the problem that occurs when we added them to
build/resources that caused the maven-eclipse-plugin to barf.
So I finally gave up and create a new plugin which allows Groovy
scripts to be executed inline and with the AntBuilder we can execute
Ant bits, as well as perform logic operations all within a pom. And
I setup the project-config pom to add an execution that will copy
LICENSE.txt and NOTICE.txt from the module root to target/classes/
META-INF for all modules unless the packaging is pom, with:
org.apache.geronimo.genesis.plugins
script-maven-plugin
1.0.0-SNAPSHOT
install-licenses-and-notice
generate-resources
groovy
if (project.packaging != "pom") {
def ant = new AntBuilder()
def dir = "${project.basedir}/target/
classes/META-INF"
ant.mkdir(dir: dir)
ant.copy(todir: dir) {
fileset(dir: "${project.basedir}") {
include(name: "LICENSE.txt")
include(name: "NOTICE.txt")
}
}
}
The new script-maven-plugin is a tad different than the groovy-maven-
plugin in the mojo sandbox, primarily allows the code for the script
to be defined in the pom or at an external URL. Also allows extra
dependencies to be added outside of the normal Maven plugin
dependency mechanism, since antrun has shown that it is broken for
parent and child configurations.
There are still however a few issues remaining that prevent `mvn
eclipse:eclipse` from generating clean .classpath files, which will
be fixed when we move modules to use the standard m2 layout.
--jason
