I am trying to set up Luntbuild 1.6.2 from scratch in our UAT environment. I have created a project, builder and schedule. We use subversion as source control so i have specified the repository and path as well in luntbuild.
But when I trigger the schedule nothing happens and system log reads as below:
com.luntsys.luntbuild.utility.ValidationException: No modules defined!
at com.luntsys.luntbuild.vcs.Vcs.validateModules(Vcs.java:323)
at com.luntsys.luntbuild.vcs.SvnAdaptor.validateModules(SvnAdaptor.java:739)
at com.luntsys.luntbuild.vcs.Vcs.validate(Vcs.java:342)
at com.luntsys.luntbuild.db.Project.validate(Project.java:347)
at com.luntsys.luntbuild.db.Project.validateAtBuildTime(Project.java:363)
at com.luntsys.luntbuild.db.Schedule.validateAtBuildTime(Schedule.java:383)
at com.luntsys.luntbuild.BuildGenerator.execute(BuildGenerator.java:186)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
I don't know what I am missing? any clues...??
I was able to resolve this problem with help of one of my colleague...
You have to add the module inside VCS adapter tab and you need not to define all entries. I left all of it as blank and it resolved the issue.
Related
I'm trying to make my project modular on Eclipse, but I'm running into an issue. I have added the module-info.java file through right-clicking on the project > Configure > Create module-info.java. However, when I run, I get the error
Error occurred during initialization of boot layer
java.lang.module.FindException: Module serenitea-pot-manager not found
I believe this might be caused by having renamed the project to sereniteaPotManager at some point. Initially, the project name was serenitea-pot-manager, which is the name of the module being asked for. I did the renaming through right-clicking on the project > Refactor > Rename..., which should have updated all instances.
I have been searching for a while, but still haven't found a way to fix this. Is there anything else that I need to update on Eclipse for it to change to the correct module name?
Note: The module name included in module-info.java is indeed sereniteaPotManager.
I had the same problem. I will summarize my experience then my solution.
I did a rename of the module, and Eclipse kept wanting to use the old module name. Cleans, restarts, etc., did not help. A search of the project properties, the run configuration, and all files in the workspace, did not turn up an instance of the original module name. Editing the module name so that it matched the original one did work. It is as if Eclipse tucks away the initial module name in some hidden place and keeps wanting to use it.
I was able to solve the problem by deleting all Run configurations that existed and then creating a new project and new Run configuration.
I am using JavaFX, and a somewhat peculiar side-effect of this is that the normally-required run configuration argument (below) was not needed in this new run configuration. I wonder if Eclipse is tucking that away in some hidden place, also?
In Java, serenitea-pot-manager is an invalid module name since a module name must not contain hypens (-).
Therefore, In module-info.java, Eclipse shows Syntax error on token "-". So make sure, before running your application, no compile errors are shown in the Problems view.
Rename your module to serenitea_pot_manager, delete the existing launch configuration (in Run > Run Configurations...) and try again:
module serenitea_pot_manager {
// ...
}
https://stackoverflow.com/users/17416717/stevevzzz[Steves] solution worked for me while I got stuck with the same problem.
... but I did not create a new project. I only was able to solve the problem by deleting all Run Configurations that existed and then I created a new Run Configuration.
I noticed the same behaviour. After changing the module name of my project, I got the error
Error occurred during initialization of boot layer
java.lang.module.FindException: Module ... not found
It looks like eclipse holds on to the original module name that is used when first running the application using the Run Configuration. To work around this issue, I deleted and recreated the run configuration. Then it works again.
So i am using the Plugin Eclipse-PMD (http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/) in a shared version control enviroment.
We have multiple smaller projects in the entire project.
Out of the box it seems that this plugin requires individual configuration for every single project.
The way it works it that it searched for a .pmd file in the project and read information from that.
But it's really inconvenient to do that for 10-20 subprojects.
There is a general setting under Preferences -> PMD. But this doesn't seem to apply globally, even if that global checkbox is checked.
What i basically want: I want to configure the plugin to respect a single ruleSet-file in one place.
There is another problem with configuring it subproject-specific: I cannot configure a relative path for the ruleSetFile in the .pmd-file.
The problem with absolute path is that the file is checked into version control ... so with every commit everyone else would have to readjust.
I found this commit: https://github.com/pmd/pmd/pull/36 but i cannot seem to make it work the way it's roughly described.
So, did anyone achieve what i am looking for?
Edit: Actually i cannot even specify any other file that is not ".ruleset" in the .pmd-file as <ruleSetFile> without specifying an absolute path??
The default value for ruleSetFile is ".ruleset". So i thought, analogous to that, i could create a file in the exact same dir, call it fooRules.xml, and specify it via <ruleSetFile>fooRules.xml</ruleSetFile> but it can only find it if put the entire path to fooRules.xml in there?!
Try eclipse-pmd (available in the Eclipse marketplace or via the update site http://www.acanda.ch/eclipse-pmd/release/latest). With eclipse-pmd you can configure your projects to use a single rule set file for several projects. It also stores its path relative to the workspace. You still have to configure each project individually though (for now, this will change in a future release).
To set up eclipse-pmd in the way you described you have to open the project properties of your first project, select the "PMD" property page and add the rule set. Select the rule set type "Workspace" and pick your rule set file.
For every other project you have to open the project's PMD property page where you'll find the previously selected rule set file which simply needs to be checked to activate.
If you set it up this way there will be a .eclipse-pmd file in each project containing the settings. If you check this into your version control system then no one else in your team has to set up anything (apart from installing eclipse-pmd).
Disclaimer: I wrote eclipse-pmd. Mostly because I had the exact same problems as you with the other plugin.
I've been struggling a long time to get this working with PMD for Eclipse. While Eclipse-PMD has this feature built-in, I had some other issues with it (e.g. I think it is not meant to create reports).
The trick was adding the rules to the project as a link.
Create the rule file, e.g. pmd.xml, in the parent folder of the project. Add the file to the projects to be checked, but add it as a reference. Therefore, drag the file from the explorer to the bundle and select:
In the project properties, in the PMD section, check Enable PMD and Apply and Close the settings.
Now close Eclipse. Edit the file with the name .pmd in the project folder by replacing the content with the following:
<?xml version="1.0" encoding="UTF-8"?>
<pmd>
<useProjectRuleSet>true</useProjectRuleSet>
<ruleSetFile>pmd.xml</ruleSetFile>
<includeDerivedFiles>false</includeDerivedFiles>
<violationsAsErrors>true</violationsAsErrors>
<fullBuildEnabled>true</fullBuildEnabled>
</pmd>
Restart Eclipse and right click the project. Select PMD/Check Code. Now, only the violations defined in pmd.xml should be reported.
Configuring PMD only using the GUI does not seem to work for me.
I am currently working on an API for a server software so users can extend my software by programming plugins for it instead of modifying the software themselves, and allow other users without programming knowledge to easily change the software by adding these plugins. So far, everything is working fine. But, I am running into a problem with configuration.
You see, each plugin has a plugin.yml file stored with these 4 attributes:
Main: The main class is stored here
Name: This is where the plugin name is stored
Version: This is where the plugin version is stored
Author: This is where the plugin author is stored
Now, in order for the plugin to print something to the console, they use a function called: this.getServer().getLogger().info("MESSAGE); (They extend another class for plugins, thats why they use "this" instead of another class to log)
But, I do not have any idea on how to get which plugin is which when they are calling the function. I have a ArrayList of PluginSessions which event handlers use to cycle through to run Event Functions.
My solution is to get the jar from which a class is being called so I can then get the plugin.yml from there. But, I have NO idea on how to get that, I have tried using Class.forName(); and some other code. But because the class is non-existent within the jar/project running the code, It will throw a ClassNotFoundException.
Does anyone here know how to get the jar from which a class is coming from without using Class.forName()? Thanks! -Trent
Take a look at Class.getResource.
If you call MyClass.getResource("plugin.yml") (or "/plugin.yml" with leading slash, I forget) you get back a file URL pointing to the plugin.yml file in the same jar as MyClass. (Or null if the path is wrong or the jar doesn't contain a "plugin.yml" file.) You can then open an InputStream to that resource. In a plugin framework you may want to use myPluginInstance.getClass().getResource.
Assuming jar for 'PluginSessions' is already added in you classpath by eclipse then you can try the following trick -
Select/highlight PluginSessions by double clicking on it
Now press CTRL+SHIFT+T
A dialog named Open Type is appeared. Here you found from where the PluginSessions class is coming from. If you have more than one jar containing PluginSessions class than you have a list of them.
To benefited from this CTRL+SHIFT+T trick you need to add all of your jar need by the project to be added in your classpath.
I may have a corruption problem in Eclipse run configurations. This happened after I dragged (or copy-pasted, I don't remember) a Java class called MyClass from project1 to project2. Then I deleted project1. When I create a new run configuration the name given is MyClass (1). In other words, it thinks there is already a run configuration called MyClass, so the new one will have to have a number appended. (Edit: There is no existing MyClass run configuration so there is no apparent reason for the appended number. In fact, I deleted all of my run configurations.)
How can I easily clean up meta-data and be able to build again with minimal manual effort?
If there is a meta-data deletion recommendation that gets rid of more than just run configurations, that probably would still be a good solution, if it does not create a lot of manual work to get set up to work again.
Edit: The problem might be caused by the fact that there is a launch configuration named MyClass - project1 visible in the export dialogue. project1 no longer exists, but this remnant lives on, tying up the class name MyClass. I am not sure if there is a difference between a run configuration and a launch configuration.
AFAIK launch configurations are stored on:
${WORKSPACE}/.metadata/.plugins/org.eclipse.debug.core/.launches
Take a look to the existent configurations and remove those that are not interesting to you.
And restart Eclipse
Open Eclipse. Follow Run => Run Configurations. You will see options on the left hand side. Under the Java Applications option, you will see the list of runnable classes (the ones have a main method). These class nodes on that list are right clickable. By right clicking on your running configuration, you will see New, Duplicate and Delete options. You can delete your old running configuration via delete option. To create a new running configuration, right click on Java Applications option and click on New and then configure it.
You could try starting eclipse with the -clean command line option.
On windows the easiest way to do that is to copy your shortcut to eclipse and add the option to the arguments list, then start using the new shortcut.
I have a Maven Java project, imported using m2eclipse.
The target/ directory is not marked as 'Derived' by m2eclipse.
Problems:
It is validated, so any validation error appear twice. My example shows a JSP Problem, when I insert intentionally an error in a jsp.
When I want to open a resource with Ctrl-Shift-R, all files appear twice, and I run the risk of editing the copy instead of the original file.
Possibly see post eclipse-ignore-folder
Note: When I set manually the directory to derived, the validation problem doesn't disappear, so that would only be part of the solution...
Question:
Is there something I need to do, so that m2eclipse sets the target/ directory to 'Derived' ?
Yeah, that has been around for a while. I wrote a plug-in that allows you to mark directories as "derived" without having to find them all (http://eclipsefrills.sourceforge.net/). It's not great, and you still have to manually run the action to make it work, but it may help.
Odd, though, I have not noticed the problem lately, myself. I wonder if there is some setting in the preferences that takes care of this now.
Good luck.
I got rid of this problem by writing a custom plug-in KeepTargetDerivedPlugin. As its name suggests, it automatically keeps all target folders derived (unlike the other solutions, which require user action).
Still, e. g. the YA2O's plug-in can be used to mark derived folders of projects which already reside in the given Eclipse workspace.
Yes: open a bug report :)
I have been so annoyed by this problem that I wrote a plugin to solve it. You can get the source and jar from here.