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

Not available in Maven Central #25

Open
restagner opened this issue Sep 11, 2017 · 8 comments
Open

Not available in Maven Central #25

restagner opened this issue Sep 11, 2017 · 8 comments

Comments

@restagner
Copy link

I cannot seem to find the 1.0RC2 release on Maven Central. I'm looking for it using the following coordinates org.modelcatalogue:spreadsheet-builder-poi:1.0.RC2

Am I missing something?

@musketyr
Copy link
Collaborator

You are right, it looks like the item actually hasn't been ever synchronised to Maven Central.

please, follow the instructions "Set me up" here: https://bintray.com/metadata/model-catalogue

also take note that further development is going under new repository and coordinates: http://spreadsheet.dsl.builders/

@restagner
Copy link
Author

@musketyr

Ok, I've updated my coordinates. And, I've attempted to use version 1.0. When I run the example provided in the documentation, I end up with an error

@Grab('builders.dsl:spreadsheet-builder-poi:1.0')
@Grab('org.apache.ivy:ivy:2.4.0')

//import org.modelcatalogue.spreadsheet.builder.poi.PoiSpreadsheetBuilder
import builders.dsl.spreadsheet.builder.poi.PoiSpreadsheetBuilder
File file = new File('spreadsheet.xlsx')

PoiSpreadsheetBuilder.create(file).build {
    sheet('Sample') {
        row {
            cell 'A'
            cell 'B'
            cell 'C'
        }
        row {
            cell 1
            cell 2
            cell 3
        }
    }
}

The error

Caught: groovy.lang.MissingMethodException: No signature of method: spreadsheetBuilderTest.sheet() is applicable for argument types: (java.lang.Integer, spreadsheetBuilderTest$_run_closure1$_closure2) values: [1, spreadsheetBuilderTest$_run_closure1$_closure2@5ddabb18]
Possible solutions: sleep(long, groovy.lang.Closure), sleep(long), wait(), grep(), every(), inspect()
groovy.lang.MissingMethodException: No signature of method: spreadsheetBuilderTest.sheet() is applicable for argument types: (java.lang.Integer, spreadsheetBuilderTest$_run_closure1$_closure2) values: [1, spreadsheetBuilderTest$_run_closure1$_closure2@5ddabb18]
Possible solutions: sleep(long, groovy.lang.Closure), sleep(long), wait(), grep(), every(), inspect()
        at spreadsheetBuilderTest$_run_closure1.doCall(spreadsheetBuilderTest.groovy:10)
        at com.sun.proxy.$Proxy9.configure(Unknown Source)
        at builders.dsl.spreadsheet.api.Configurer$Runner.doConfigure(Configurer.java:28)
        at builders.dsl.spreadsheet.builder.poi.PoiSpreadsheetBuilder.build(PoiSpreadsheetBuilder.java:48)
        at spreadsheetBuilderTest.run(spreadsheetBuilderTest.groovy:9)

Am I missing another statement?

@musketyr
Copy link
Collaborator

there are some weird behaviour going on when using Grab. Please, try to use full Gradle project.

@restagner
Copy link
Author

restagner commented Sep 12, 2017

@musketyr

Per your suggestion, I created a gradle project and removed the @grab annotations. However, when I try to execute the script I get

Caught: javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.EventFactory not found
javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.EventFactory not found
	at org.apache.poi.openxml4j.opc.internal.marshallers.PackagePropertiesMarshaller.<clinit>(PackagePropertiesMarshaller.java:41)
	at org.apache.poi.openxml4j.opc.OPCPackage.init(OPCPackage.java:161)
	at org.apache.poi.openxml4j.opc.OPCPackage.<init>(OPCPackage.java:141)
	at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:72)
	at org.apache.poi.openxml4j.opc.OPCPackage.create(OPCPackage.java:394)
	at org.apache.poi.xssf.usermodel.XSSFWorkbook.newPackage(XSSFWorkbook.java:475)
	at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:243)
	at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:235)
	at builders.dsl.spreadsheet.builder.poi.PoiSpreadsheetBuilder.create(PoiSpreadsheetBuilder.java:18)
	at builders.dsl.spreadsheet.builder.poi.PoiSpreadsheetBuilder$create.call(Unknown Source)
	at spreadsheetBuilderTest.run(spreadsheetBuilderTest.groovy:4)

@musketyr
Copy link
Collaborator

Is there any chance you can share the project? Which version of Java are you using? Which OS?

@restagner
Copy link
Author

Sure.

I can share the project. The odd thing is that I was able to get it working using the Java example. Unfortunately, I could not get it to work using the Groovy example. I've created a repo on github where you can view the project: https://github.com/restagner/simple-spreadsheet-demo

I would appreciate it, if you could demonstrate, using the project I've submitted to you, how to get this working with pure Groovy.

@musketyr
Copy link
Collaborator

@musketyr
Copy link
Collaborator

The latest release of the builders.dsl fork is now at Maven Central.

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

2 participants