On Monday, 31 May 2021 10:18:31 CEST tommy wrote:
There are metamodel-concept jar file in local repo:
[root@test1 metamodel-concepts]# ll
total 8
drwxr-xr-x. 2 root root 4096 May 29 12:12 1.3.4
[root@test1 metamodel-concepts]#
[root@test1 metamodel-concepts]#
[root@test1 metamodel-concepts]#
[root@test1 metamodel-concepts]# cd 1.3.4
[root@test1 1.3.4]#
[root@test1 1.3.4]#
[root@test1 1.3.4]# ll
total 64
-rw-r--r--. 1 root root 45472 May 29 12:09 metamodel-concepts-1.3.4.jar
-rw-r--r--. 1 root root 40 May 29 12:09
metamodel-concepts-1.3.4.jar.sha1
-rw-r--r--. 1 root root 1490 May 29
12:08 metamodel-concepts-1.3.4.pom -rw-r--r--. 1 root root 40 May
29
12:08 metamodel-concepts-1.3.4.pom.sha1 -rw-r--r--. 1 root root 216 May
29 12:09 _remote.repositories
And the pom config about is is:
<dependency>
<groupId>org.ovirt.engine.api</groupId>
<artifactId>metamodel-concepts</artifactId>
<version>${metamodel.version}</version>
</dependency>
Why cannot import it ?
no idea, but very likely some issue with your setup. I tired with clean repo
and everything works. Try to run `maven clean` and/or remove these artifacts
from local repo and let maven to download them again
And {metamodel.version} is what value ?
currently 1.3.4, it's defined in pom.xml:
https://github.com/oVirt/ovirt-engine-sdk-java/blob/master/pom.xml#L78
-----Original Message-----
From: Vojtech Juranek <vjuranek(a)redhat.com>
Sent: Monday, May 31, 2021 3:59 PM
To: 'oVirt development list' <devel(a)ovirt.org>
Cc: tommy <sz_cuitao(a)163.com>
Subject: Re: [ovirt-devel] Why can not package the ovirt SDK ?
On Saturday, 29 May 2021 15:33:15 CEST tommy wrote:
> Why can not package the ovirt SDK ?
>
>
>
> The error line is :
>
> import org.ovirt.api.metamodel.concepts.ListType;
>
> There is not such class, where to download it ?
it's part of org.ovirt.engine.api:metamodel-concepts artefact, you can
download it e.g. from central repository [1]
>
> Should maven download it auto ?
>
yes, it should and it's also in available in central repo, check your maven
settings if you have this repo enabled, use right profile etc.
[1]
https://search.maven.org/artifact/org.ovirt.engine.api/metamodel-concepts
>
>
>
>
>
>
>
>
>
>
>
>
>
> [root@test1 ovirt-engine-sdk-java]# mvn package
>
> [INFO] Scanning for projects...
>
> [INFO]
> ----------------------------------------------------------------------
> --
>
> [INFO] Reactor Build Order:
>
> [INFO]
>
> [INFO] oVirt Java SDK Parent
>
> [INFO] oVirt Java SDK Generator
>
> [INFO] oVirt Java SDK
>
> [INFO]
>
> [INFO]
> ----------------------------------------------------------------------
> --
>
> [INFO] Building oVirt Java SDK Parent 4.4.6-SNAPSHOT
>
> [INFO]
> ----------------------------------------------------------------------
> --
>
> [INFO]
>
> [INFO] --- maven-source-plugin:2.4:jar-no-fork (attach-sources) @
> java-sdk-parent ---
>
> [INFO]
>
> [INFO]
> ----------------------------------------------------------------------
> --
>
> [INFO] Building oVirt Java SDK Generator 4.4.6-SNAPSHOT
>
> [INFO]
> ----------------------------------------------------------------------
> --
>
> [INFO]
>
> [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
> java-sdk-generator ---
>
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
>
> [INFO] Copying 2 resources
>
> [INFO]
>
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
> java-sdk-generator ---
>
> [INFO] Compiling 3 source files to
> /root/test/ovirt-engine-sdk-java/generator/target/classes
>
> [INFO] -------------------------------------------------------------
>
> [ERROR] COMPILATION ERROR :
>
> [INFO] -------------------------------------------------------------
>
> [ERROR]
> /root/test/ovirt-engine-sdk-java/generator/src/main/java/org/ovirt/sdk
> /java/ ServicesGenerator.java:[26,39] error: cannot access ListType
>
> [INFO] 1 error
>
> [INFO] -------------------------------------------------------------
>
> [INFO]
> ----------------------------------------------------------------------
> --
>
> [INFO] Reactor Summary:
>
> [INFO]
>
> [INFO] oVirt Java SDK Parent .............................. SUCCESS [
> 1.259 s]
>
> [INFO] oVirt Java SDK Generator ........................... FAILURE [
> 2.234 s]
>
> [INFO] oVirt Java SDK ..................................... SKIPPED
>
> [INFO]
> ----------------------------------------------------------------------
> --
>
> [INFO] BUILD FAILURE
>
> [INFO]
> ----------------------------------------------------------------------
> --
>
> [INFO] Total time: 3.780 s
>
> [INFO] Finished at: 2021-05-28T21:57:53+08:00
>
> [INFO] Final Memory: 16M/40M
>
> [INFO]
> ----------------------------------------------------------------------
> --
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
> (default-compile) on project java-sdk-generator: Compilation failure
>
> [ERROR]
> /root/test/ovirt-engine-sdk-java/generator/src/main/java/org/ovirt/sdk
> /java/ ServicesGenerator.java:[26,39] error: cannot access ListType
>
> [ERROR]
>
> [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 <goals> -rf :java-sdk-generator
_______________________________________________
Devel mailing list -- devel(a)ovirt.org
To unsubscribe send an email to devel-leave(a)ovirt.org
Privacy Statement:
https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct:
https://www.ovirt.org/community/about/community-guidelines/ List Archives:
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/KDPZDCBD3WOGQ
3GFO4JSNEM7YTG2ABVR/