You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Ahmed M (Jira)" <ji...@apache.org> on 2020/07/11 12:36:01 UTC
[jira] [Commented] (CAMEL-15043) MojoFailureException after
creating a new component using archetype then build it straight away
[ https://issues.apache.org/jira/browse/CAMEL-15043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17155976#comment-17155976 ]
Ahmed M commented on CAMEL-15043:
---------------------------------
Hi,
I'am having a similar issue with the *camel-archetype-api-component* archetype.
The generated component fails to build due to missing Junit5 dependencies:
{code:java}
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.camel.archetypes \
-DarchetypeArtifactId=camel-archetype-api-component \
-DarchetypeVersion=3.4.0 \
-DgroupId=org.acme \
-DartifactId=camel-dummy-api \
-Dversion=1.0.0 \
-Dname="DummyApiComponent" \
-Dscheme=dummy
$ cd camel-dummy-api/
$ mvn clean pacakge
...
[INFO] Reactor Summary for Camel DummyApiComponent Component Parent 1.0.0:
[INFO]
[INFO] Camel DummyApiComponent Component Parent ........... SUCCESS [ 1.041 s]
[INFO] Camel DummyApiComponent Component API .............. SUCCESS [ 2.946 s]
[INFO] Camel DummyApiComponent Component .................. FAILURE [ 2.343 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.465 s
[INFO] Finished at: 2020-07-11T12:17:59Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project camel-dummy-api: Compilation failure: Compilation failure:
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentFileHelloIntegrationTest.java:[11,29] package org.junit.jupiter.api does not exist
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentFileHelloIntegrationTest.java:[12,29] package org.junit.jupiter.api does not exist
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentFileHelloIntegrationTest.java:[19,36] package org.junit.jupiter.api does not exist
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentFileHelloIntegrationTest.java:[19,1] static import only from classes and interfaces
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentJavadocHelloIntegrationTest.java:[11,29] package org.junit.jupiter.api does not exist
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentJavadocHelloIntegrationTest.java:[12,29] package org.junit.jupiter.api does not exist
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentJavadocHelloIntegrationTest.java:[19,36] package org.junit.jupiter.api does not exist
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentJavadocHelloIntegrationTest.java:[19,1] static import only from classes and interfaces
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentFileHelloIntegrationTest.java:[32,6] cannot find symbol
[ERROR] symbol: class Disabled
[ERROR] location: class org.acme.DummyApiComponentFileHelloIntegrationTest
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentFileHelloIntegrationTest.java:[33,6] cannot find symbol
[ERROR] symbol: class Test
[ERROR] location: class org.acme.DummyApiComponentFileHelloIntegrationTest
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentFileHelloIntegrationTest.java:[43,6] cannot find symbol
[ERROR] symbol: class Disabled
[ERROR] location: class org.acme.DummyApiComponentFileHelloIntegrationTest
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentFileHelloIntegrationTest.java:[44,6] cannot find symbol
[ERROR] symbol: class Test
[ERROR] location: class org.acme.DummyApiComponentFileHelloIntegrationTest
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentFileHelloIntegrationTest.java:[58,6] cannot find symbol
[ERROR] symbol: class Disabled
[ERROR] location: class org.acme.DummyApiComponentFileHelloIntegrationTest
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentFileHelloIntegrationTest.java:[59,6] cannot find symbol
[ERROR] symbol: class Test
[ERROR] location: class org.acme.DummyApiComponentFileHelloIntegrationTest
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentJavadocHelloIntegrationTest.java:[32,6] cannot find symbol
[ERROR] symbol: class Disabled
[ERROR] location: class org.acme.DummyApiComponentJavadocHelloIntegrationTest
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentJavadocHelloIntegrationTest.java:[33,6] cannot find symbol
[ERROR] symbol: class Test
[ERROR] location: class org.acme.DummyApiComponentJavadocHelloIntegrationTest
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentJavadocHelloIntegrationTest.java:[43,6] cannot find symbol
[ERROR] symbol: class Disabled
[ERROR] location: class org.acme.DummyApiComponentJavadocHelloIntegrationTest
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentJavadocHelloIntegrationTest.java:[44,6] cannot find symbol
[ERROR] symbol: class Test
[ERROR] location: class org.acme.DummyApiComponentJavadocHelloIntegrationTest
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentJavadocHelloIntegrationTest.java:[58,6] cannot find symbol
[ERROR] symbol: class Disabled
[ERROR] location: class org.acme.DummyApiComponentJavadocHelloIntegrationTest
[ERROR] /workspaces/camel-workspace/camel-dummy-api/camel-dummy-api-component/target/generated-test-sources/camel-component/org/acme/DummyApiComponentJavadocHelloIntegrationTest.java:[59,6] cannot find symbol
[ERROR] symbol: class Test
[ERROR] location: class org.acme.DummyApiComponentJavadocHelloIntegrationTest
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :camel-dummy-api
{code}
> MojoFailureException after creating a new component using archetype then build it straight away
> -----------------------------------------------------------------------------------------------
>
> Key: CAMEL-15043
> URL: https://issues.apache.org/jira/browse/CAMEL-15043
> Project: Camel
> Issue Type: Bug
> Components: tooling
> Affects Versions: 3.2.0
> Environment: OS -> Mac OS 10.15.4
> Maven -> 3.6.3
> Java -> 1.8.0_241
> Reporter: Alvin Ma
> Assignee: Andrea Cosentino
> Priority: Major
> Labels: archetype, help-wanted
> Fix For: 3.4.0
>
> Attachments: Screen Shot 2020-05-11 at 1.17.18 PM.png
>
>
>
> Intention: To create my own Camel component.
>
> Steps:
> # Run `mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-component -DarchetypeVersion=3.2.0 -DgroupId=org.apache.camel -DartifactId=camel-mycomponent -Dname=MyComponent -Dscheme=mycomponent -Dpackage=org.apache.camel.component.mycomponent` and it'll create `camel-mycomponent` directory. Then open the `pom.xml` and delete the `OSGi` part because I don't need it.
> # Under `camel-mycomponent` run `mvn clean install`
>
> Result:
> Got error
> {noformat}
> [ERROR] Failed to execute goal org.apache.camel:camel-package-maven-plugin:3.2.0:generate-component (generate) on project camel-mycomponent: Error generating data org.apache.maven.plugin.MojoFailureException: Unable to create mojo: Could not find component java type -> [Help 1] {noformat}
>
> Expected: Build successfully with a jar output.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)