orsjb / beads

The Beads project.
138 stars 38 forks source link

Building beads #33

Open jeremydouglass opened 3 years ago

jeremydouglass commented 3 years ago

Hi @orsjb, @cwong4311, I'm trying to build beads and running into a bit of trouble. Could you please advise? I'm happy to take the information and add it to build documentation.

  1. git clone https://github.com/orsjb/beads.git
  2. Eclipse 4.8.0 > File > Import > Gradle > Existing Gradle Project
  3. all defaults on Gradle Buildship wizard (official Buildship Gradle Integration 3.0 from Eclipse marketplace)

fails with:

Could not get unknown property 'ossrhUsername' for object of type org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer.

  1. edit build.gradle and remove
      repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
        authentication(userName: ossrhUsername, password: ossrhPassword)
      }

      snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
        authentication(userName: ossrhUsername, password: ossrhPassword)
      }
  1. redo Import -- import succeeds, with warning:

  2. if "Gradle Tasks" pane is not visible, add with Window > Show View > Gradle > Gradle Tasks

  3. run task Gradle Tasks > beads > build > build

Build fails with:

Gradle Executions > Run build > Run tasks > :signArchives > Execute generate for :signArchives

So what I'm seeing here without digging any deeper is that either build tasks are fully integrated with Maven uploading (for which I would need credentials) or else I am using the wrong entrypoint to start a local. I just want to build locally and test without having to ask for credentials and send test builds to Maven. Possible?

cheers, Jeremy

jeremydouglass commented 3 years ago

p.s. to be clear, gradle tasks build>buildDependents, build>buildNeeded, and build>assemble all seem to be triggering the signing error. So before looking at rewriting the build system, I'm trying to understand why all of these actions require signing for a test build. The problem may be that I'm not very familiar with Gradle and Maven.

orsjb commented 3 years ago

Also just looking at this. I engaged, Charlton Wong, a compsci student at UNSW to set up Beads to build to a Maven repo. Well above my simple understanding of Maven, which seems far more complex than anyone needs!

I believe what has happened is that he has removed the Maven repo credentials to keep them out of the public repo. I’m going to directly email you this info if you are interetsed. He put together a very comprehensive manual.

Again, I have no expectation you have the time to make this contribution!

Ollie

On 20 Aug 2021, at 1:58 am, Jeremy Douglass @.***> wrote:

p.s. to be clear, gradle tasks build>buildDependents, build>buildNeeded, and build>assemble all seem to be triggering the signing error. So before looking at rewriting the build system, I'm trying to understand why all of these actions require signing for a test build. The problem may be that I'm not very familiar with Gradle and Maven.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/orsjb/beads/issues/33#issuecomment-902033093, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAGYIXYZ3E6LNREHZJUAGDT5US3NANCNFSM5COQKKYQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

jeremydouglass commented 3 years ago

Hi Ollie -- please do directly email it to me. "comprehensive manual" sounds great! No promises as I may get stuck, but I'll give it a shot.

cwong4311 commented 3 years ago

Hi Jeremy. Apologies for this issue. I've never quite used buildship or considered the need to build locally without credentials.

What I think is happening is that, when using Gradle tasks pane > build (& buildDepends etc), all of these will trigger the 'gradle build' command. This ends up traversing every task in build.gradle, including the ones that upload to Maven.

The fast and easy solution would be to just remove all tasks in build.gradle related to uploading, which are - :signing, :uploadArchives and :fullDeploy. Then run Gradle Task pane > build again, and it should compile properly.

Otherwise if you would like to leave build.gradle tasks intact and build locally without needing credentials, you'll need to:

  1. In build.gradle, wrap all instances of 'ossrhUsername' and 'ossrhPassword' with findProperty(). ie authentication(userName: ossrhUsername, password: ossrhPassword) becomes authentication(userName: findProperty('ossrhUsername'), password: findProperty('ossrhPassword'))

  2. Build with the command 'gradle deploy' using powershell or command line instead of Gradle Task pane > build, so you don't traverse every task.

Hopefully this should solve your issue. If not, let me know again and I'll have another look.

jeremydouglass commented 3 years ago

Thanks so much @cwong4311 -- I'll try this tonight. eliminating the 3 signing tasks should do it for me.

orsjb commented 3 years ago

Not sure where you got to Jeremy, but I seem to have got it installing cleanly now. Had to push the version # up to 4.1.

On 21 Aug 2021, at 9:17 am, Jeremy Douglass @.***> wrote:

Thanks so much @cwong4311 https://github.com/cwong4311 -- I'll try this tonight. eliminating the 3 signing tasks should do it for me.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/orsjb/beads/issues/33#issuecomment-903003775, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAGYITM5IUQHUHTGCJSLALT53PBHANCNFSM5COQKKYQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

jeremydouglass commented 3 years ago

Hi Ollie -- many apologies, when I went off to do this I immediately discovered that the full Processing 4 contributions updating system was broken on the server side, opened a ticket and spent about a week before that was resolved -- by the time it was resolved, this had dropped off my radar. Very glad to hear that the bumped version worked for you!

On Thu, Oct 14, 2021 at 9:26 PM Ollie Bown @.***> wrote:

Not sure where you got to Jeremy, but I seem to have got it installing cleanly now. Had to push the version # up to 4.1.

On 21 Aug 2021, at 9:17 am, Jeremy Douglass @.***> wrote:

Thanks so much @cwong4311 https://github.com/cwong4311 -- I'll try this tonight. eliminating the 3 signing tasks should do it for me.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/orsjb/beads/issues/33#issuecomment-903003775>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAAGYITM5IUQHUHTGCJSLALT53PBHANCNFSM5COQKKYQ . Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android < https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/orsjb/beads/issues/33#issuecomment-943976050, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGC62WJAGW6FVG7I34JYWDUG6UQTANCNFSM5COQKKYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.