Closed baldram closed 6 years ago
Hmm actually all the Snapshots dependencies are uploaded into Sonatype repo, see
https://oss.sonatype.org/content/repositories/snapshots/com/github/gwtboot/
I'll check whether we need those items "Snapshots". Because sofar I did not need to use them explicitly...
Do you use an internal Nexus repo as a proxy?
No, just in the simplest way without any proxy or internal Nexus. The plan was to use it for other public Github repo.
steps to reproduce:
$ git clone https://github.com/gwtboot/gwt-boot-samples.git
$ cd gwt-boot-samples/
$ mvn clean
Errors like mentioned above...
This is wyrd, because I have Travis installed for that repo: https://travis-ci.org/gwtboot/gwt-boot-samples
... and it works normally...
I checked the gwtboot-module and it already contains all the needed Snapshots repositories, see:
https://github.com/gwtboot/gwt-boot-modules/blob/master/pom.xml
So, no need to add those repos manually...
Could you please turn on your debug mode for Maven?
With... -X
Also please check your settings.xml file, whether you define other repos which overwrite the correct repos.
I have no settings.xml. Just default.
Should I have something defined to use this repo?
For other stuff or libs I do not need to do anything specific. In some cases I extend repositories of the pom.xml
by adding sonatype or jitpack. But in this case nothing was required according to documentation... If something should be added, could you please clarify.
mvn clean
result:
mvn-clean-result.txt
I also see that Travis handled it properly. You mentioned that https://github.com/gwtboot/gwt-boot-modules/blob/master/pom.xml contains all Snapshots repositories already. I checked, this is fine. The problem is only with "samples" project.
So gwt-boot-modules
works:
$ git clone https://github.com/gwtboot/gwt-boot-modules.git`
$ cd gwt-boot-modules/
$ mvn clean
...gives successfully:
[INFO] Scanning for projects...
Downloading: https://repo.maven.apache.org/maven2/org/sonatype/plugins/nexus-staging-maven-plugin/1.6.8/nexus-staging-maven-plugin-1.6.8.pom
Downloaded: https://repo.maven.apache.org/maven2/org/sonatype/plugins/nexus-staging-maven-plugin/1.6.8/nexus-staging-maven-plugin-1.6.8.pom (12 KB at 19.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/sonatype/nexus/maven/nexus-staging/1.6.8/nexus-staging-1.6.8.pom
...
...
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 54.554 s
[INFO] Finished at: 2018-08-25T17:07:43+02:00
[INFO] Final Memory: 23M/392M
In case of gwt-boot-samples
$ git clone https://github.com/gwtboot/gwt-boot-samples.git
$ cd gwt-boot-samples/
$ mvn clean
...gives errors like mentioned in https://github.com/gwtboot/gwt-boot-samples/issues/6#issuecomment-415962333.
If it requires snapshot repository, interesting is that at the bottom of gwt-boot-samples/pom.xml
is:
<repositories>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
So maybe some additional snapshot repository is required for gwt-boot-samples
project?
Or at least the one which will "open" the way to gwt-boot-modules/blob/master/pom.xml to find all remaining repositories, or so.
But something is weird and as you see at least one of gwtboot
related GitHub projects has worked for me.
EDIT (solution/workaround):
Yes, it's about missing repositories in gwt-boot-samples
project.
The workaround was to add the following (copied from pom.xml
of gwt-boot-modules
) to each samples subproject's xml.
<repositories>
<repository>
<id>sonatype-snapshots</id>
<name>Sonatype Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
</repository>
</repositories>
So for instance I extended gwt-boot-sample-basic
. Then some other also started to work (because I had artifacts cached locally). Then tried to call mvn clean
from the root folder of gwt-boot-samples
project. It still didn't work for one of subprojects: gwt-boot-sample-basic-with-spring-boot
.
The problem was like following:
[ERROR] Non-resolvable parent POM for com.github.gwtboot:gwt-boot-sample-basic-with-spring-boot:1.0.0-SNAPSHOT: Could not find artifact com.github.gwtboot:gwt-boot-starter-parent-with-spring-boot:pom:1.0.0-SNAPSHOT and 'parent.relativePath' points at no local POM @ line 24, column 10 -> [Help 2]
Then I extended pom.xml
of this subproject and resolved dependencies successfully.
After this, when I called mvn clean
from the root folder, everything worked.
Conclusion. The repositories
section of the pom.xml
is not inherited as expected by the child pom
's.
To fix the problem it's enough to extend pom.xml
of gwt-boot-sample-basic
and gwt-boot-sample-basic-with-spring-boot
.
I would send a pull-request, but I think that what I did is a workaround only and you may have a better idea...
So let's say now it works ;-) But I guess someone else trying to use gwt-boot-samples
would give up earlier. In case of errors would rather have not enough patience to make it working ;-)
It should rather work just out of the box...
PS: I think you should be able to reproduce this issue.
Just go to your local Maven cache and delete this folder ~/.m2/repository/com/github/gwtboot
.
Then call mvn clean
from gwt-boot-samples
. You should be able to see errors.
PS: I think also that it should be documented in https://github.com/gwtboot/gwt-boot-samples/blob/master/README.md that proper <repository>
has to be added.
A proposal here: https://github.com/gwtboot/gwt-boot-samples/pull/7 .
Thanks a lot, you are right. The example cannot find those modules since the modules are not yet released and not yet in public OSS Nexus.
In Travis is ok maybe because it already add the SNAPSHOTS OSS Nexus directly but local you don't have this, therefore you need to add the OSS Nexus SNAPSHOTS to be able to access the gwtboot-modules.
This is only needed since we are not yet have a release version in OSS Nexus public.
I'll merge your pull request. But we should not add the OSS Nexus SNAPSHOTS in all of the examples, since if we are already releasing the gwtboot-modules in OSS Nexus public we won't need this.
Vegoku already merge it, I added a description why we need it. All done.
Thanks. Please note that until gwtboot-modules
are released, the project gwt-boot-samples
will not compile for newcomers. My pull request was only about adding additional clarification to the documentation. No pom.xml
changes, but according to this, what you mentioned: "we should not add the OSS Nexus SNAPSHOTS in all of the examples, since if we are already releasing the gwtboot-modules in OSS Nexus public", it's fine
Yes, actually I would like to release the first version so that they are available in Maven Central. But domino-ui and some other still need the dependencies to SNAPSHOTS:
https://github.com/gwtboot/gwt-boot-modules/blob/master/pom.xml
We also could just release the first version with all the libs which are already released and wait for the next version for the rest of the libs...
I almost gave up but decided to look at closed issues:) I've exact the same setup and issue as baldram.
Is this issue solved?
P.S.: I came here from gradle world. I just wanted to see if maven samples would work out of the box.
@rov63rus I think it worked in the way I described later in here (the later comment in this thread): https://github.com/gwtboot/gwt-boot-samples/issues/6#issuecomment-415976139
@rov63rus: This issue is closed. Everything should work properly. BUT: If you are in the enterprise environment without access to Maven SNAPSHOTS you will have a problem, since GWT Boot is not in Maven RELEASES yet, because some projects are still in SNAPSHOTS...
FYI: Today I released the version 1.0.0 Final in Maven Central.
Hello gwt-boot founders!
This is a very interesting project. Thanks for publishing it. Unluckily it's hard to start using it ;-)
I would like to use gwt-boot-starter-parent for examples of my library https://github.com/baldram/gwt-leaflet-d3, to reduce the size of example GWT projects being a part of my library's repo.
Unfortunately something went wrong. It looks like the artifact is not published:
Could not find artifact com.github.gwtboot:gwt-boot-starter-parent:pom:1.0.0-SNAPSHOT
Do I need to add anything like a custom repository to access it? Then it is not documented. I mean something like popular sonatype's one for snapshots.
If it is supposed to be accessible from Maven Central, then something is wrong for sure.
Do a simple check. Clone
gwt-boot-samples
repository. Go inside a folder and call:$ mvn clean
I will have the same issue following steps from READ.me to use gwt-boot-starter with own project.
PS: In your case it may work if you have a local POM in your .m2 folder.