argouml-tigris-org/argouml

Setting up on new machine, empty repository

simonjwright opened this issue · 7 comments

Setup:

$ mvn -v
Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
Maven home: /Volumes/Miscellaneous1/apache-maven-3.8.5
Java version: 17.0.2, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "12.3.1", arch: "aarch64", family: "Mac"

Building (mvn package -DskipTests=true) resulted in

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.argouml:argouml-core:0.35.2-SNAPSHOT: Could not find artifact org.argouml:parentpom:pom:0.35.5-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 7, column 11
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.argouml:argouml-core:0.35.2-SNAPSHOT (/Volumes/Miscellaneous1/argouml/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.argouml:argouml-core:0.35.2-SNAPSHOT: Could not find artifact org.argouml:parentpom:pom:0.35.5-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 7, column 11 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

After some googling, I found that my x86_64 Macbook Pro had a populated ~/.m2/repository, while on the Mini it was unpopulated.

I fixed this by copying org/argouml/ & contents to the Mini's repository; all went fine after that.

But, how should I have set it up?

Hi Simon,
I think the issue comes from a missing parentpom directory.
I've checkout the sources by using repo with:

mkdir argouml
cd argouml
repo init -u git@github.com:argouml-tigris-org/manifest.git
repo sync

and then

cd argouml
mvn package

Having said that, each time I have to compile ArgoUML, I need to remember and fight again all these steps...

I thought that the parentpom would be found at the sonatype site. Testing a little around this I get the feeling maven does not use the default sites to find the parent. I also found this discussion on stackoverflow that suggests this.

I have now attempted to fix this by explicitly adding the sonatype repo in the argouml-core pom. This will have to be updated when the parent pom changes to not being a snapshot anymore. It should then point to the released version of the parent pom instead.

Please comment on the fix here in GerritHub.

That takes care of the argouml project I think. If you think this is an OK solution, I will solve it in the same way in the other projects.

I renamed my ~/.m2, and got the same error as before.

The change is not merged to master yet. Did you download it from gerrithub?
git fetch https://github.com/argouml-tigris-org/argouml refs/changes/77/542277/1 && git checkout FETCH_HEAD

Thanks for that hint; now working very satisfactorily (I deleted ~/.m2, then built: massive downloading!)

And I should say, argouml/src/argouml-build/target/argouml-jar-with-dependencies.jar runs fine.

OK. Great. Thanks. I will merge that change now and eventually start fixing the other projects.

This is now fixed for all repositories. I have learned some things about the maven configuration.