unlockha / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
1 stars 0 forks source link

Gradle build should not require sonatype passwords #88

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I tried maven, ant and gradle and they all failed for me :) 

Given the lack of jars in lib/ and the lack of dependencies in pom.xml I guess 
you use gradle right?  Here's what I get if I use gradle 1.6:

Build file '/workspace/java/beanio-read-only/build.gradle' line: 212

* What went wrong:
A problem occurred evaluating root project 'beanio-read-only'.
> No such property: sonatypeUsername for class: 
org.gradle.api.publication.maven.internal.ant.DefaultGroovyMavenDeployer

If I comment out the uploadArchives section and run "gradle install" I get the 
following. Any idea how to build it? :)

$> gradle install
The reportsDir property has been deprecated and is scheduled to be removed in 
Gradle 2.0. Please use the reporting.baseDir property instead.
:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.5
/workspace/java/beanio-read-only/src/org/beanio/internal/util/TreeNode.java:232:
 error: print(PrintStream,String) has private access in TreeNode
            node.print(out, indent);
                ^
Note: 
/workspace/java/beanio-read-only/src/org/beanio/internal/parser/ErrorContext.jav
a uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: 
/workspace/java/beanio-read-only/src/org/beanio/internal/parser/RecordCollection
.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
1 warning
:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output.

BUILD FAILED

Original issue reported on code.google.com by james.st...@gmail.com on 11 Jul 2013 at 9:22

GoogleCodeExporter commented 8 years ago
If building 2.0.x or earlier, use Ant.  There is a list of dependencies that 
must be placed under /lib in build.properites.

If building 2.1.x or later, you can use Ant or Gradle for now, but I will be 
removing Ant support soon.  Gradle is obviously much easier since it will 
download the dependencies automatically.

Not sure about that compile error- I'll have to look into that later.  And also 
see if there is way to make the 'sonatypeUsername' optional.

Thanks,
Kevin

Original comment by kevin.s...@gmail.com on 11 Jul 2013 at 5:29

GoogleCodeExporter commented 8 years ago
I verified everything is checked in and ran 'gradle clean build' without 
issues. 

Can you share your environment information?  Perhaps its a change in jdk1.7?

I'm using the following (from gradle --version):

------------------------------------------------------------
Gradle 1.5
------------------------------------------------------------

Gradle build time: Wednesday, March 27, 2013 1:51:06 PM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.6.0_45 (Apple Inc. 20.45-b01-451)
OS: Mac OS X 10.7.5 x86_64

Original comment by kevin.s...@gmail.com on 12 Jul 2013 at 2:41

GoogleCodeExporter commented 8 years ago
Humble apologies, I should have been more specific. I was initially gradle 1.4 
but figured that could be the issue so upgraded to:

------------------------------------------------------------
Gradle 1.6
------------------------------------------------------------

Gradle build time: Tuesday, 7 May 2013 09:12:14 o'clock UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.7.0_17 (Oracle Corporation 23.7-b01)
OS: Mac OS X 10.7.5 x86_64

Here's what I get with the latest code:

The reportsDir property has been deprecated and is scheduled to be removed in 
Gradle 2.0. Please use the reporting.baseDir property instead.

FAILURE: Build failed with an exception.

* Where:
Build file '/workspace/java/beanio-read-only/build.gradle' line: 212

* What went wrong:
A problem occurred evaluating root project 'beanio-read-only'.
> No such property: sonatypeUsername for class: 
org.gradle.api.publication.maven.internal.ant.DefaultGroovyMavenDeployer

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output.

BUILD FAILED

Total time: 6.352 secs

If I comment out the uploadArchives section I still get the compile error (I've 
attached a patch which fixes it)

BTW have you ever pondered about moving to github? ;) Its much easier for folks 
to send you pull requests that way

Original comment by james.st...@gmail.com on 12 Jul 2013 at 7:57

GoogleCodeExporter commented 8 years ago
Commenting out the uploadArchives section and using java6 gets past the compile 
error too (I guess Java6 is less strict ;). Though then it fails at the 
signArchives stage (see below). 

I tend to use maven; so am not too hot on knowing how to hack gradle; I wonder 
if the signing / uploading can be somehow disabled for other users so that it 
doesn't fail for other folks. For folks who don't do real releases of beanio 
it'd be nice to just be able to compile the code, run tests, make the javadoc 
etc.

At least though on java6 I can now run 'gradle test' which is great - thanks 
for you help!

:compileGroovy UP-TO-DATE
:processResources
:classes
:jar
:javadoc
/workspace/java/beanio-read-only/src/org/beanio/internal/parser/format/json/Json
UnmarshallingContext.java:67: warning - @return tag has no arguments.
/workspace/java/beanio-read-only/src/org/beanio/internal/parser/format/json/Json
UnmarshallingContext.java:155: warning - @return tag has no arguments.
/workspace/java/beanio-read-only/src/org/beanio/internal/parser/format/json/Json
UnmarshallingContext.java:105: warning - @return tag has no arguments.
/workspace/java/beanio-read-only/src/org/beanio/internal/parser/format/json/Json
Wrapper.java:183: warning - @param argument "lazy" is not a parameter name.
4 warnings
:javadocJar
:sourcesJar
:signArchives FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':signArchives'.
> Cannot perform signing task ':signArchives' because it has no configured 
signatory

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output.

BUILD FAILED 

Original comment by james.st...@gmail.com on 12 Jul 2013 at 8:01

GoogleCodeExporter commented 8 years ago
Just to confirm in summary - if you comment out the uploadArchives section, and 
use java 1.6 (not 1.7) then 'gradle clean test javadoc' works great (any 
permutation of those 3 goals ;)

Original comment by james.st...@gmail.com on 12 Jul 2013 at 8:03

GoogleCodeExporter commented 8 years ago
here's the patch to fix the compile on java 7

Original comment by james.st...@gmail.com on 12 Jul 2013 at 8:04

Attachments:

GoogleCodeExporter commented 8 years ago
I've committed your patch to the trunk, and I'm going to change this issue to 
an enhancement to modify the gradle build without the sonatype properties.

Regarding github, I would like to move there eventually, but am currently 
focusing on bug fixes and getting a stable 2.1.0 released.  Unfortunately, my 
time is pretty limited this summer.

Thanks,
Kevin 

Original comment by kevin.s...@gmail.com on 14 Jul 2013 at 5:10

GoogleCodeExporter commented 8 years ago
Fixed for release 2.1.0.  Sonatype username/password and signing properties are 
now only required to run 'uploadArchives' task.

Original comment by kevin.s...@gmail.com on 12 Feb 2014 at 4:14

GoogleCodeExporter commented 8 years ago

Original comment by kevin.s...@gmail.com on 7 Sep 2014 at 2:16