SAP / olingo-jpa-processor-v4

The JPA Processor fills the gap between Olingo V4 and the database, by providing a mapping between JPA metadata and OData metadata, generating queries and supporting the entity manipulations.
Apache License 2.0
128 stars 80 forks source link

mvn clean install archetype:update-local-catalog is failing. getting Archetype IT 'createWithAllParameter' failed: Execution failure: exit code = 1 error. #348

Closed Nismath closed 4 months ago

Nismath commented 4 months ago

@wog48 [INFO] [ERROR] Failed to execute goal on project withParameter: Could not resolve dependencies for project com.test:withParameter:jar:0.0.1: The following artifacts could not be resolved: com.sap.olingo:odata-jpa-processor:jar:2.2.0-SNAPSHOT (absent), com.sap.olingo:odata-jpa-processor-cb:jar:2.2.0-SNAPSHOT (absent), com.sap.olingo:odata-jpa-spring-support:jar:2.2.0-SNAPSHOT (absent): Could not find artifact com.sap.olingo:odata-jpa-processor:jar:2.2.0-SNAPSHOT -> [Help 1]

oleg-duvanayev commented 4 months ago

hey, I experienced the same issue:

image

regards

Nismath commented 4 months ago

@oleg-duvanayev are you able to fix it?

oleg-duvanayev commented 4 months ago

no, I am not a developer of that project.

wog48 commented 4 months ago

The maven command will only update the catalog, but not creating it. Pleas check if you have archetype-catalog.xml file in your .m2 folder. If not you need to created it. In this case you can immediately use enter the artifact:

<archetype-catalog xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/1.0.0 http://maven.apache.org/xsd/archetype-catalog-1.0.0.xsd">
  <archetypes>
    <archetype>
        <groupId>com.sap.olingo</groupId>
        <artifactId>odata-jpa-archetype-spring</artifactId>
        <version>2.2.0-SNAPSHOT</version>
    </archetype>
  </archetypes>
</archetype-catalog>
Nismath commented 4 months ago

I have already created the archetype-catalog.xml. but still, my build fails when I try to execute the mvn clean install archetype:update-local-catalog command

when I tried with 2.1.1 release the command executed successfully. but not with the new release.

oleg-duvanayev commented 4 months ago

hi @wog48 many thanks for your response. Yes, initially as described in QuickStart, I created the file archetype-catalog.xml. The only difference to your one above is the version. As described in QuickStart I use the 2.1.3 image

Nevertheless, I have updated my local file ~/.m2/archetype-catalog.xml to your version and repeat the "mvn install" again. Unfortunately, it fails:

~> mvn -s ~/.m2/archetype-catalog.xml clean install archetype:update-local-catalog image image

Could you please for test purposes only do remove the meaning artifact from your repo and try the same command again?

best regards

oleg-duvanayev commented 4 months ago

hi @wog48

might you have a specific setting in ~/.m2/settings.xml , which we don't have?

Maven usually likes to have some additional declarations in that file.

best regards.

oleg-duvanayev commented 4 months ago

hello @Nismath , have you managed to solve the issue?

could you briefly explain, what have you done to repair the issue? regards

Nismath commented 4 months ago

@oleg-duvanayev yes. before running the mvn clean install archetype:update-local-catalog cmd. I ran the mvn clean install for the JPA module. then ran the archtype cmd. it worked for me.

oleg-duvanayev commented 4 months ago

hey @Nismath, thanks to your recommendation I have managed to compile the archetype as well, but have you completed the next steps from the Quick Start? I am about the generation the project based on the archetype odata-jpa-archetype-spring. This step doesn't work for me, even if I do it from the CLI ~> mvn archetype:generate -DarchetypeArtifactId=odata-jpa-archetype-spring

could you please check it on your local?

PS: image

regards

Nismath commented 4 months ago

Hello @oleg-duvanayev ,

I created the project with the latest release 2.1.3. You can run the cmd below in the terminal. and give the parameter as mentioned in the tutorial.

mvn archetype:generate -DarchetypeGroupId=com.sap.olingo -DarchetypeArtifactId=odata-jpa-archetype-spring -DarchetypeVersion=2.1.3