How to make Eclipse work with the snippet macro in maven doxia files? - eclipse

I want to use the snippet macro in my maven site documentation in order to allow for testing of my examples code snippets with JUnit. But I don't want Eclipse to show the red "there is a build error" marker for all of my projects (which it does since m2eclipse does not recognize the snippet macro). I do want maven dependency management to be enabled for the projects in Eclipse, so disabling the maven integration completely is not an option. Moving to a different IDE is not an option either since I cannot force all of my coworkers to switch from Eclipse as well.
I would like a solution to either:
Make the Doxia integration in (m2)Eclipse recognize or ignore the snippet macro
Make Eclipse ignore errors in apt files altogether

Uninstalling the Doxia support is one solution.
Under the Help menu, click "Install new software", then "Already installed".
Select the "Maven Doxia" bundle and click "Uninstall...".

Related

Add ttcn3 syntax highlighting to eclipse

I don't work with ttcn3 full-time, what I need is just basic syntax highlighting and commenting on Ctrl+/ added to eclipse.
After some googling I discovered Eclipse Titan, but it seems to be a full-blown IDE for ttcn3 with compiler and stuff, and I need just a plugin to eclipse.
I would like to find something like "Set syntax: ttcn3" from SublimeText, is it possible in eclipse?
if you go to this link:
https://projects.eclipse.org/projects/tools.titan/downloads
you will find that you can download the Titan plugins for Eclipse (today they look like this):
Eclipse plug-ins 6.2.0
You may want to install them in your current Eclipse and find out if that is what you are after.
Gustavo.
After installing the plugin
1.change the nature of your ttcn project for "TITAN Nature" this way:
Project popup>Properties>Project Natures>Add...>TITAN Nature.
(if this is not enough:)
2.Select Window>Preferences>TITAN Preferences>On-the-fly checker>Enable parsing of TTCN-3, ASN.1 and runtime configuration files
(You can also set perspective TITAN Editing/Titan Executing/TITAN Log Viewer)

Maven multimodule projects linking in eclipse

I have a maven multi module project which has 5 modules. Some of my modules depend on one or more other modules, I am successfully able build the project and in eclipse also I am not getting any errors. However there is one problem which is bothering me, when i ctrl + click in my code and the class is defined on some other project eclipse does not open the file in the editor. I know i can attach the source code using maven but still i wont be able to make changes to that file.
Is there any way to be able to link projects in eclipse through maven?
Is there any way to be able to link projects in eclipse through maven?
That behaviour is the default. To check if for some reason that default is not in effect for your project, right click your project (the project you want to jump from) and go to "Maven". If there is an option "Disable Workspace Resolution" the workspace resolution is switched on, meaning you can theoretically jump from that project.
If you still cannot jump, then the project you want to jump to is not in your workspace. Take into account that for eclipse to identfy one project as dependency of another, everything including version must match.
Also check what rest_day said. You must have the projects importet as maven projects, but running eclipse:eclipse is not required anymore with current (up to ca 2 year old) eclipse.
Did you import the projects as Maven projects?
Also, could you go to the root of the project and run mvn eclipse:eclipse
eclipse:eclipse
Full name:
org.apache.maven.plugins:maven-eclipse-plugin:2.10:eclipse
Description:
Generates the following eclipse configuration files:
.project and .classpath files
.setting/org.eclipse.jdt.core.prefs with project specific compiler settings various configuration files for WTP (Web Tools Project), if the parameter wtpversion is set to a valid version (WTP configuration is not generated by default)
If this goal is run on
a multiproject root, dependencies between modules will be configured
as direct project dependencies in Eclipse (unless useProjectReferences
is set to false).
Instead of Ctrl+Click, click on the identifier and press F3. If you now see a red text reading "Current text selection cannot be opened in an editor", you've been hit by this bug.
See this question for a solution: How do I get rid of "Current text selection cannot be opened in an editor" in Eclipse?

How to use SVN to build a library

I am trying to follow a tutorial, and I am told to:
1- Get the source code for the Java EMV Reader library from http://code.google.com/p/javaemvreader/ and build it.
2- Drop the resulting jar file in lib/.
3- Import the project in Eclipse and build it.
I right click the java files, and choose run as but don't get an option to run as Java Application. I also can not export the files as a JAR file. I have enclosed an image of what I have
After the first comment, I right clicked on my project, and under Maven, chose the option "configure as Maven" project. ( Thank you so much; this must be one of the fastest resolutions in the world )And I can now run the project. I get the window in my pic2, which I have attached. I don't however know what step 2 of the above instructions means. I don't see a lib/ folder. And the project he is refering to in step 3 is on git. Any ideas on what he means? ![pic2]!1
Eclipse projects have a "type" and that controls what tools are available. You probably created a "Basic Project" which means there are no compilers or other Java tools associated with it. You would want to create a Java Project in Eclipse.
That project does not seem to have Eclipse .project and .classpath files checked into the repository. It does look to be a Maven project however. So you would either want the m2eclipse plugins installed, and check this out as a Maven project, which would handle configuring everything else, or you want to use the Checkout As ... option and use the wizard to create a new Java project to checkout.
These are more Eclipse IDE questions than SVN or Subclipse questions.

How do I interact with Maven goals using Eclipse/STS?

I am learning Eclipse, and I'm trying to find out how to interact with Maven goals visually in Eclipse/SpringSource Toolsuite. In IDEA, there is a nice Maven menu on the right-hand side of the IDE that is put there by default - no extra user configuration is necessary to make this show up there.
How can I get the same thing in Eclipse? It seems weird that this is not enabled by default. I've looked in the "Window" section of the IDE and I also don't see it either. The only window dealing with Maven is the repository listings... which is not what I want.
Do people use the command line instead? How can I get the same thing that IDEA has?
If it is eclipse, get M2Eclipse plugin installed for your eclipse.
Just go to Help -> Eclipse Market Place and try to Find "Maven
Integration For Eclipse". In the results choose "Maven Integration
For Eclipse" and install it.
Then, if the project in your workspace is a Maven Project right click
on it and choose Run As -> it will show you some default goals
like clean, install, etc.. If you want to run other goals choose run
configurations and in the left part of the window, you will find an
option Maven Build. Right click on it and select New -> then you will
be prompted to choose the project and enter the goals you want to
execute...

What happened to the "Enable Nested Modules" option in m2-eclipse?

I contribute to and implement some open source projects that use a Maven2 build system organized into several sub-modules. I've also been an Eclipse user for several years. With these projects, I have historically leveraged the maven-eclipse plugin so that Eclipse can correctly recognise library dependencies in my project.
It used to be the case that -- when I set up a new workspace or project -- I would have to right-click select "Enable Dependency Management" followed by right-click "Enable Nested Modules." Once I did these things, maven & eclipse would find dependent libraries properly in my .m2 local repo.
But in my most recent install of Eclipse/m2-eclipse -- Eclipse Build 20100218-1602, m2-eclipse 0.10.0.20100209-0800 (sorry, the "About" dialog doesn't provide anything better than that) -- the "Enable Nested Modules" option is missing. Nor does the project seem willing to find my nested modules without it.
After much digging and some trial & error, I got the IDE to recognize my sub-modules by setting...
includeModules=true
In my org.maven.ide.eclipse.pref file manually.
But my question is: what gives? Why did this option disappear? Is there some newer, better way that I should be using m2-eclipse to find nested modules? How are other Maven & Eclipse users dealing with this issue?
The thing here is the option to enable nested modules was moved to the Window >Preferences > Maven. Set the Support multiple Maven modules mapped to single Eclipse Workspace project checkbox, right click your project, navigate to Maven menu item you can find the 'Enable nested modules' option.
Looks like support for this feature was recently removed:
https://issues.sonatype.org/browse/MNGECLIPSE-2291
Why did this option disappear? Is there some newer, better way that I should be using m2-eclipse to find nested modules?
Could this be somehow related to the option below (accessible via Windows > Preferences > Maven):
To be honest, I'm not 100% sure because I don't create my projects under Eclipse, I create them on the command line outside Eclipse and import them as Existing Maven Projects (and this works with nested modules).