m-m-m / code

Library to parse, analyze, transform and generate code
Apache License 2.0
2 stars 3 forks source link

setup CI #32

Closed hohwille closed 1 year ago

hohwille commented 3 years ago

As a developer of mmm-code, I want to have a CI for master and PRs so that quality and integritiy of the code is sane.

hohwille commented 3 years ago

GHA are failing with:

Error:  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project api: Compilation failure: Compilation failure: 
Error:  Source option 5 is no longer supported. Use 6 or later.
Error:  Target option 1.5 is no longer supported. Use 1.6 or later.

This does not seem to make any sense: https://github.com/m-m-m/code/blob/636e9e8f84aae066ee23d127bdd4edae80aae7c9/pom.xml#L27

hohwille commented 3 years ago

https://github.com/m-m-m/code/commit/9d090c8b16544bb24aaf2b7dad784442f6eb9d6b

hohwille commented 3 years ago

https://github.com/m-m-m/code/blob/9d090c8b16544bb24aaf2b7dad784442f6eb9d6b/.github/workflows/build.yml#L14

Java 11 should still support building for 1.8...

hohwille commented 3 years ago

https://repo1.maven.org/maven2/io/github/m-m-m/mmm/12/mmm-12.pom

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
<fork>true</fork>
</configuration>
</plugin>
hohwille commented 3 years ago

good news is that locally I can reproduce the error.

hohwille commented 3 years ago

Got it: The error comes from this test-project: https://github.com/m-m-m/code/blob/master/java/impl/src/test/resources/testdata/localmavenproject/maven.project/pom.xml

hohwille commented 3 years ago
Error:  Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) 
on project mmm-code-parent: 
ArtifactDeployerException: Failed to deploy artifacts: Could not transfer artifact 
net.sf.m-m-m:mmm-code-parent:pom:1.0.0-beta7-20210704.103057-1 from/to deploy 
(https://oss.sonatype.org/content/repositories/snapshots/): 
authorization failed for 
https://oss.sonatype.org/content/repositories/snapshots/net/sf/m-m-m/mmm-code-parent/1.0.0-beta7-SNAPSHOT/mmm-code-parent-1.0.0-beta7-20210704.103057-1.pom, 
status: 403 Forbidden -> [Help 1]

It seems as if I either have to remove the deployment step or I need to refactor the project to the new groupId and package io.github.m-m-m. The last step is planned anyhow but needs to coordination with others such as CobiGen.

hohwille commented 1 year ago

Solved with package and groupId refactoring already hence closing.