My GWT project won't build after moving to new machine

Answered

Hi I urgently need help with making my project build. 

It's a maven based GWT project, works fine on all old computers, but now I had to move to a new one. I have copied my project structure from old machine (contains all IntelliJ files)

On new machine I get a maven build error:

failed for https://dist.codehaus.org/org/gwtproject/gwt-dev/2.9.0/gwt-dev-2.9.0.pom

  org.gwtproject:gwt-dev:jar:2.9.0




from the specified remote repositories:

  Maven (https://repo.maven.apache.org/maven2/, releases=true, snapshots=false),

  java.net (https://download.java.net/maven/2, releases=true, snapshots=false),

  codehaus (https://dist.codehaus.org/, releases=true, snapshots=true),

  repository.jboss.org (https://repository.jboss.org/nexus/content/groups/public, releases=true, snapshots=true),

  nexus.codehaus.org (https://nexus.codehaus.org/content/repositories/releases/, releases=true, snapshots=false),

  com.springsource.repository.bundles.release (https://repository.springsource.com/maven/bundles/release, releases=true, snapshots=true),

  com.springsource.repository.bundles.external (https://repository.springsource.com/maven/bundles/external, releases=true, snapshots=true),

  org.springframework.maven.milestone (https://maven.springframework.org/milestone, releases=true, snapshots=true),

  terracotta.org (https://repo.terracotta.org/maven2/, releases=true, snapshots=true),

  central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)

Path to dependency: 

1) temp:temp:pom:666

at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.recurse(DefaultLegacyArtifactCollector.java:596)

at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.collect(DefaultLegacyArtifactCollector.java:148)





This is strange because 1. I have *NO* reference to org.gwtproject anywhere in my pom files and 2. my project builds fine from the command prompt
 
The error message is also strange to me, what is "temp:temp:pom" ? Is it some temporary in-memory thing?
 
I have tried:
clearing all caches etc.
reinstalling intellij
trying with the last version (2022.2)
going through Library and deleting all JetBrains related data I could find.
 
I am at a loss, WHERE does the org.gwtproject that IntelliJ references come from.
 
I really need help since I can't run inside IntelliJ right now.
 
cheers
 
0
10 comments

Let's first try to understand if the is related to IntelliJ IDEA or not. Please check - does it build by Maven form the command line? What output do you get in this case?

0

Hey, as I write in my post it builds fine from the prompt and we can run the compiled wars containing the GWT-compiled site code in tomcat, just like before. All the stuff ends up in the same place in .m2 as far as I can see. This is how we have to work right now since nothing works inside IntelliJ.

I have run the find command recursively on all xml files in the project dir, the "gwtproject" string is nowhere, so WHERE does IntelliJ get it from? As I write above I have tried clearing all IntelliJ dirs, reinstalling etc. What is the "temp:temp:pom" that the error log refers to?

 

EDIT - one more thing - on my new machine, the project also gets source level 1.5 even though I have it defined as 1.8 in the maven plugin definition. It never did that before either. To clarify - if I "open module settings", the project has 1.8 and every module has 1.8, but when I try to rebuild the project, it breaks with an error that the diamond operator is not available with source level 1.5...

0

Do you use maven-gwt-plugin? It looks like IDE tries to find the GWT SDK on build and fails.

>on my new machine, the project also gets source level 1.5 even though I have it defined as 1.8

Where do you have it defined? Do you have aggregator Maven projects? 

Would it be possible to get a sample project to check? For uploading you can use https://uploads.jetbrains.com

0

Hi Andrey, some comments:

1. GWT is there since I can build in maven from the command prompt and run it in tomcat locally. It compiles GWT fine there.

2. I have source set to 1,8 in the maven wrapper config in the POM.

3. The problem with the org.gwtproject in the stack trace is that there exists no such package.The org.gwtproject package didn't come until 2.10. So, I made a mistake and filled it out - but I have now removed it from all POMS, there is no reference when I search from it inside IntelliJ or using terminal .find in IntelliJ directories in /Library, but since IntelliJ complains, it must be SOMEWHERE, but where? I can't find it

-So, it would be great if the IntelliJ logs would have given some info, but the only thing it says is some strange mystery temp:temp:pom file but nothing about where it gets the dependency from, nor what file it exists in...

4. Not sure how I would create a sample project since, again, the gwtproject reference is NOWHERE in my files... 

 

EDIT: for reference, I ran this in the root of my project:

grep -rnw . '--exclude=*.js' -e org.gwtproject - nothing found

0

>4. Not sure how I would create a sample project since, again, the gwtproject reference is NOWHERE in my files... 

You can provide the original project. 

This reference may come from GWT SDK that IDE tries to download, if you have GWT, configured in Maven, e.g. have the gwt-maven-plugin.

0

Hi, I am super late responding to this, we've been in super busy mode for a while, and also I found a workaround. 

I can run and build my project in Intellij 2022.1. This error about org.gwtproject only appears in later versions. I am now running with 2023.1.1

So, what I do is this:

I start 2022.1, do a maven re-import. I can then work in 2023.1 for as long as I don't rebuild with maven. After I've done that, I can't run it in 2023.1.1, so I have to open up 2022.1 and do a maven reimport, and then dance back to 2023.1 again.

 

I do have the GWT maven plugin, but again, everything builds fine from the command prompt.

 

This is the stacktrace in 2023.1.1:

 

Path to dependency: 

1) temp:temp:pom:666

in DefaultLegacyArtifactCollector.recurse(DefaultLegacyArtifactCollector.java:596)

Caused by: org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException: Failed to retrieve POM for org.gwtproject:gwt-dev:jar:2.9.0: org.gwtproject:gwt-dev:pom:2.9.0 failed to transfer from https://dist.codehaus.org/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of codehaus has elapsed or updates are forced. Original error: Could not transfer artifact org.gwtproject:gwt-dev:pom:2.9.0 from/to codehaus (https://dist.codehaus.org/): transfer failed for https://dist.codehaus.org/org/gwtproject/gwt-dev/2.9.0/gwt-dev-2.9.0.pom

in MavenMetadataSource.retrieveRelocatedProject(MavenMetadataSource.java:613)

... 30 more

Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: org.gwtproject:gwt-dev:pom:2.9.0 failed to transfer from https://dist.codehaus.org/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of codehaus has elapsed or updates are forced. Original error: Could not transfer artifact org.gwtproject:gwt-dev:pom:2.9.0 from/to codehaus (https://dist.codehaus.org/): transfer failed for https://dist.codehaus.org/org/gwtproject/gwt-dev/2.9.0/gwt-dev-2.9.0.pom

in DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:424)

... 32 more

Caused by: org.eclipse.aether.transfer.ArtifactTransferException: org.gwtproject:gwt-dev:pom:2.9.0 failed to transfer from https://dist.codehaus.org/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of codehaus has elapsed or updates are forced. Original error: Could not transfer artifact org.gwtproject:gwt-dev:pom:2.9.0 from/to codehaus (https://dist.codehaus.org/): transfer failed for https://dist.codehaus.org/org/gwtproject/gwt-dev/2.9.0/gwt-dev-2.9.0.pom

in DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:225)

... 38 more

0

Does it help to disable Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Maven | Importing | Enable fast import option?

Try also using different Maven version in Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Maven | Maven home path.

Try moving the project into a different directory, then delete existing IDE project configuration (the `.idea` directory) and re-import project anew using File | Open and select main pom.xml file to import from.

 

If the problem remains, please provide IDE logs (use Help | Collect Logs... action to gather the logs) and the project where this happens. Thank you.

0

Hello my dear Sir. Again, sorry for late response, I'm the sole developer and the last month has been all Objective-C/Swift :)

 

I have already tried your last suggestion which was unsuccessful. However, I did try disabling the "fast import", and it seems to work!

I would still really really love to understand what the error was and where the dependency came from since again, I have no reference to it in any of my maven files, but I guess you can't have everything. 

 

Thanks!

0

OK, so I am now running 2023.4 and the problem has come back, unfortunately. See log below, same as before "temp.pom:666", why can't you log where the actual dependency you think is coming from??

I've tried enabling/disabling fast import to no avail. As I mentioned, there is no mention of get-dev:2.9.0 in any of my pom files, if you run dependency tree it's not anywhere and the project builds fine from the command prompt.

I have cleared everything a bunch of times, I even removed my .m2 dir to redownload everything.

2023-07-25 09:13:27,812 [ 444730]   INFO - #o.j.i.maven - org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable to get dependency information for org.gwtproject:gwt-dev:jar:2.9.0: Failed to retrieve POM for org.gwtproject:gwt-dev:jar:2.9.0: org.gwtproject:gwt-dev:pom:2.9.0 failed to transfer from https://dist.codehaus.org/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of codehaus has elapsed or updates are forced. Original error: Could not transfer artifact org.gwtproject:gwt-dev:pom:2.9.0 from/to codehaus (https://dist.codehaus.org/): transfer failed for https://dist.codehaus.org/org/gwtproject/gwt-dev/2.9.0/gwt-dev-2.9.0.pom

  org.gwtproject:gwt-dev:jar:2.9.0

 

from the specified remote repositories:

  Maven (https://repo.maven.apache.org/maven2/, releases=true, snapshots=false),

  java.net (https://download.java.net/maven/2, releases=true, snapshots=false),

  codehaus (https://dist.codehaus.org/, releases=true, snapshots=true),

  repository.jboss.org (https://repository.jboss.org/nexus/content/groups/public, releases=true, snapshots=true),

  nexus.codehaus.org (https://nexus.codehaus.org/content/repositories/releases/, releases=true, snapshots=false),

  com.springsource.repository.bundles.release (https://repository.springsource.com/maven/bundles/release, releases=true, snapshots=true),

  com.springsource.repository.bundles.external (https://repository.springsource.com/maven/bundles/external, releases=true, snapshots=true),

  org.springframework.maven.milestone (https://maven.springframework.org/milestone, releases=true, snapshots=true),

  terracotta.org (https://repo.terracotta.org/maven2/, releases=true, snapshots=true),

  central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)

Path to dependency: 

1) temp:temp:pom:666

in DefaultLegacyArtifactCollector.recurse(DefaultLegacyArtifactCollector.java:596)

Caused by: org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException: Failed to retrieve POM for org.gwtproject:gwt-dev:jar:2.9.0: org.gwtproject:gwt-dev:pom:2.9.0 failed to transfer from https://dist.codehaus.org/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of codehaus has elapsed or updates are forced. Original error: Could not transfer artifact org.gwtproject:gwt-dev:pom:2.9.0 from/to codehaus (https://dist.codehaus.org/): transfer failed for https://dist.codehaus.org/org/gwtproject/gwt-dev/2.9.0/gwt-dev-2.9.0.pom

in MavenMetadataSource.retrieveRelocatedProject(MavenMetadataSource.java:613)

... 30 more

Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: org.gwtproject:gwt-dev:pom:2.9.0 failed to transfer from https://dist.codehaus.org/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of codehaus has elapsed or updates are forced. Original error: Could not transfer artifact org.gwtproject:gwt-dev:pom:2.9.0 from/to codehaus (https://dist.codehaus.org/): transfer failed for https://dist.codehaus.org/org/gwtproject/gwt-dev/2.9.0/gwt-dev-2.9.0.pom

in DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:424)

... 32 more

Caused by: org.eclipse.aether.transfer.ArtifactTransferException: org.gwtproject:gwt-dev:pom:2.9.0 failed to transfer from https://dist.codehaus.org/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of codehaus has elapsed or updates are forced. Original error: Could not transfer artifact org.gwtproject:gwt-dev:pom:2.9.0 from/to codehaus (https://dist.codehaus.org/): transfer failed for https://dist.codehaus.org/org/gwtproject/gwt-dev/2.9.0/gwt-dev-2.9.0.pom

in DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:225)

... 38 more

0

The log you reference is the information message from the idea.log file. From the original post I understand that the problem is that you are getting the error when trying to build the project by Maven form IDE in the Maven tool window. Is this so? If so, what error you are getting when trying to build in IntelliJ IDEA?

If build works from the command line but fails in IDE, please make sure you are using the same

- Maven version (Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Maven | Maven home path)

- JDK version (Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Maven | Runner | JRE)

- Maven profile (if any) in the Maven tool window.

0

Please sign in to leave a comment.