Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [recommenders-dev] [snipedior] Maven build

Hi,
Thank you Andreas, Fabian.
But i had some problems getting it to work. First i cloned the main o.e.r and built it running mvn clean install -P e43. But there were some checkstyle violations so i disabled checking by adding -Dcheckstyle.skip to the command. This did the trick for the main o.e.r, but when i ran mvn clean install -Dlicense.failIfMissing=false on the build from Andreas, I got a similar error to what Madhuranga encountered before [1]. 


[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] snipeditor ........................................ SUCCESS [0.327s]
[INFO] org.eclipse.recommenders.snipeditor ............... FAILURE [0.412s]
[INFO] org.eclipse.recommenders.snipeditor.ui ............ SKIPPED
[INFO] org.eclipse.recommenders.snipeditor.tests ......... SKIPPED
[INFO] org.eclipse.recommenders.feature.snipeditor ....... SKIPPED
[INFO] Code Recommenders: SnipEditor Update Site ......... SKIPPED
[INFO] snipeditor-aggregator ............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.052s
[INFO] Finished at: Thu Jul 25 14:01:30 FET 2013
[INFO] Final Memory: 57M/206M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.18.0:b
uild-qualifier (default-build-qualifier) on project org.eclipse.recommenders.sni
peditor: Execution default-build-qualifier of goal org.eclipse.tycho:tycho-packa
ging-plugin:0.18.0:build-qualifier failed: One of setGitDir or setWorkTree must
be called. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.eclipse.tycho:tycho-packaging-plugin:0.18.0:build-qualifier (default-build-qu
alifier) on project org.eclipse.recommenders.snipeditor: Execution default-build
-qualifier of goal org.eclipse.tycho:tycho-packaging-plugin:0.18.0:build-qualifi
er failed: One of setGitDir or setWorkTree must be called.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:225)
        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.buildProje
ct(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.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(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-b
uild-qualifier of goal org.eclipse.tycho:tycho-packaging-plugin:0.18.0:build-qua
lifier failed: One of setGitDir or setWorkTree must be called.
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:110)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
        ... 19 more
Caused by: java.lang.IllegalArgumentException: One of setGitDir or setWorkTree m
ust be called.
        at org.eclipse.jgit.lib.BaseRepositoryBuilder.requireGitDirOrWorkTree(Ba
seRepositoryBuilder.java:582)
        at org.eclipse.jgit.lib.BaseRepositoryBuilder.setup(BaseRepositoryBuilde
r.java:550)
        at org.eclipse.jgit.storage.file.FileRepositoryBuilder.build(FileReposit
oryBuilder.java:89)
        at org.eclipse.tycho.extras.buildtimestamp.jgit.JGitBuildTimestampProvid
er.getTimestamp(JGitBuildTimestampProvider.java:72)
        at org.eclipse.tycho.buildversion.BuildQualifierMojo.getBuildTimestamp(B
uildQualifierMojo.java:182)
        at org.eclipse.tycho.buildversion.BuildQualifierMojo.execute(BuildQualif
ierMojo.java:156)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
        ... 20 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
nException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR]   mvn <goals> -rf :org.eclipse.recommenders.snipeditor

So i started searching for a solution. I found this post  [2] saying that it has to do with reproducible version qualifiers [3], so i assumed it comes down to jgit timestamping being used(as described in [3]). Therefor i commented the jgit timestamping plug-in in the main o.e.r pom, built the main o.e.r again and the SnipEditor build was successful. I don't know if it's a good solution, as i don't fully understand the problem. :)

Best regards, Stefan.

[1] : http://dev.eclipse.org/mhonarc/lists/recommenders-dev/msg01051.html
[2] : http://dev.eclipse.org/mhonarc/lists/tycho-user/msg04215.html
[3] : http://wiki.eclipse.org/Tycho/Reproducible_Version_Qualifiers


On Tue, Jul 23, 2013 at 7:10 PM, Andreas Sewe <andreas.sewe@xxxxxxxxxxxxxx> wrote:
Hi Fabian,

> The src-gen/ files of the UI module were already generated as part of the original build setup, see [1]. The problem you described with the sources not being found by the UI module build was due to a missing entry in the build.properties:
>
> https://github.com/sewe/SnipEditor_MavenBuild/pull/1

thank you, that did the trick. After the addition of a missing
feature.properties my build works fine [1].

Anyway, what I still think is odd is that the
org.eclipse.recommenders.snipeditor project build generate's code in
org.eclipse.recommenders.snipeditor.ui(/src-gen) as well. As a long-term
Maven user, I was very surprised by this.

Would it be possible to adapt the GenerateSnipDSL.mwe2 and run the
fornax-oaw-m2-plugin twice, once in org.eclipse.recommenders.snipeditor
and once in org.eclipse.recommenders.snipeditor.ui?

> I've had some weird errors (in the the UI and the test modules) when building locally while the projects were also open in Eclipse, so try to close the projects or quit Eclipse when you have issues while running the build.

This is probably the Xtend generating stuff when it shouldn't. Xtend
doesn't have a proper m2e connector yet, so the m2e .settings files
checked in should match what's specified in the pom.xml (and they
probably don't). I'll  try to straighten things up once the Maven build
is in its final shape.

Best wishes,

Andreas

[1]
<https://github.com/sewe/SnipEditor_MavenBuild/commit/bac498dbd56da97c33bad7d247c714315155647b>
--
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Mobile: +49-170-811-3791
http://www.codetrails.com/

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940
_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/recommenders-dev


Back to the top