Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bintray Repository Shutdown #65

Open
ghareeb-falazi opened this issue May 7, 2021 · 6 comments
Open

Bintray Repository Shutdown #65

ghareeb-falazi opened this issue May 7, 2021 · 6 comments

Comments

@ghareeb-falazi
Copy link

I am unable to use the plugin, since it cannot access the Bintray repository (mentioned in https://github.com/web3j/web3j-maven-plugin/blob/master/pom.xml). I am receiving the following error in maven:

Error:  Failed to execute goal org.web3j:web3j-maven-plugin:4.2.0:generate-sources (generate-sources) on project 
org.eclipse.winery.accountability: Execution generate-sources of goal org.web3j:web3j-maven-plugin:4.2.0:generate-sources 
failed: Plugin org.web3j:web3j-maven-plugin:4.2.0 or one of its dependencies could not be resolved: Failed to collect 
dependencies at org.web3j:web3j-maven-plugin:jar:4.2.0 -> org.ethereum:solcJ-all:jar:0.4.25: Failed to read artifact descriptor for 
org.ethereum:solcJ-all:jar:0.4.25: Could not transfer artifact org.ethereum:solcJ-all:pom:0.4.25 from/to ethereum 
(https://dl.bintray.com/ethereum/maven/): authorization failed for
 https://dl.bintray.com/ethereum/maven/org/ethereum/solcJ-all/0.4.25/solcJ-all-0.4.25.pom, status: 403 Forbidden -> [Help 1]

(I know the plugin version I have is old, but I don't think the error relates to that)
I found this notification that the Bintray is shutting down in May 2021 altogether:
https://lists.boost.org/Archives/boost/2021/02/250813.php

@ghareeb-falazi
Copy link
Author

I just noticed that the Bintray repo is probably referenced only because of the solcJ dependency (which seems to be removed in recent versions). Perhaps, the reference to Bintray repo should simply be removed from the pom file.

@rkomaturi2382
Copy link

Hi , please let me know how you have fixed this issue i am also getting same issue.

@rkomaturi2382
Copy link

Hi

i am also getting same error , This issue fixed?
[ERROR] Failed to execute goal org.web3j:web3j-maven-plugin:4.2.0:generate-sources (01-generate-sol) on project reconciliation: Execution 01-generate-sol of goal org.web3j:web3j-maven-plugin:4.2.0:generate-sources failed: Plugin org.web3j:web3j-maven-plugin:4.2.0 or one of its dependencies could not be resolved: Failed to collect dependencies at org.web3j:web3j-maven-plugin:jar:4.2.0 -> org.ethereum:solcJ-all:jar:0.4.25: Failed to read artifact descriptor for org.ethereum:solcJ-all:jar:0.4.25: Could not transfer artifact org.ethereum:solcJ-all:pom:0.4.25 from/to ethereum (https://dl.bintray.com/ethereum/maven/): authorization failed for https://dl.bintray.com/ethereum/maven/org/ethereum/solcJ-all/0.4.25/solcJ-all-0.4.25.pom, status: 403 Forbidden -> [Help 1]

<web3j-quorum.version>4.8.4</web3j-quorum.version>
       <commons-lang.version>2.6</commons-lang.version>
       <!-- plugins -->
       <web3j-maven-plugin.version>4.2.0</web3j-maven-plugin.version>
<plugin>
               <groupId>org.web3j</groupId>
               <artifactId>web3j-maven-plugin</artifactId>
               <version>${web3j-maven-plugin.version}</version>
               <configuration>
                   <packageName>com.test.quorum.contracts</packageName>
                   <soliditySourceFiles>
                       <directory>src/main/resources/solidity/contracts</directory>
                       <includes>
                           <include>**/*.sol</include>
                       </includes>
                   </soliditySourceFiles>
                   <sourceDestination>src/main/resources/solidity/contracts</sourceDestination>
                   <outputFormat>java,bin,abi</outputFormat>
               </configuration>
               <executions>
                   <execution>
                       <id>01-generate-sol</id>
                       <phase>generate-sources</phase>
                       <goals>
                           <goal>generate-sources</goal>
                       </goals>
                   </execution>
               </executions>
               <dependencies>
                   <dependency>
                       <groupId>org.web3j</groupId>
                       <artifactId>codegen</artifactId>
                       <version>4.2.0</version>
                   </dependency>
               </dependencies>
           </plugin>
           <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>build-helper-maven-plugin</artifactId>
               <executions>
                   <execution>
                       <id>02-add-source-folder</id>
                       <phase>generate-sources</phase>
                       <goals>
                           <goal>add-source</goal>
                       </goals>
                       <configuration>
                           <sources>
                               <source>src/main/resources/solidity/contracts</source>
                           </sources>
                       </configuration>
                   </execution>
                   <execution>
                       <id>02-add-sol-bin</id>
                       <phase>generate-sources</phase>
                       <goals>
                           <goal>add-resource</goal>
                       </goals>
                       <configuration>
                           <resources>
                               <resource>
                                   <directory>src/main/resources/solidity/contracts</directory>
                                   <includes>
                                       <include>**/*.bin</include>
                                       <include>**/*.json</include>
                                   </includes>
                               </resource>
                           </resources>
                       </configuration>
                   </execution>
               </executions>
           </plugin>

   		<plugin>
   			<groupId>org.apache.maven.plugins</groupId>
   			<artifactId>maven-dependency-plugin</artifactId>
   			<executions>
   				<execution>
   					<id>copy-artifact</id>
   					<phase>install</phase>
   					<goals>
   						<goal>copy</goal>
   					</goals>
   					<configuration>
   						<artifactItems>
   							<artifactItem>
   								<groupId>${project.groupId}</groupId>
   								<artifactId>${project.artifactId}</artifactId>
   								<version>${project.version}</version>
   								<type>${project.packaging}</type>
   							</artifactItem>
   						</artifactItems>
   						<outputDirectory>${parent.output.directory}</outputDirectory>
   					</configuration>
   				</execution>
   			</executions>
   		</plugin>

@ghareeb-falazi
Copy link
Author

Hi , please let me know how you have fixed this issue i am also getting same issue.

I solved it by using a newer version of the plugin that does not depend on the SolcJ compiler implementation. I.e., bump up the
<web3j-maven-plugin.version>4.2.0</web3j-maven-plugin.version> to e.g., 4.6.5

@rkomaturi2382
Copy link

hi , thanks , i have changed it to 4.8.2 and now its working fine .However i am facing new issue deploy method is not available

The method deploy(Class, Web3j, Credentials, ContractGasProvider, String, String, BigInteger) from the type Contract is not visible

MyContract.deploy(MyContract.class,quorumConnection.getWeb3(),
   		  quorumConnection.getCredentials(),new
   		  DefaultGasProvider(),MyContract.BINARY,
   		  "first contract" ,BigInteger.valueOf(0));

i dont see any examples with latest version of web3j.

@cseblog
Copy link

cseblog commented Sep 12, 2021

I have the same issue, I switched to 4.8.2 version then it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants