[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [tycho-user] Refer to variables in a features build.properties
|
On 2014-08-29 21:14, Andreas Pakulat wrote:
On 2014-08-29 17:37, Oberlies, Tobias wrote:
Anybody has an idea how to do this with standard maven/tycho plugins
without changing existing files in the repository (I'm fine with a
build.properties.in -> build.properties transition that does the
replacement)?
The maven-resources-plugin should be able to do this for you.
I had looked at that before, but somehow always understood it would generate
the file in the target directory. Re-Reading the docs I see one
can freely specify the output directory, will play a bit with that.
Unfortunately it seems this does not quite work with Tycho's packaging
plugin. I've added the following snippet to the pom of the feature that needs
the replacement:
18 <build>
19 <plugins>
20 <plugin>
21 <artifactId>maven-resources-plugin</artifactId>
22 <version>2.6</version>
23 <executions>
24 <execution>
25 <id>copy-resources</id>
26 <!-- here the phase you need -->
27 <phase>generate-resources</phase>
28 <goals>
29 <goal>copy-resources</goal>
30 </goals>
31 <configuration>
32 <outputDirectory>${basedir}</outputDirectory>
33 <resources>
34 <resource>
35
<directory>${basedir}/templates/</directory>
36 <includes>
37
<include>build.properties</include>
38 </includes>
39 <filtering>true</filtering>
40 </resource>
41 </resources>
42 </configuration>
43 </execution>
44 </executions>
45 </plugin>
46 </plugins>
47 </build>
But running maven suggests that the build.properties file is not yet
generated when the tycho-packaging-plugin does its check for bin.includes:
mvn clean verify
[....]
[ERROR] Failed to execute goal
org.eclipse.tycho:tycho-packaging-plugin:0.21.0:package-feature
(default-package-feature) on project
com.froglogic.squish.ide.product.feature:
/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.ide.product.feature/build.properties:
bin.includes value(s) must be specified. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.eclipse.tycho:tycho-packaging-plugin:0.21.0:package-feature
(default-package-feature) on project
com.froglogic.squish.ide.product.feature:
/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.ide.product.feature/build.properties:
bin.includes value(s) must be specified.
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException:
/home/andreas/squish/hasselpogg-plugins/com.froglogic.squish.ide.product.feature/build.properties:
bin.includes value(s) must be specified.
at
org.eclipse.tycho.packaging.IncludeValidationHelper.checkIncludesExist(IncludeValidationHelper.java:59)
at
org.eclipse.tycho.packaging.IncludeValidationHelper.checkBinIncludesExist(IncludeValidationHelper.java:42)
at
org.eclipse.tycho.packaging.AbstractTychoPackagingMojo.checkBinIncludesExist(AbstractTychoPackagingMojo.java:131)
at
org.eclipse.tycho.packaging.PackageFeatureMojo.execute(PackageFeatureMojo.java:112)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
The file is visible on disk however after mvn error'ed out. Any idea whats
going wrong there?
Andreas
--
Andreas Pakulat squish@xxxxxxxxxxxxx
froglogic GmbH - Automated UI and Web Testing