[MAGNOLIA-5916] Building Fails on Windows OS. Git:magnolia_main.pub; Part: Unittests, Charset-issue & Checksytle errors. Created: 15/Sep/14  Updated: 19/May/22  Resolved: 19/May/22

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 5.3.3
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Tobias Hochgürtel Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 Ultimate Service Pack 1, 64bit, English, activated.

PC C:\> java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

PC C:\> mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.8.0_20
Java home: D:\Program Files\Java\jdk1.8.0_20\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7" version: "6.1" arch: "amd64" Family: "dos"


Attachments: Text File MNGL-unkown.patch     XML File TEST-info.magnolia.module.files.MD5CheckingFileExtractorOperationTest.xml     XML File checkstyle-suppressions.xml     XML File effective_pom.magnolia-project-parent.pom.xml     Text File info.magnolia.module.files.MD5CheckingFileExtractorOperationTest.txt     Text File mvn_checkstyle_checksytle Output.txt     Zip Archive target_files-checkstyle.zip    
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Testcase included:
Yes
Date of First Response:

 Description   

I have tried to compile and build Magnolia-CMS project to get an understanding of internal system. So see some Junit Tests, who they are written for the beginning and so on.

Maven command which I used: "mvn clean install".

I received "Build Failure" a couple of times while I was on search for the reason of the Errors. I fixed 9 Unittest errors - I'm sure about the quality, but that an thing which we can change in future steps.

The last Error's which I get yet, are the "Checkstyle violations" - I have no glue about this and so I can't fix them and so I can't provide a patch.

I created the patch like wiki explained with "git diff > MGNL-unkown.patch".

Sorry, it's late and I'm tired.



 Comments   
Comment by Jan Haderka [ 15/Sep/14 ]

Hi Tobias,

thanks for the effort and sorry for your troubles. It's true that nobody around uses windows for development only for testing so such platform specific junit test error might easily slip in.
Just out of curiosity, was there any specific reason why you wrote your own method to deal with path separator instead of simply using java.util.File.pathSeparator?
Can you please also attach output from mvn checkstyle:checkstyle? It should produce bunch of files in /target directory. This error is more strange since check style should not be platform specific and build is running fine on jenkins.

Thx.

Comment by Tobias Hochgürtel [ 15/Sep/14 ]

mvn checksytle:checksytle output - 15.09.2014, 10:36

Comment by Tobias Hochgürtel [ 15/Sep/14 ]

checkstyle-cachefile
checkstyle-checker.xml
checkstyle-header.txt
checkstyle-result.xml
checkstyle-suppressions.xml

15.09.2015 - 10:36

Comment by Tobias Hochgürtel [ 15/Sep/14 ]

Hello Jan Haderka,

I can understand the windows thing. In the future I can bring experience In with CI-System and different Building and Testing Operation Systems. for yet it's okay, there were only small troubles. I have already made my experiences with software developing so these troubles were awakened for me, as I started with Magnolia. They are common so I think, for generally software projects.

I'm happy to see you question about the path separator method by me. I have not much experience with programming with Java. I'm an PHP5 and Typo3 CMS Developer for the last 9 years. I do an transition to coding language Java and more common Frameworks in javaworld. I'm fed up, with php related customers wishes and related branches of agentur and designers. To get well educated in Oracle Java, I bought Oracle Java Certification Vouchers for Exam 1Z0-803 (OCA) and Exam 1Z0-804 (OCP). - That's the reason why I have written that we can talk about the quality of patch(es).
I knowed that there is something to improve. I'm happy to see your question with improvement.

mvn_checkstyle_checksytle Output.txt
target_files-checkstyle.zip

I saw the builds in Magnolia jenkins - I have first written me an guide to building and foreign software project, with ideology of that the code is just fine and the error is on my side - so that I find all missing Libraries and Dependencies, that was helping me to stay on track. So checking jenkins of core developers was the first step if there appears an Build error. The last option in my guide was - to write an patch!

Comment by Daniel Lipp [ 15/Sep/14 ]

I had a quick look on the checkstyle errors: looks like it's all about test classes that e.g. don't have proper java doc. Those errors should not show up, as we explicitly exclude files under src/test from those checks: http://svn.magnolia-cms.com/view/build/maven-plugins/magnolia-build-tools/trunk/src/main/resources/magnolia-build-tools/checkstyle-suppressions.xml

Comment by Tobias Hochgürtel [ 15/Sep/14 ]

Does an overview of the effective pom.xml of the magnolia_main.pub project helps top locate the failure?

effective_pom.magnolia-project-parent.pom.xml

Comment by Tobias Hochgürtel [ 15/Sep/14 ]

checkstyle-suppressions.xml

 
<?xml version="1.0"?>

<!DOCTYPE suppressions PUBLIC
    "-//Puppy Crawl//DTD Suppressions 1.1//EN"
    "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">

<suppressions>
  <suppress files="src\\test\\.*" checks="JavadocType"/>
  <suppress files="src\\test\\.*" checks="JavadocStyle"/>
  <!-- Excluding Clover-generated sources - See BUILD-57 -->
  <suppress files="target\\clover\\.*" checks=".*"/>
  
  <suppress files="src/test/.*" checks="JavadocType"/>
  <suppress files="src/test/.*" checks="JavadocStyle"/>
  <!-- Excluding Clover-generated sources - See BUILD-57 -->
  <suppress files="target/clover/.*" checks=".*"/>
</suppressions>

Maven Command Used to validate that this Checkstyle Suprpressions.xml File works: clear; rm .\target\checkstyle-*; mvn -e checkstyle:check

With the help of Cygewin and makeChecksums.sh I was able to able to get checkstyle build-step succesfully done.

Hope this helps. Not really nice, because duplicated XML entries for an other Operation System, because of path separator token makes also trouble with Maven and Windows.

Comment by Magnolia International [ 14/Oct/14 ]

@dlipp, can you check if newer versions of checkstyle or the checkstyle plugins fix that ? (we're using 2.9.1 and i see 2.13 is out)

Comment by Roman Kovařík [ 19/May/22 ]

Hello,

This ticket is now marked as closed due to one of the following reasons:

  • A long period of inactivity
  • Uses an old or Beta version of an application, module, or framework that we no longer support
  • The issue is no longer reproducible or has been fixed in later versions

If you are still facing a problem or consider this issue still relevant, please feel free to re-open the ticket and we will reach out to you.

Thank you,
The Magnolia Team

Generated at Mon Feb 12 04:09:36 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.