Skip to content

Instantly share code, notes, and snippets.

@sebastianbenz
Created July 4, 2012 12:50
Show Gist options
  • Save sebastianbenz/3047169 to your computer and use it in GitHub Desktop.
Save sebastianbenz/3047169 to your computer and use it in GitHub Desktop.
Compiling Jnario specs with Maven (SNAPSHOT).
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>my-app</name>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>Jnario Snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>Jnario Snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</pluginRepository>
<pluginRepository>
<id>Xtend</id>
<url>http://build.eclipse.org/common/xtend/maven/</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.jnario</groupId>
<artifactId>org.jnario.lib.maven</artifactId>
<version>0.1.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jnario</groupId>
<artifactId>jnario-maven-plugin</artifactId>
<version>0.1.0-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<includes>
<include>**/*Spec*.java</include>
<include>**/*Feature.java</include>
<include>**/*Test.java</include>
<include>**/*TestCase.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>
@rgladwell
Copy link

Trying to run the above pom but when I do "mvn test" on my Maven 3.0.4 install with the above POM I get the following error message:

[ERROR] Plugin org.jnario:jnario-maven-plugin:0.1.0-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.jnario:jnario-maven-plugin:jar:0.1.0-SNAPSHOT: Failure to find org.jnario:jnario:pom:0.1.0-SNAPSHOT in https://oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of Jnario Snapshots has elapsed or updates are forced

Even with "mvn -U test" this still fails. Any ideas why?

@sebastianbenz
Copy link
Author

Strange. I tried it right before sending you the link. Seems like I have been fooled by my local repository. I can reproduce the problem though. The problem is that there shouldn't be a dependency to org.jnario:jnario:pom:0.1.0-SNAPSHOT. I will look into it.

@sebastianbenz
Copy link
Author

It should be fixed. I also added the plugin repository to the gist.

@rgladwell
Copy link

Thanks, that's working for me now. Does this mean the Xtend Maven plugins haven't been deploy to Maven Central yet?

@sebastianbenz
Copy link
Author

No, they haven't...

@rgladwell
Copy link

Do you know if there are plans to?

@sebastianbenz
Copy link
Author

I am not sure. Best thing would be to ask on the Xtend mailing list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment