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

Cannot compile without error: package org.junit does not exist #125

Open
prrvchr opened this issue Dec 30, 2024 · 1 comment · May be fixed by #126
Open

Cannot compile without error: package org.junit does not exist #125

prrvchr opened this issue Dec 30, 2024 · 1 comment · May be fixed by #126

Comments

@prrvchr
Copy link
Contributor

prrvchr commented Dec 30, 2024

If I try to compile in the build folder with the command:

ant -Dlibreoffice.home=/lib/libreoffice -Declipse.home=/home/prrvchr/eclipse/commiter-2024-12/eclipse

I have the following error message:

Buildfile: /home/prrvchr/github/loeclipse/build/build.xml
Trying to override old definition of task javac

core.init-env:
    [mkdir] Created dir: /home/prrvchr/github/loeclipse/core/bin/ant/plugins
    [mkdir] Created dir: /home/prrvchr/github/loeclipse/core/bin/ant/classes

java.init-env:

python.init-env:

init-env:

core.version:
     [copy] Copying 1 file to /home/prrvchr/github/loeclipse/build
   [delete] Deleting: /home/prrvchr/github/loeclipse/build/MANIFEST-MF.properties

core.compile:
    [javac] Compiling 200 source files to /home/prrvchr/github/loeclipse/core/bin/ant/classes
    [javac] warning: [options] bootstrap class path is not set in conjunction with -source 8
    [javac]   not setting the bootstrap class path may lead to class files that cannot run on JDK 8
    [javac]     --release 8 is recommended instead of -source 8 -target 1.8 because it sets the bootstrap class path automatically
    [javac] warning: [options] source value 8 is obsolete and will be removed in a future release
    [javac] warning: [options] target value 8 is obsolete and will be removed in a future release
    [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
    [javac] /home/prrvchr/github/loeclipse/core/source/org/libreoffice/ide/eclipse/core/wizards/pages/ManifestExportPageControllerTest.java:24: error: package org.junit does not exist
    [javac] import static org.junit.Assert.assertEquals;
    [javac]                        ^
    [javac] /home/prrvchr/github/loeclipse/core/source/org/libreoffice/ide/eclipse/core/wizards/pages/ManifestExportPageControllerTest.java:24: error: static import only from classes and interfaces
    [javac] import static org.junit.Assert.assertEquals;
    [javac] ^
    [javac] /home/prrvchr/github/loeclipse/core/source/org/libreoffice/ide/eclipse/core/wizards/pages/ManifestExportPageControllerTest.java:25: error: package org.junit does not exist
    [javac] import static org.junit.Assert.assertFalse;
    [javac]                        ^
    [javac] /home/prrvchr/github/loeclipse/core/source/org/libreoffice/ide/eclipse/core/wizards/pages/ManifestExportPageControllerTest.java:25: error: static import only from classes and interfaces
    [javac] import static org.junit.Assert.assertFalse;
    [javac] ^
    [javac] /home/prrvchr/github/loeclipse/core/source/org/libreoffice/ide/eclipse/core/wizards/pages/ManifestExportPageControllerTest.java:26: error: package org.junit does not exist
    [javac] import static org.junit.Assert.assertNotSame;
    [javac]                        ^
    [javac] /home/prrvchr/github/loeclipse/core/source/org/libreoffice/ide/eclipse/core/wizards/pages/ManifestExportPageControllerTest.java:26: error: static import only from classes and interfaces
    [javac] import static org.junit.Assert.assertNotSame;
    [javac] ^
...

In order to be able to compile it seems necessary to add an exclusion on **/*Test.java in the build.xml of the core folder.

I will propose a PR to fix this.

@prrvchr prrvchr linked a pull request Dec 30, 2024 that will close this issue
@prrvchr
Copy link
Contributor Author

prrvchr commented Jan 2, 2025

Adding an exclusion on **/*Test.java in the build.xml of the /core folder does not fix anything. I was forced to move the core/source/org/libreoffice/ide/eclipse/core/wizards/pages/ManifestExportPageControllerTest.java file into the folder core/source/org/libreoffice/ide/eclipse/core/unittests in order to compile. See PR #126

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 a pull request may close this issue.

1 participant