Handling non-OSGi dependencies when integrating Maven, Tycho and Eclipse

I have a bunch of Eclipse-based plugins that I have been migrating to Maven/Tycho. Most of these plugins depend on separate libraries that I now manage through Maven, rather than muddle around with .jar files. The most cumbersome part of my current setup is due to the apparent inability of Tycho to process Maven-only (i.e. … Read more

How to execute a specific plugin/Mojo from a pom.xml programmatically?

I’m the author of one of the Maven plugins (not Apache/Codehaus, completely indie). Sometimes I get support requests or test cases where I’d really need to debug the execution of my plugin with an existing pom.xml. Basically the test cases I get are sample/test project (pom.xml with src/main/resoures, src/main/java and so on). What I need … Read more

How to fix m2e error in pom.xml: plugin execution not covered by lifecycle configuration?

I am having the title mentioned error in my Maven Java project. Below is a comparison of a good project and my troubled project. How to fix these 2 errors? And in the upper good one why there’re so many configurator, configurator,…? It looks weird even if there are no error marks. I have read … Read more

IntelliJ: activate Maven profile when running Junit tests

I have declared some properties that are specific to Maven profiles. A part of my pom.xml: <profiles> <profile> <id>release</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <my.properties.file>foo.xml</my.properties.file> </properties> </profile> <profile> <id>ci</id> <properties> <my.properties.file>bar.xml</my.properties.file> </properties> </profile> </profiles> I encounter some problem to use the “ci” Maven profile when I start Junit tests via IntelliJ IDEA 2016. I activate my … Read more

JsonParseException: Unexpected character (‘<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')

I have a program that inserts a new patient to HBase in a docker container inside a server. Everything is working fine until I try to change the connection IP to a phoenix query server for running JUnit tests. I am setting the URL in the properties file like this: java.lang.RuntimeException: com.fasterxml.jackson.core.JsonParseException: Unexpected character (‘<‘ … Read more

How can I provide custom logic in a Maven archetype?

I’m interested in creating a Maven archetype, and I think I have most of the basics down. However, one thing I’m stuck on is that sometimes I want to use custom logic to fill in a template. For example, if somebody generates my archetype and specifies the artifactId as hello-world, I’d like to generate a … Read more

Birt Runtime maven artifact issue

I want to use Birt Api library im my project so I included rg.eclipse.birt.runtime 4.5 maven dependency into my project <dependency> <groupId>org.eclipse.birt.runtime</groupId> <artifactId>org.eclipse.birt.runtime</artifactId> <version>4.5.0</version> <exclusions> <exclusion> <groupId>org.eclipse.birt.runtime</groupId> <artifactId>org.eclipse.osgi</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.eclipse.tycho</groupId> <artifactId>org.eclipse.osgi</artifactId> <version>3.10.100.v20150529-1857</version> </dependency> When I want to execute my report I got below stack trace error caused by “org.eclipse.core.runtime.IExtensionRegistry”‘s signer information does … Read more

Adding phases to the maven lifecycle?

I try to add some additional phases to the maven lifecycle. Mainly to add some additional test levels: <phases> <phase>initialize</phase> <phase>process-resources</phase> <phase>compile</phase> <phase>process-test-resources</phase> <phase>test-compile</phase> <phase>test</phase> <phase>prepare-package</phase> <phase>package</phase> <phase>pre-integration-test</phase> <phase>integration-test</phase> <phase>post-integration-test</phase> <phase>pre-application-test</phase> <phase>application-test</phase> <phase>post-application-test</phase> <phase>pre-system-test</phase> <phase>system-test</phase> <phase>post-system-test</phase> <phase>finalize-tests</phase> <phase>install</phase> <phase>deploy</phase> </phases> Above contains new application-test and system-test phase (including pre- and post-). I’ve started a test … Read more

Maven dependency:get does not download Stanford NLP model files

The core component of the Stanford Natural Language Processing Toolkit has Java code in a stanford-corenlp-1.3.4.jar file, and has (very large) model files in a separate stanford-corenlp-1.3.4-models.jar file. Maven does not download the model files automatically, but only if you add <classifier>models</classifier> line to the .pom. Here is a .pom snippet that fetches both the … Read more

Maven plugin compiles fine but can’t find class during execution

I am stuck with the following Maven problem. Basically, I have two projects. Project A is a Maven plugin and project B is using it. Project A pom.xml: <project xmlns=”http://maven.apache.org/POM/4.0.0″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd”> <modelVersion>4.0.0</modelVersion> <groupId>io.github.martinschneider</groupId> <artifactId>demo-maven-plugin</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>maven-plugin</packaging> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.25</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>1.7.25</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> … Read more