Discussion:
build-helper-maven-plugin add-resource
Reginald Blank
2012-06-12 10:59:54 UTC
Permalink
I'd like to add some Spring xml configuration files to my existing
WEB-INF spring configuration files in WEB-INF. They differ by
customer. I've tried using ant which, understandably make eclipse
quite upset I've tried using build-help-maven-plugin but it doesn't
seem to work. Here is my plugin config. Have I got the paths correct?
I am using STS 2.9.x

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>./src/customers/mycustomer/main/webapp/WEB-INF/spring</directory>
<targetPath>/WEB-INF/spring</targetPath>
<excludes>
<exclude>**/.svn/**</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
Igor Fedorenko
2012-06-12 11:07:21 UTC
Permalink
You need to have m2e/buildhelper integration installed. You should have
"execution not covered" error marker on the pom.xml with quick-fix to
install needed bits from m2e discovery catalog. You can also install
m2e/builderhelper using m2e discovery catalog
(preferences->maven->discovery).

I am not sure m2e/buildhelper supports <excludes> though, so svn stuff
may get into your web-inf dir.

--
Regards,
Igor
Post by Reginald Blank
I'd like to add some Spring xml configuration files to my existing
WEB-INF spring configuration files in WEB-INF. They differ by
customer. I've tried using ant which, understandably make eclipse
quite upset I've tried using build-help-maven-plugin but it doesn't
seem to work. Here is my plugin config. Have I got the paths correct?
I am using STS 2.9.x
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>./src/customers/mycustomer/main/webapp/WEB-INF/spring</directory>
<targetPath>/WEB-INF/spring</targetPath>
<excludes>
<exclude>**/.svn/**</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Reginald Blank
2012-06-12 12:41:09 UTC
Permalink
You need to have m2e/buildhelper integration installed. You should have
"execution not covered" error marker on the pom.xml with quick-fix to
install needed bits from m2e discovery catalog.

I know what you mean but that hasn't appeared. I'll try to add the
stuff anyway by hand and see what happens.

You can also install
m2e/builderhelper using m2e discovery catalog
(preferences->maven->discovery).

I am also aware of this route but that connector doesn't appear in the
list either.

I am not sure m2e/buildhelper supports <excludes> though, so svn stuff
may get into your web-inf dir.


--
Regards,
Igor
Reginald Blank
2012-06-13 08:11:31 UTC
Permalink
It looks like I already have the connector installed - from my attempt
to use ant.
Unfortunately nothing appears to happen.
I wonder if the target path is wrong?
I am using build automatically, how do I check that my build helper is
actually getting called. I have debug output switched on for m2e, but
I can't see anything useful.
Igor Fedorenko
2012-06-13 10:44:51 UTC
Permalink
You need to use maven-bundle-plugin [1] to generate the bundle, not ant.

[1] http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

--
Regards,
Igor
Post by Reginald Blank
It looks like I already have the connector installed - from my attempt
to use ant.
Unfortunately nothing appears to happen.
I wonder if the target path is wrong?
I am using build automatically, how do I check that my build helper is
actually getting called. I have debug output switched on for m2e, but
I can't see anything useful.
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Russ Tremain
2012-06-13 15:08:16 UTC
Permalink
do you really want to install your files in "/"?

targetPath should be something like ${project.build.outputDirectory}/WEB-INF.

also, .svn and other SCM metafiles are skipped by default.

you might have better luck on the maven-users list since this is not really an m2e issue.

the connectors only impact your ability to use m2e to configure the plugin, not run maven.

/r
Post by Reginald Blank
I'd like to add some Spring xml configuration files to my existing
WEB-INF spring configuration files in WEB-INF. They differ by
customer. I've tried using ant which, understandably make eclipse
quite upset I've tried using build-help-maven-plugin but it doesn't
seem to work. Here is my plugin config. Have I got the paths correct?
I am using STS 2.9.x
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>./src/customers/mycustomer/main/webapp/WEB-INF/spring</directory>
<targetPath>/WEB-INF/spring</targetPath>
<excludes>
<exclude>**/.svn/**</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
_______________________________________________
m2e-users mailing list
https://dev.eclipse.org/mailman/listinfo/m2e-users
Loading...