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

Setup tests and initial set of dependencies #2

Merged
merged 1 commit into from
Jun 16, 2023
Merged

Conversation

Postremus
Copy link
Contributor

@Postremus Postremus commented Feb 20, 2023

fixes #1

@Postremus Postremus changed the title Start first report setup Setup first example report for integration testing Feb 20, 2023
@Postremus
Copy link
Contributor Author

Postremus commented Feb 20, 2023

Right now I am facing a funny one:

[ERROR] Failed to execute goal com.alexnederlof:jasperreports-plugin:2.8:jasper (default) on project example-report: Execution default 
of goal com.alexnederlof:jasperreports-plugin:2.8:jasper failed: Plugin com.alexnederlof:jasperreports-plugin:2.8 or one of its depende
ncies could not be resolved: Failed to collect dependencies at com.alexnederlof:jasperreports-plugin:jar:2.8 -> net.sf.jasperreports:ja
sperreports:jar:6.15.0 -> com.lowagie:itext:jar:2.1.7.js8: Failed to read artifact descriptor for com.lowagie:itext:jar:2.1.7.js8: Coul
d not transfer artifact com.lowagie:itext:pom:2.1.7.js8 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for reposi
tories: [jaspersoft-third-party (http://jaspersoft.artifactoryonline.com/jaspersoft/third-party-ce-artifacts/, default, releases+snapshots), jr-ce-releases (http://jaspersoft.jfrog.io/jaspersoft/jr-ce-releases, default, releases+snapshots)] -> [Help 1]

mvn clean install on the example-report module.

The plugin I normally use for jasper compilation is not maintained anymore.
https://github.com/alexnederlof/Jasper-report-maven-plugin

Might have to either fork that one, or try out the officical one.

Or I could maybe work around this with some artifact exclusions.
Or add another maven repository. The build process on ci might not like that though.

@Postremus
Copy link
Contributor Author

Managed to fix it by forcing an updated jasper version :)

<build>
        <plugins>
            <plugin>
                <groupId>com.alexnederlof</groupId>
                <artifactId>jasperreports-plugin</artifactId>
                <version>${jasperreports-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>jasper</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>net.sf.jasperreports</groupId>
                        <artifactId>jasperreports</artifactId>
                        <version>${jasperreports.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

I still asked If I could adopt the maven plugin.

@Postremus
Copy link
Contributor Author

I can use something like this to export the report as zip if need be.
Might need to implement a zipclassloader in that case though..

<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptors>
						<descriptor>assemblies/zip.xml</descriptor>
					</descriptors>
					<finalName>${project.artifactId}</finalName>
					<appendAssemblyId>false</appendAssemblyId>
					<archiverConfig>
						<compress>false</compress>
					</archiverConfig>
				</configuration>
				<executions>
					<execution>
						<id>create-archive</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

assembly.xml

<assembly
	xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
	<id>zip</id>
	<formats>
		<format>zip</format>
	</formats>
	<includeBaseDirectory>false</includeBaseDirectory>
	<fileSets>
		<fileSet>
			<directory>target/classes/</directory>
			<outputDirectory>.</outputDirectory>
			<useDefaultExcludes>true</useDefaultExcludes>
			<excludes>
				<exclude>*.zip</exclude>
				<exclude>*.xsd</exclude>
				<exclude>*.jrxml</exclude>
				<exclude>*.xml</exclude>
			</excludes>
		</fileSet>
		<fileSet>
			<directory>target/jasper/</directory>
			<outputDirectory>.</outputDirectory>
			<useDefaultExcludes>true</useDefaultExcludes>
		</fileSet>		
	</fileSets>
</assembly>

@Postremus
Copy link
Contributor Author

Postremus commented Feb 23, 2023

Will continue here once my fork of the maven plugin has its first release with jasper 6.20
https://github.com/pro-crafting/Jasper-report-maven-plugin

runtime/pom.xml Outdated Show resolved Hide resolved
@Postremus Postremus force-pushed the feature/first-report branch 3 times, most recently from 2a246ec to 1d287ed Compare May 13, 2023 18:02
@Postremus
Copy link
Contributor Author

I got a lot further during the last weekend. Native does not work yet, though that was already expected. I might just disable the native tests for now, and proceed with getting a 0.0.1 out later this week.

@Postremus Postremus changed the title Setup first example report for integration testing Setup tests and initial set of dependencies Jun 16, 2023
@Postremus Postremus marked this pull request as ready for review June 16, 2023 18:32
@Postremus Postremus force-pushed the feature/first-report branch 2 times, most recently from 3b26b36 to 7a75b8c Compare June 16, 2023 18:42
@Postremus Postremus merged commit 13637b1 into main Jun 16, 2023
@Postremus Postremus deleted the feature/first-report branch June 16, 2023 19:23
@gastaldi
Copy link
Member

gastaldi commented Oct 2, 2024

@all-contributors add @Postremus for code and maintenance

Copy link
Contributor

@gastaldi

I've put up a pull request to add @Postremus! 🎉

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

Successfully merging this pull request may close these issues.

Setup project
3 participants