Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem building project #33

Open
vtresoldi opened this issue Dec 28, 2016 · 10 comments
Open

Problem building project #33

vtresoldi opened this issue Dec 28, 2016 · 10 comments

Comments

@vtresoldi
Copy link

When I run mvn clean package site I get this error:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.360 s
[INFO] Finished at: 2016-12-28T17:55:15+01:00
[INFO] Final Memory: 9M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.jacoco:jacoco-maven-plugin:0.7.7-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.jacoco:jacoco-maven-plugin:jar:0.7.7-SNAPSHOT -> [Help 1]

@vtresoldi
Copy link
Author

I've installed manually the plugin in my report now running the commad I'd this error

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project kettle-sdk-database-plugin: Fatal error compiling: invalid target release: 1.8 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project kettle-sdk-database-plugin: Fatal error compiling
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
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: Fatal error compiling
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:836)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.codehaus.plexus.compiler.CompilerException: invalid target release: 1.8
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:172)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:825)
... 22 more
Caused by: java.lang.IllegalArgumentException: invalid target release: 1.8
at com.sun.tools.javac.main.RecognizedOptions$GrumpyHelper.error(RecognizedOptions.java:88)
at com.sun.tools.javac.main.RecognizedOptions$10.process(RecognizedOptions.java:359)
at com.sun.tools.javac.api.JavacTool.processOptions(JavacTool.java:242)
at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:199)
at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:68)
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:123)
... 24 more

Can you help me?

@matthewtckr
Copy link

Pentaho 7.0 and later only compile with Java 8. You may need to investigate which JDK version you are using to compile the project.

@asheesharora
Copy link

When I run mvn clean package site I get this error:

[ERROR] Plugin org.jacoco:jacoco-maven-plugin:0.7.7-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.jacoco:jacoco-maven-plugin:jar:0.7.7-SNAPSHOT -> [Help 1]

What is the workaround?

@jknight
Copy link

jknight commented Mar 20, 2017

@asheesharora I'd gotten this error as well but it's working now - please update & retest to see if it works for you now

@myobis
Copy link

myobis commented Mar 20, 2017

I'm facing the exact same issue as @asheesharora with a fresh download from this morning (latest commit 5 days ago).
[Help1] refers to http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

I'm quite new to maven.. Is it possible that JaCoCo v0.7.7 cannot be found where expected (where would it be ?).. If yes, maybe we could download it manually (well, not sure where I'd put exactly.. maybe somewhere under .m2\repository ).

@jknight
Copy link

jknight commented Mar 20, 2017

I just did a fresh git clone https://github.com/pentaho/pdi-sdk-plugins.git / mvn clean package site and got "BUILD SUCCESS".

I have:

  • .m2/repository/org/jacoco/jacoco-maven-plugin/0.7.7.201606060606/jacoco-maven-plugin-0.7.7.201606060606.jar
  • .m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar
  • .m2/repository/org/jacoco/org.jacoco.core/0.7.7.201606060606/org.jacoco.core-0.7.7.201606060606.jar
  • .m2/repository/org/jacoco/org.jacoco.report/0.7.7.201606060606/org.jacoco.report-0.7.7.201606060606.jar

And:

  • Apache Maven 3.3.9
  • java version "1.8.0_25"

@myobis
Copy link

myobis commented Mar 21, 2017

Hi,
Thanks for this information @jknight . Indeed, this one succeeds.
The point is (and sorry for not mentioning it before), I was trying to build for the 7.0 branch as I need to build step plugins for the latest stable version mentioned on the community site and available on SourceForge (7.0.0.0-25).

Unfortunately, even now that JaCoCo is in .m2/repository (same as you mentioned), the 7.0 branch still fails to compile.
I tried to compare master and 7.0 with no success.. Not sure what to look after.. any clue would be appreciated.

I'm using Maven 3.3.9 and JDK 1.8.0_121 .

@jknight
Copy link

jknight commented Mar 21, 2017

@myobis - I tested building the current pdi-sdk-plugins by installing the demo step plugin into PDI v7.0 and it worked for me. My guess is that the latest of pdi-sdk-plugins is compatible with PDI v7. Here's what I did.

From a shell / command prompt:

  • Get latest
  • Build parent
    • mvn clean package site (BUILD SUCCESS)
  • Build demo step plugin:
    • cd kettle-sdk-step-plugin
    • mvn package (Building zip: [...]/target/kettle-sdk-step-plugin-7.1-SNAPSHOT.zip)
  • "Deploy" plugin by moving/copying it to the pdi plugins directory (v7.0.0.0-25)
    • mv [...]/target/kettle-sdk-step-plugin-7.1-SNAPSHOT.zip [...]/pdi-ce-7.0.0.0-25/plugins
  • Start spoon
    • bash [...]/pdi-ce-7.0.0.0-25/spoon.sh
  • Under design, search for "Demo": it appears under 'transform'

@myobis
Copy link

myobis commented Mar 21, 2017

Thank you so much. 👌
Indeed, I noticed that it works but I was a bit afraid to consider using plugins built on a version not synchronized to PDI itself.
To confess, even my old plugins compiled for PDI v4.2.0 are -at least apparently- working with v7.0.
So I was a bit uncomfortable to propose that for production use.

Now, let's get pragmatic : It it passes our internal tests, (and PDI is pretty convenient to create test transformations)... that's probably fine enough as the version gap is more reasonable.

@dstandish
Copy link

I was getting a similar error. I copied this settings.xml file to ~/.m2 and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants