BroadleafCommerce / ReactStarter

Broadleaf Commerce Spring Boot React Starter
Creative Commons Zero v1.0 Universal
43 stars 41 forks source link

Api Maven Installation Failure #30

Closed chungchi300 closed 3 years ago

chungchi300 commented 3 years ago

cd api mvn clean install

 The POM for com.mycompany:boot-react-starter-core:jar:1.0.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.835 s
[INFO] Finished at: 2020-10-04T00:41:23+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project boot-react-starter-api: Could not resolve dependencies for project com.mycompany:boot-react-starter-api:jar:1.0.0-SNAPSHOT: Failure to find com.mycompany:boot-react-starter-core:jar:1.0.0-SNAPSHOT in http://nexus.broadleafcommerce.org/nexus/content/groups/community-snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of public snapshots has elapsed or updates are forced -> [Help 1]
[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/DependencyResolutionException

BTW, awesome open source project there

cja769 commented 3 years ago

@chungchi300 You need to build from the root of the project first. As the stacktrace says, it's looking for the core jar which wasn't built since you built from api first.

chungchi300 commented 3 years ago

I build at the root directory first now, but still fail

[INFO] Unable to resolve all dependencies for : com.mycompany:boot-react-starter-api:1.0.0-SNAPSHOT. Falling back to non-transitive mode for initial artifact resolution.
[INFO] 
[INFO] ---------------< com.mycompany:boot-react-starter-site >----------------
[INFO] Building React Site Starter 1.0.0-SNAPSHOT                         [5/5]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.10:purge-local-repository (default-cli) @ boot-react-starter-site ---
[INFO] No artifacts included for purge for project: com.mycompany:boot-react-starter-site:jar:1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Broadleaf Spring Boot React Starter 1.0.0-SNAPSHOT:
[INFO] 
[INFO] Broadleaf Spring Boot React Starter ................ SUCCESS [  1.044 s]
[INFO] React Core Starter ................................. SUCCESS [01:18 min]
[INFO] Admin Starter ...................................... SUCCESS [01:18 min]
[INFO] React API Starter .................................. SUCCESS [ 34.454 s]
[INFO] React Site Starter ................................. SUCCESS [  0.004 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:22 min
[INFO] Finished at: 2020-10-04T14:40:47+08:00
[INFO] ------------------------------------------------------------------------
Chungs-MBP:ReactStarter jeffchung$ code .
Chungs-MBP:ReactStarter jeffchung$ cd 
.git/          .tern-project  Legal.txt      admin/         core/          pom.xml        
.gitignore     LICENSE.txt    README.md      api/           licenses/      site/          
Chungs-MBP:ReactStarter jeffchung$ cd api/
Chungs-MBP:api jeffchung$ mvn spring-boot:run 
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------< com.mycompany:boot-react-starter-api >----------------
[INFO] Building React API Starter 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] >>> spring-boot-maven-plugin:1.5.10.RELEASE:run (default-cli) > test-compile @ boot-react-starter-api >>>
[WARNING] The POM for com.mycompany:boot-react-starter-core:jar:1.0.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.274 s
[INFO] Finished at: 2020-10-04T14:45:03+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project boot-react-starter-api: Could not resolve dependencies for project com.mycompany:boot-react-starter-api:jar:1.0.0-SNAPSHOT: Failure to find com.mycompany:boot-react-starter-core:jar:1.0.0-SNAPSHOT in http://nexus.broadleafcommerce.org/nexus/content/groups/community-snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of public snapshots has elapsed or updates are forced -> [Help 1]
[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/DependencyResolutionException
Chungs-MBP:api jeffchung$ 
cja769 commented 3 years ago

Try running mvn clean install -U from the root directory and then build from api. It works fine for me. Also building from root worked fine for you so it doesn't make sense that it wouldn't be able to find a dependency right after successfully finding it in your local repository.