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

camel-k-maven-plugin must not contain any of these characters \/:"<>|?* but found > @ line 16, column 18 #1056

Closed
abouchama opened this issue Nov 12, 2019 · 11 comments · Fixed by #1096

Comments

@abouchama
Copy link

Hello,

After running the following example:

git clone https://github.com/abouchama/CamelK-customerAPI
kamel run customer-api.xml \
    --open-api customer-api.json \
    --name customers \
    --dependency camel-undertow \
    --dependency camel-rest \
    --property camel.rest.port=8080 

This end with the following error in the camelk operator pod:

{"level":"info","ts":1573500771.1264646,"logger":"camel-k.trait","msg":"Apply trait: camel"}
{"level":"info","ts":1573500771.1273205,"logger":"camel-k.trait","msg":"Apply trait: gc"}
{"level":"info","ts":1573500771.1273396,"logger":"camel-k.trait","msg":"Apply trait: rest-dsl"}
{"level":"info","ts":1573500771.127784,"logger":"camel-k.maven","msg":"executing: mvn -Dopenapi.spec=/tmp/rest-dsl735823832/0/openapi-spec.json -Ddsl.out=/tmp/rest-dsl735823832/0/openapi-dsl.xml --batch-mode -Dmaven.repo.local=/tmp/artifacts/m2 --settings /tmp/rest-dsl735823832/0/settings.xml","timeout":"3m45s"}
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'build.plugins.plugin.version' for org.apache.camel.k:camel-k-maven-plugin must not contain any of these characters /:"<>|?* but found > @ line 16, column 18
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.apache.camel.k.integration:camel-k-rest-dsl-generator:1.0.0-M3 (/tmp/rest-dsl735823832/0/pom.xml) has 1 error
[ERROR] 'build.plugins.plugin.version' for org.apache.camel.k:camel-k-maven-plugin must not contain any of these characters /:"<>|?* but found > @ line 16, column 18

@abouchama
Copy link
Author

After investigation, the pom generated in /tmp/rest-dsl735823832/0/pom.xml has the following unauthorized character in the version of the camel-k-maven-plugin: <version>&gt;=1.0.5</version>.

By removing this character &gt;= everything works as expected

@astefanutti
Copy link
Member

astefanutti commented Nov 12, 2019

Thanks a lot for the report!

It may have been fixed already with 96ffc51 and /or dcfb8a3, which we'll be released in the next milestone. If you have the chance to test on master, that'd be great. Otherwise we'll have a look ASAP.

In the meantime, you should be able to change the version by editing the .spec.build.runtimeVersion field from the integration platform.

@abouchama
Copy link
Author

Thanks lot @astefanutti

You are right, this has been fixed by changing the value of .spec.build.runtimeVersion the integration platform:

$ oc get integrationplatforms.camel.apache.org camel-k -o yaml | yq read - 'spec.build.runtimeVersion'
>=1.0.5
$ oc edit integrationplatforms.camel.apache.org camel-k 
$ oc get integrationplatforms.camel.apache.org camel-k -o yaml | yq read - 'spec.build.runtimeVersion'
1.0.5
```

@abouchama
Copy link
Author

The issue is still present on 1.0.0-M4:

$ oc get integrationplatforms.camel.apache.org camel-k -o yaml | yq read - 'spec.build.runtimeVersion'
>=1.0.7

@abouchama abouchama reopened this Nov 18, 2019
@astefanutti
Copy link
Member

It's normal to have a version constraint in the integration platform. The fix in 96ffc51 and /or dcfb8a3 make sure it's not directly used in the integration.

Could you check the integration status field?

@abouchama
Copy link
Author

Hi @astefanutti , below how you can reproduce it:

$ kamel install
Camel K installed in namespace knativetutorial
$ oc get integrationplatforms.camel.apache.org camel-k -o yaml | yq read - 'spec.build.runtimeVersion'
>=1.0.7

and i run the following in order to fix it:

$ oc get integrationplatforms.camel.apache.org camel-k -o yaml | yq w - 'spec.build.runtimeVersion' 1.0.7 \
| oc apply -f -
Warning: oc apply should be used on resource created by either oc create --save-config or oc apply
integrationplatform.camel.apache.org/camel-k configured

@astefanutti
Copy link
Member

@abouchama it’s normal to have >=1.0.7 in the integration platform. Can you check the integration deploy correctly without applying the work around?

@abouchama
Copy link
Author

abouchama commented Nov 23, 2019

@astefanutti without this change we got the following error in the camelk operator once we deploy the integration with kamel run customer.xml:

{"level":"info","ts":1573500771.1264646,"logger":"camel-k.trait","msg":"Apply trait: camel"}
{"level":"info","ts":1573500771.1273205,"logger":"camel-k.trait","msg":"Apply trait: gc"}
{"level":"info","ts":1573500771.1273396,"logger":"camel-k.trait","msg":"Apply trait: rest-dsl"}
{"level":"info","ts":1573500771.127784,"logger":"camel-k.maven","msg":"executing: mvn -Dopenapi.spec=/tmp/rest-dsl735823832/0/openapi-spec.json -Ddsl.out=/tmp/rest-dsl735823832/0/openapi-dsl.xml --batch-mode -Dmaven.repo.local=/tmp/artifacts/m2 --settings /tmp/rest-dsl735823832/0/settings.xml","timeout":"3m45s"}
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'build.plugins.plugin.version' for org.apache.camel.k:camel-k-maven-plugin must not contain any of these characters /:"<>|?* but found > @ line 16, column 18
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.apache.camel.k.integration:camel-k-rest-dsl-generator:1.0.0-M4 (/tmp/rest-dsl735823832/0/pom.xml) has 1 error
[ERROR] 'build.plugins.plugin.version' for org.apache.camel.k:camel-k-maven-plugin must not contain any of these characters /:"<>|?* but found > @ line 16, column 18

the problem here, the camel-k-maven-plugin don't accept version that starts with >=

@astefanutti
Copy link
Member

@abouchama have you re-created the integration?

@abouchama
Copy link
Author

@astefanutti even if you recreate the integration, the only way is to remove >=

@lburgazzoli
Copy link
Contributor

lburgazzoli commented Nov 23, 2019

@astefanutti what fails is the generator of the route dsl from openapi, I think there’s a leftover somewhere

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

Successfully merging a pull request may close this issue.

3 participants