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

Mavenize #4

Closed
BenRomberg opened this issue Mar 9, 2012 · 11 comments
Closed

Mavenize #4

BenRomberg opened this issue Mar 9, 2012 · 11 comments
Assignees
Milestone

Comments

@BenRomberg
Copy link
Member

optional: publish on any public repo

@ghost ghost assigned BenRomberg Mar 9, 2012
@marcphilipp
Copy link
Contributor

Any plans/progress on this? Do you want to use Maven as build tool or use something else (Gradle?) but publish Maven artifacts as well?

Would also be nice to have a public build server, e.g. on CloudBees, wouldn't it?

@BenRomberg
Copy link
Member Author

I think Maven is fine. I'll need support for a customized Manifest-File and building an additional Jar - not sure if that's possible with Gradle.

Build server is a great idea, I'll open a separate issue for that one.

@marcphilipp
Copy link
Contributor

What needs to be customized in the manifest file?

@BenRomberg
Copy link
Member Author

Premain-Class and Boot-Class-Path, see https://github.com/C4J-Team/C4J/blob/master/c4j/build.xml

@marcphilipp
Copy link
Contributor

Thanks, wasn't aware of the Ant build file.

@marcphilipp
Copy link
Contributor

Do you want to keep working with JARs in the lib folder or use Maven for dependency management and m2eclipse locally?

@BenRomberg
Copy link
Member Author

Maven all the way!

@marcphilipp
Copy link
Contributor

Doesn't work for me on my MacBook (using Maven 3.03):

[INFO] ------------------------------------------------------------------------
[INFO] Building c4j-systemtest 4.0-Beta6-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom (6 KB at 10.4 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.jar
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.jar (34 KB at 29.5 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/hamcrest/hamcrest-integration/1.3.RC2/hamcrest-integration-1.3.RC2.pom
Downloaded: http://repo1.maven.org/maven2/org/hamcrest/hamcrest-integration/1.3.RC2/hamcrest-integration-1.3.RC2.pom (2 KB at 2.9 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/hamcrest/hamcrest-integration/1.3.RC2/hamcrest-integration-1.3.RC2.jar
Downloaded: http://repo1.maven.org/maven2/org/hamcrest/hamcrest-integration/1.3.RC2/hamcrest-integration-1.3.RC2.jar (7 KB at 16.3 KB/sec)
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ c4j-systemtest ---
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ c4j-systemtest ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/mphilipp/Repositories/C4J/c4j-systemtest/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.4:compile (default-compile) @ c4j-systemtest ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ c4j-systemtest ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.4:testCompile (default-testCompile) @ c4j-systemtest ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 87 source files to /Users/mphilipp/Repositories/C4J/c4j-systemtest/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.12:test (default-test) @ c4j-systemtest ---
[INFO] Surefire report directory: /Users/mphilipp/Repositories/C4J/c4j-systemtest/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Error opening zip file or JAR manifest missing : ../c4j/dist/c4j-current-all.jar
Error occurred during initialization of VM
agent library failed to init: instrument

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] c4j ............................................... SUCCESS [39.475s]
[INFO] c4j-systemtest .................................... FAILURE [3.574s]
[INFO] c4j-acceptancetest ................................ SKIPPED
[INFO] c4j-parent ........................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43.252s
[INFO] Finished at: Sat May 19 19:54:55 CEST 2012
[INFO] Final Memory: 12M/95M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project c4j-systemtest: Error occurred in starting fork, check output in log -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :c4j-systemtest

Doesn't work on the Usus Jenkins either (different error message):
https://projectusus.ci.cloudbees.com/job/C4J/2/console

@marcphilipp
Copy link
Contributor

Ok, figured out the problem I've had locally: Used mvn clean test instead of mvn clean install.

Now looking into the Jenkins config.

@BenRomberg
Copy link
Member Author

After having had the same compilation errors on BuildHive, it seems to be a bug in the Java Compiler - see https://github.com/C4J-Team/C4J/wiki/Known-Issues

Fixed the relevant code, should now also run on your Jenkins.

@marcphilipp
Copy link
Contributor

Indeed, it does: https://projectusus.ci.cloudbees.com/job/C4J/3/

Thanks!

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