Skip to content
This repository was archived by the owner on Aug 31, 2022. It is now read-only.

Replace build tool maven to sbt#82

Open
takezoux2 wants to merge 13 commits intosorm:masterfrom
takezoux2:improve_build
Open

Replace build tool maven to sbt#82
takezoux2 wants to merge 13 commits intosorm:masterfrom
takezoux2:improve_build

Conversation

@takezoux2
Copy link
Copy Markdown
Collaborator

@takezoux2 takezoux2 commented Oct 23, 2016

  • Replace scala versions to property in pom.xml
  • Append scala compat version to artifactId(It's a standard name rule for scala libraries)
  • Upgrade scala version to 2.11.8
  • Add build.sbt to also build by sbt
  • Remove 2.10.4 build in travis. Because scala 2.10.x build has already broken because of scala-logging.(Scala logging does not support scala 2.10.X)

Scala 2.12 coming soon.So should support multi scala versions.

And I have a question. .gitignore file is removed. What was wrong?

@nikita-volkov
Copy link
Copy Markdown
Contributor

If you want to switch to SBT, you can just make the switch. Doubling of the project build files will prove to be a maintenance pain-point. Otherwise let it be Maven. All I'm asking is just to pick one.

And I have a question. .gitignore file is removed. What was wrong?

It's the developer's private thing, which environment he has, and hence which files to ignore. You can have your version of .gitignore on your machine and I'll have a different one on mine. The changes to it have nothing to do with the project.

To have .gitignore ignored by Git just mention it in itself or add it to your global list.

### ReflectionSuite.scala
 fix reflection name.
### FieldTestSuite1.scala
 Comment out oracle test. This test was skipped in maven test.
@takezoux2
Copy link
Copy Markdown
Collaborator Author

.gitignore is normally shared by git.
Almost all projects share .gitignore. ex: https://github.com/scala/scala https://github.com/play/play https://github.com/scalaz/scalaz
Sharing .gitignore prevents miss adding. If you have your .gitignore, you should merge it.

SBT have a great advantage to cross build.
OK, l'll soon write sbt's pom generator.

@nikita-volkov
Copy link
Copy Markdown
Contributor

nikita-volkov commented Oct 23, 2016

Sharing .gitignore prevents miss adding.

It does not. It only prevents miss-adding of files, which are mentioned in it. The ones that aren't can still be added. To make your statement true, all the possible names, which don't relate to the project need to be mentioned. Which is kinda impossible.

A person is responsible for what he does, a committer is expected to review his commits.

I'm pretty sure you wouldn't be satisfied with one of the "gitignore" files that you've mentioned. So you'd be doing commits to that file. So, merges, discussions... All about what? Something that has zero value for the project.

So I've found it wisest to just keep out of this problem and hence keep it out of my projects. Trust me, once you'll add the ".gitignore" line to your local ".gitignore" file you'll forget we ever had this conversation.

SBT have a great advantage to cross build.

No problem. Switch to it, if you feel the need to.

OK, l'll soon write sbt's pom generator.

What?

Make to generate pom.xml by "sbt makePom" command
@takezoux2
Copy link
Copy Markdown
Collaborator Author

Remove .gitignore and pom.xml.
But you can generate pom.xml by "sbt makePom".

@takezoux2 takezoux2 changed the title Update maven project file to switch scala version. Replace build tool maven to sbt Nov 28, 2016
@pjfanning pjfanning mentioned this pull request Dec 5, 2016
Copy link
Copy Markdown
Contributor

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change the build.sbt common settings sorm version to 0.3.22-SNAPSHOT?
Also, could you change the sext version to 0.2.26.
I would also like to see the c3p0 dependency set to 0.9.2 instead of the current pre-release version.

test("H2 initialization") { instance(DbType.H2).close() }
test("MySQL initialization") { instance(DbType.Mysql).close() }
test("Oracle initialization") { instance(DbType.Oracle).close() }
//test("Oracle initialization") { instance(DbType.Oracle).close() }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to turn this part of test off?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oracle tests ware broken, and I can't fix it because i'm not familiar with Oracle database.

@@ -0,0 +1,82 @@
package sorm.macroimpl
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't continue to do sorm 2.10 builds, do we need this class?

Comment thread project/plugins.sbt
// Comment to get more information during initialization
logLevel := Level.Warn

addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.3") No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we look at using sbt-release plugin for publishing jars to maven repos? I use it in https://github.com/swagger-akka-http/swagger-akka-http and it is very effective.

@pjfanning
Copy link
Copy Markdown
Contributor

@takezoux2 I did some testing of sorm 0.3.21 and found it only works in scala 2.11. It does look like for 2.12 support, we will need the cross compile support. What do you think it will take to get the sbt stuff merged?

pjfanning pushed a commit to scala212-forks/sorm that referenced this pull request Dec 16, 2016
@pjfanning
Copy link
Copy Markdown
Contributor

pjfanning commented Dec 20, 2016

I have pushed a sorm_2.12 to the sonatype snapshots repo, based on https://github.com/scala212-forks/sorm. This is just an interim solution.

@0x6C38
Copy link
Copy Markdown
Contributor

0x6C38 commented Oct 24, 2017

Any reason this hasn't been merged to master?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants