Unable To Access Jar Published To Maven Central

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable To Access Jar Published To Maven Central

Dominique Jones
Good Morning, 

I have an application, BankShots, that uses a jar that I created as a dependency, BankShotsContracts, which has been successfully published to Maven Central. I am unable to access BankShotsContracts from BankShots and continue to get failures when running mvn compile and mvn install on BankShots. I am however able to successfully run the same commands on BankShotsContracts.

Is there something that I am missing or doing wrong?

I have provided the output of each command as well as attached the pom.xml for both applications and the settings.xml.

Here is the output when I run mvn compile on BankShotsContracts:

[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] -----------< io.github.developerdomjones:BankShotsContracts >-----------
[INFO] Building io.github.developerdomjones:BankShotsContracts< 0.0.1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ BankShotsContracts ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ BankShotsContracts ---
[INFO] Nothing to compile - all classes are up to date
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.143 s
[INFO] Finished at: 2020-06-03T17:01:15-04:00
[INFO] ------------------------------------------------------------------------

Here is a portion of the successful output when I run mvn install on BankShotsContracts which shows that my jar has successfully installed to the .m2/ folder:

[INFO] Installing /Users/dominiquejones/git/BankShotsContracts/target/BankShotsContracts-0.0.1-sources.jar to /Users/dominiquejones/.m2/repository/io/github/developerdomjones/BankShotsContracts/0.0.1/BankShotsContracts-0.0.1-sources.jar

Here is the failure output when I run mvn compile on BankShots:

[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< com.bankshots:BankShots >-----------------------
[INFO] Building BankShots 0.0.1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ BankShots ---
[INFO] Deleting /Users/dominiquejones/git/BankShots/target
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ BankShots ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ BankShots ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 63 source files to /Users/dominiquejones/git/BankShots/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockServiceImpl.java:[16,37] package com.bankshotscontracts.entity does not exist
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockServiceImpl.java:[17,36] package com.bankshotscontracts.model does not exist
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockService.java:[5,37] package com.bankshotscontracts.entity does not exist
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockService.java:[6,36] package com.bankshotscontracts.model does not exist
Here is the failure output when I run mvn install on BankShots:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.489 s
[INFO] Finished at: 2020-06-03T18:02:26-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project BankShots: Compilation failure: Compilation failure:
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockServiceImpl.java:[16,37] package com.bankshotscontracts.entity does not exist
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockServiceImpl.java:[17,36] package com.bankshotscontracts.model does not exist
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockService.java:[5,37] package com.bankshotscontracts.entity does not exist
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockService.java:[6,36] package com.bankshotscontracts.model does not exist
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockServiceImpl.java:[36,21] cannot find symbol
[ERROR]   symbol:   class Stock
[ERROR]   location: class com.bankshots.feature.stock.StockServiceImpl
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockService.java:[10,14] cannot find symbol
[ERROR]   symbol:   class Stock
[ERROR]   location: interface com.bankshots.feature.stock.StockService
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/settings/AccountSettingsBusiness.java:[3,37] package com.bankshotscontracts.entity does not exist
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/settings/AccountSettingsBusiness.java:[7,32] cannot find symbol
[ERROR]   symbol:   class Settings
[ERROR]   location: interface com.bankshots.feature.settings.AccountSettingsBusiness
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/settings/AccountSettingsBusiness.java:[7,16] cannot find symbol
[ERROR]   symbol:   class Settings
[ERROR]   location: interface com.bankshots.feature.settings.AccountSettingsBusiness
[ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/settings/AccountSettingsBusiness.java:[15,51] cannot find symbol
[ERROR]   symbol:   class Settings
Thanks, 
Dominique L. Jones



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Unable To Access Jar Published To Maven Central

Adam Retter
Have you added BankShotsContracts as a dependency for BankShots?

Also does the Jar file in your ~/.m2/repository for BankShotsContracts
look correct if you look inside the Zip file?

On Tue, 9 Jun 2020 at 19:23, Dominique Jones <[hidden email]> wrote:

>
> Good Morning,
>
> I have an application, BankShots, that uses a jar that I created as a dependency, BankShotsContracts, which has been successfully published to Maven Central. I am unable to access BankShotsContracts from BankShots and continue to get failures when running mvn compile and mvn install on BankShots. I am however able to successfully run the same commands on BankShotsContracts.
>
> Is there something that I am missing or doing wrong?
>
> I have provided the output of each command as well as attached the pom.xml for both applications and the settings.xml.
>
> Here is the output when I run mvn compile on BankShotsContracts:
>
> [INFO] Scanning for projects...
> [INFO] Inspecting build with total of 1 modules...
> [INFO] Installing Nexus Staging features:
> [INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
> [INFO]
> [INFO] -----------< io.github.developerdomjones:BankShotsContracts >-----------
> [INFO] Building io.github.developerdomjones:BankShotsContracts< 0.0.1
> [INFO] --------------------------------[ jar ]---------------------------------
> [INFO]
> [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ BankShotsContracts ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 1 resource
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ BankShotsContracts ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time:  1.143 s
> [INFO] Finished at: 2020-06-03T17:01:15-04:00
> [INFO] ------------------------------------------------------------------------
>
> Here is a portion of the successful output when I run mvn install on BankShotsContracts which shows that my jar has successfully installed to the .m2/ folder:
>
> [INFO] Installing /Users/dominiquejones/git/BankShotsContracts/target/BankShotsContracts-0.0.1-sources.jar to /Users/dominiquejones/.m2/repository/io/github/developerdomjones/BankShotsContracts/0.0.1/BankShotsContracts-0.0.1-sources.jar
>
> Here is the failure output when I run mvn compile on BankShots:
>
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ----------------------< com.bankshots:BankShots >-----------------------
> [INFO] Building BankShots 0.0.1
> [INFO] --------------------------------[ jar ]---------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ BankShots ---
> [INFO] Deleting /Users/dominiquejones/git/BankShots/target
> [INFO]
> [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ BankShots ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 1 resource
> [INFO] Copying 1 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ BankShots ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 63 source files to /Users/dominiquejones/git/BankShots/target/classes
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR :
> [INFO] -------------------------------------------------------------
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockServiceImpl.java:[16,37] package com.bankshotscontracts.entity does not exist
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockServiceImpl.java:[17,36] package com.bankshotscontracts.model does not exist
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockService.java:[5,37] package com.bankshotscontracts.entity does not exist
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockService.java:[6,36] package com.bankshotscontracts.model does not exist
>
> Here is the failure output when I run mvn install on BankShots:
>
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time:  2.489 s
> [INFO] Finished at: 2020-06-03T18:02:26-04:00
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project BankShots: Compilation failure: Compilation failure:
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockServiceImpl.java:[16,37] package com.bankshotscontracts.entity does not exist
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockServiceImpl.java:[17,36] package com.bankshotscontracts.model does not exist
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockService.java:[5,37] package com.bankshotscontracts.entity does not exist
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockService.java:[6,36] package com.bankshotscontracts.model does not exist
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockServiceImpl.java:[36,21] cannot find symbol
> [ERROR]   symbol:   class Stock
> [ERROR]   location: class com.bankshots.feature.stock.StockServiceImpl
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/stock/StockService.java:[10,14] cannot find symbol
> [ERROR]   symbol:   class Stock
> [ERROR]   location: interface com.bankshots.feature.stock.StockService
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/settings/AccountSettingsBusiness.java:[3,37] package com.bankshotscontracts.entity does not exist
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/settings/AccountSettingsBusiness.java:[7,32] cannot find symbol
> [ERROR]   symbol:   class Settings
> [ERROR]   location: interface com.bankshots.feature.settings.AccountSettingsBusiness
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/settings/AccountSettingsBusiness.java:[7,16] cannot find symbol
> [ERROR]   symbol:   class Settings
> [ERROR]   location: interface com.bankshots.feature.settings.AccountSettingsBusiness
> [ERROR] /Users/dominiquejones/git/BankShots/src/main/java/com/bankshots/feature/settings/AccountSettingsBusiness.java:[15,51] cannot find symbol
> [ERROR]   symbol:   class Settings
>
> Thanks,
>
> Dominique L. Jones
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]



--
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]