Missing m2e?

28. June, 2011

If you downloaded the JEE edition of Eclipse 3.7, you’ll find that m2eclipse is missing.

Don’t worry, it’s part of the Indigo release train. Just install it manually from the Indigo p2 repository: http://download.eclipse.org/releases/indigo

Links: Oh my god, but where is m2e?

 

 


RC1 of Testing Ready For Testing [Updated]

15. May, 2011

I’ve recreated the testing repository using the latest version of my Maven Tools 4 Eclipse.

To browse the repository, please use the Nexus interface.

If you pull in any dependencies from the repository, non-Eclipse artifacts will come from from Project Orbit. If you want non-Eclipse dependencies (like log4j) from Maven Central, you need to change your profiles.

Deactivate “m4e.orbit” and activate “m4e.maven-central“. From the command line, that’s “-P m4e.maven-central” but I suggest to put these into your settings.xml (add “<activeProfile>m4e.maven-central</activeProfile>” to it).

Note that you don’t need to deactivate the profile m4e.orbit. As soon as you specify a profile on the command line or via the settings, it’s deactivated automatically.

“mvn help:active-profiles” and “mvn dependency:tree” are your friends.

Let me know if you find anything missing, odd, broken by  filing a bug or posting a comment here.

UPDATE 2011-05-30

Some dependencies from the new repo can also be found on Maven Central. One nasty problem is that both repos contain org.eclipse.equinox.app but the version from Maven Central contains odd dependencies which break your build.

To fix this, add this to your parent/root POM:

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.eclipse.dash</groupId>
        <artifactId>dependency-management</artifactId>
        <version>3.6.2</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    <dependencies>
  <dependencyManagement>

This will limit all version ranges to the versions found in our new repository. Since Maven Central didn’t import new versions for at least one year, this should fix all problems.

Related posts:


Maven Tools for Eclipse: Patching POMs

11. April, 2011

I’ve added a new feature to my Maven tools for Eclipse: Applying patches to POMs.

This is a first step towards solving issues like this one: Bug 342046 – Invalid third party dependencies in Mavenized BIRT plugins

I’m not 100% happy with the result, though. Currently, the patch overwrites the original code. I think it would be much better if it created a profile instead. This way, you could see the original code and it would be simple to switch between different solutions for a problem in a POM.

The two standard problems are:

  • Bad version (no version, version range or wrong version)
  • Dependency name

The latter is introduced by the fact that Eclipse projects need to pull dependencies via Project Orbit. Orbit often renames dependencies so there is a naming conflict if you pull your dependencies from Maven Central. So we need a way to say “I’m using Orbit” and “I want Maven Central”.


Eclipse 3.6.2 Artifacts for Maven 2

20. March, 2011
Apache Maven logo.

Image via Wikipedia

Update: The project has its own web site, now.

Two days ago, I told you about Project Dash and my new tools for it. Well, we did run them over the weekend and import a lot of stuff from Eclipse 3.6.2 into a brand new testing Maven 2 repository.

So if you want to use Eclipse bundles in Maven 2 for your own projects (SWT, EMF, even BIRT), have a look and let me know:

  • Did I miss anything?
  • Is anything wrong? Version numbers, names, dependencies, optional dependencies.
  • Any other comments?

Making the world a better place, one line of code at a time! 🙂

The tools are here.

New project home page: Maven Tools 4 Eclipse


Project Dash m4e Tools – Create Maven Artifacts From Eclipse Plug-ins

18. March, 2011

[UPDATE] There is now a testing repo which contains Eclipse 3.6.2

If you use Maven and Eclipse, you know the pain: How do I convert Eclipse plug-ins into Maven artifacts?

The simple step is to run mvn eclipse:make-artifacts (or the ill fated eclipse:to-maven).

But that’s only half of the work. A few of the plug-ins have bad dependencies (stuff isn’t declared optional, polluting your runtime classpath; versions of dependencies are missing). And a major problem is source attachments. Eclipse separates those from the binaries, so you end up with org.eclipse.core.runtime and org.eclipse.core.runtime.sources.

A few days ago, bug 337068 – “Please set up maven.eclipse.org” was fixed. The site exists and there is even a Nexus running on it.

Unfortunately, it’s a bit empty for now. We’re working on it 🙂

One of the first steps is a set of tools that takes downloads from eclipse.org and converts them into proper Maven artifacts – with source and all.

Welcome Project Dash m4e Tools. A preliminary version is available on github: https://github.com/digulla/org.eclipse.dash.m4e.tools

It consists of three tools so far:

  1. m4e-import can import downloads (archived or unpacked) into a temporary Maven 2 repository. Your own local repository (${user.home}/.m2/repository) is left untouched!
  2. m4e-merge can merge several a temporary Maven 2 repositories into one.
  3. m4e-attach-sources tries to find all source bundles, moves+renames the source JAR to the right place and name and deletes the unnecessary folder.

Next step is a tool to patch the artifacts. One open issue is: How to handle dependencies which come from Project Orbit (bundling third party libraries for Eclipse projects).

Please visit Bug 340416 – “Resolving dependencies from Project Orbit” if you have an opinion.


Using Tycho to build Eclipse plugins

15. November, 2010

After my horrible time with PDE, I have Tycho a whirl today. I must say the whole experience was much more pleasant (despite the unfriendly Tycho home page at tycho.sonatype.org – don’t go there!).

As before, I tried to build BIRT. Unfortunately, I failed (but much faster and I know why): Tycho 0.10.0 can’t resolve extra JAR dependencies: TYCHO-533 Tycho should honor jars.extra.classpath

If you want to get started with Tycho, visit this page. There is an exemplary POM and lots of other bits and pieces.


Maven 3.0 is here

18. October, 2010

Maven 3.0 has been released.Maven Logo


Using the FindBugs plugin for Maven with Java 5

16. July, 2010

If you use the Maven 2 FindBugs plugin with Java 5 code, you will get a lot of errors like:

    Can't use annotations when running in JDK 1.4 mode!
    Can't use JDK 1.5 for loop syntax when running in JDK 1.4 mode!
    Can't use generics unless running in JDK 1.5 mode!
    Can't use enum as a keyword in pre-JDK 1.5 target

The solution is to set the targetJdk (even though this option isn’t mentioned in the docs and even mvn help:describe can’t find it):

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>2.3.1</version>
                    <configuration>
                        <targetJdk>1.5</targetJdk>
                    </configuration>
                </plugin>

Note that you should clean your project; otherwise the new option may not be used for some reason.


ePen 0.7 Status Update

9. January, 2010

I’ve pushed the code for ePen into a new set of Mercurial repositories: signal (a signal/event handling library, new BSD license), JaSpell (fork of the project jaspell.sourceforge.net; mainly a port to Java 5 and Maven 2, BSD-License) and ePen (the main editor, Eclipse Public License 1.0 since I had to copy code from the Eclipse code base).

The editor is pretty usable and I hope to wrap up 0.8 next week which should fix the following issues:

  1. Create new projects and open existing ones. The main problem here is that an ePen project is a directory and SWT doesn’t offer very good dialogs to select directories. Right now, the editor will create a demo project when you start it the first time.
  2. The translation mode is too slow
  3. Editing is sluggish.
  4. HTML export should support filtering by state (to allow to export only “final” scenes).
  5. Setting up the development environment is too complex. Especially the part where you need to copy the Eclipse plugins into the Maven repository. 0.8 will come as one huge JAR which you can start with a double click.

After that, I plan to resume work on my story “Haul” and post the first scenes in my old, desolate Philmann Dark site.


Jazoon 2009, Day One

23. June, 2009

It’s late, so only a very short summary of today.

James Gosling gave a broad overview what is currently happening at Sun. Nice video but little meat. I asked about what happened to closures but I’m not sure whether I can repeat his answer here. My feeling is that, behind the scenes, there’s a lot of emotions and that’s bad. Oh well, maybe some will simply implement something reasonable in the OpenJDK. Otherwise, Closures are probably dead in Java which is a bit of a pity.

Dirk König showed a the most common use cases for Groovy in a Java project. Nothing really new for anyone who had been in contact with Groovy for nicely packaged and showed some cool stuff you can do with this mature language.

After that, Neal Ford explained how Design Patterns started to disappear. We didn’t really notice but things like Iterators or Adapters have become features of the language itself. In Java, you still have to query a container for an iterator, in Groovy, you just container.each { … do something with each item … }. Really nice talk, as usual.

Missed most of the next talk because I talked to Dirk König but if you’re using Maven or Ant as a build system, you should have a look at Gradle. It fixes most of the issues with Ant and some of the ones with Maven. Later that day, Hans Dockter (a Gradle developer) and I tossed a couple of ideas back and forth how the build could be improved. If any of these could be implemented, we’ll see a new way to build software.

At 15:00, Jason van Zyl told us what is happening in and around Maven. His talk was so full of information, it was impossible to follow the slides and him. Maven 3.0 is due early 2010 and it will solve a lot of the issues in M2. One of the most important features: You get hooks to run stuff before and after a lifecycle phase. Ever wanted to calculate a build number? Now you can.

M3 is based on SAT4J, just like Eclipse p2. Now, if you followed my blog, you know that I hate p2. p2 is a piece of banana software, delivered green, ripes at the customer. Which is a pity. p2 solved a lot of the issues with the old installer and it could solve all the other issues but apparently, there are forced behind the scenes which make this almost impossible. So when you meet Pascal Rapicault next time, don’t blame him for all the misery he has caused you. He has to solve a mission impossible and that only works in movies.

Later that evening, Thomas Mueller talked about Testing Zen. Nothing really new but I’ll probably have a look at H2 next week or so. It could replace my favorite in-memory Java database HSQLDB.

The closing session was by Neal Ford again. I wish I could create slides that were only a fraction as great as his. *sigh* Anyway, he drew a large arc from how technologies can become obsolete within a few years (as we all know), how good intentions pave the road to hell, about our responsibilities as software developers which go beyond what’s in our contract and predicting the future. Well, Terminator is probably not a good example but everyone knows it. Still, I find it troubling that the military is deploying thousands of automated drones for surveillance. You don’t? How would you feel about a robot equiped with a working machine gun that is programmed to automatically fire on any human that isn’t wearing an RFID tag? Samsung installed a couple of them along the northern border of South Korea two years ago. Skynet, here we come!

What they don’t teach you about software at school: Be Smart!, the last talk of the day, was disappointing. I’ll give Ivar that he had to compete against Neal but … The topic was okay and what he said was correct and all but the presentation could use some improvement. ‘Nuff said.