This is an automated email from the git hooks/post-receive script. New commit to branch develop-2.x in repository jaxx. See https://gitlab.nuiton.org/nuiton/jaxx.git commit 8aa62eade6b9189c832f636e6c1adf55b9318c94 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 27 16:42:54 2016 +0200 Upgrade maven to 3.3.9 (Fixes #3937) --- jaxx-maven-plugin/pom.xml | 34 ++++++- .../java/org/nuiton/jaxx/plugin/JaxxBaseTest.java | 69 +++++++++---- pom.xml | 111 ++++++--------------- 3 files changed, 109 insertions(+), 105 deletions(-) diff --git a/jaxx-maven-plugin/pom.xml b/jaxx-maven-plugin/pom.xml index d772e92..dbcd69d 100644 --- a/jaxx-maven-plugin/pom.xml +++ b/jaxx-maven-plugin/pom.xml @@ -78,11 +78,22 @@ <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-core</artifactId> </dependency> + <!--dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-model</artifactId> + </dependency--> + <dependency> <groupId>org.apache.maven</groupId> - <artifactId>maven-project</artifactId> + <artifactId>maven-compat</artifactId> </dependency> <dependency> @@ -159,15 +170,28 @@ <dependency> <groupId>org.nuiton</groupId> - <artifactId>helper-maven-plugin-api</artifactId> - <classifier>tests</classifier> + <artifactId>helper-maven-plugin-test-api</artifactId> + </dependency> + + <dependency> + <groupId>org.eclipse.sisu</groupId> + <artifactId>org.eclipse.sisu.plexus</artifactId> + <scope>test</scope> </dependency> - <!-- FIXME si on ne le rajoute pas, on se retrouve avec la version 1.1 qui ne convient pas --> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> - <scope>compile</scope> + </dependency> + + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-aether-provider</artifactId> + </dependency> + + <dependency> + <groupId>org.eclipse.aether</groupId> + <artifactId>aether-api</artifactId> </dependency> <dependency> diff --git a/jaxx-maven-plugin/src/test/java/org/nuiton/jaxx/plugin/JaxxBaseTest.java b/jaxx-maven-plugin/src/test/java/org/nuiton/jaxx/plugin/JaxxBaseTest.java index 32be4d1..599734d 100644 --- a/jaxx-maven-plugin/src/test/java/org/nuiton/jaxx/plugin/JaxxBaseTest.java +++ b/jaxx-maven-plugin/src/test/java/org/nuiton/jaxx/plugin/JaxxBaseTest.java @@ -31,7 +31,8 @@ import jaxx.runtime.validator.swing.SwingValidator; import org.apache.commons.io.FileUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.nuiton.plugin.AbstractMojoTest; +import org.junit.Rule; +import org.nuiton.plugin.MojoTestRule; import java.io.File; import java.io.IOException; @@ -43,37 +44,57 @@ import static org.junit.Assert.assertTrue; /** * Base test case for a jaxx:generate goal. * - * Use {@link AbstractMojoTest} from {@code helper-maven-plugin}. - * * @author Tony Chemit - chemit@codelutin.com - * @see AbstractMojoTest * @see GenerateMojo */ -public abstract class JaxxBaseTest extends AbstractMojoTest<GenerateMojo> { +public abstract class JaxxBaseTest { /** Logger. */ private static final Log log = LogFactory.getLog(JaxxBaseTest.class); - @Override - protected String getGoalName(String methodName) { - return "generate"; - } + @Rule + public MojoTestRule<GenerateMojo> rule = new MojoTestRule<GenerateMojo>(getClass(), "generate") { + + @Override + protected void setUpMojo(GenerateMojo mojo, File pomFile) throws Exception { - @Override - protected void setUpMojo(GenerateMojo mojo, File pomFile) throws Exception { - try { - super.setUpMojo(mojo, pomFile); - } catch (Exception e) { - if (log.isErrorEnabled()) { - log.error(e); + try { + super.setUpMojo(mojo, pomFile); + } catch (Exception e) { + if (log.isErrorEnabled()) { + log.error(e); + } } + mojo.setEncoding("UTF-8"); + mojo.validatorFactoryFQN= SwingValidator.class.getName(); + mojo.jaxxContextFQN = DefaultJAXXContext.class.getName(); + mojo.compilerFQN = JAXXCompiler.class.getName(); + mojo.defaultDecoratorFQN = DefaultCompiledObjectDecorator.class.getName(); + } - mojo.setEncoding("UTF-8"); - mojo.validatorFactoryFQN= SwingValidator.class.getName(); - mojo.jaxxContextFQN = DefaultJAXXContext.class.getName(); - mojo.compilerFQN = JAXXCompiler.class.getName(); - mojo.defaultDecoratorFQN = DefaultCompiledObjectDecorator.class.getName(); - } + + }; + +// @Override +// protected String getGoalName(String methodName) { +// return "generate"; +// } +// +// @Override +// protected void setUpMojo(GenerateMojo mojo, File pomFile) throws Exception { +// try { +// super.setUpMojo(mojo, pomFile); +// } catch (Exception e) { +// if (log.isErrorEnabled()) { +// log.error(e); +// } +// } +// mojo.setEncoding("UTF-8"); +// mojo.validatorFactoryFQN= SwingValidator.class.getName(); +// mojo.jaxxContextFQN = DefaultJAXXContext.class.getName(); +// mojo.compilerFQN = JAXXCompiler.class.getName(); +// mojo.defaultDecoratorFQN = DefaultCompiledObjectDecorator.class.getName(); +// } protected void checkPattern(GenerateMojo mojo, String pattern, @@ -97,6 +118,10 @@ public abstract class JaxxBaseTest extends AbstractMojoTest<GenerateMojo> { } } + public GenerateMojo getMojo() { + return rule.getMojo(); + } + protected void assertNumberJaxxFiles(int expectedNbFiles) { if (expectedNbFiles == 0) { assertTrue(getMojo().files == null || getMojo().files.length == 0); diff --git a/pom.xml b/pom.xml index 74d6fbd..c259d99 100644 --- a/pom.xml +++ b/pom.xml @@ -136,12 +136,8 @@ <signatureArtifactId>java16</signatureArtifactId> <signatureVersion>1.0</signatureVersion> - <!-- Remove this if one day we use maven3 API in jaxx 2 --> - <helperPluginVersion>2.1</helperPluginVersion> - <pluginPluginVersion>3.3</pluginPluginVersion> - <!-- Remove this if one day we use maven3 API in jaxx 2 --> + <mavenVersion>3.3.9</mavenVersion> - <mavenVersion>2.2.1</mavenVersion> <nuitonValidatorVersion>3.0</nuitonValidatorVersion> <nuitonI18nVersion>3.3</nuitonI18nVersion> <eugeneVersion>2.13</eugeneVersion> @@ -156,7 +152,7 @@ <!-- jnlp configuration --> <jnlpFileName>jaxx-demo.jnlp</jnlpFileName> - <jnlpCodebase>http://jaxx.nuiton.org/v/${siteDeployClassifier}/jaxx-demo/jnlp</jnlpCodebase> + <jnlpCodebase>http://jaxx.nuiton.org/v/${project.version}/jaxx-demo/jnlp</jnlpCodebase> <jgitflow.masterBranchName>master-2.x</jgitflow.masterBranchName> <jgitflow.developBranchName>develop-2.x</jgitflow.developBranchName> @@ -196,12 +192,6 @@ </dependency> <dependency> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - <version>3.2.2</version> - </dependency> - - <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.2</version> @@ -348,10 +338,8 @@ <dependency> <groupId>org.nuiton</groupId> - <artifactId>helper-maven-plugin-api</artifactId> + <artifactId>helper-maven-plugin-test-api</artifactId> <version>${helperPluginVersion}</version> - <scope>test</scope> - <classifier>tests</classifier> <exclusions> <exclusion> @@ -408,7 +396,14 @@ <dependency> <groupId>org.apache.maven</groupId> - <artifactId>maven-project</artifactId> + <artifactId>maven-compat</artifactId> + <version>${mavenVersion}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-core</artifactId> <version>${mavenVersion}</version> <scope>provided</scope> </dependency> @@ -447,26 +442,6 @@ <version>${swingXVersion}</version> </dependency> - <dependency> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-velocity</artifactId> - <version>1.1.8</version> - <exclusions> - <exclusion> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-container-default</artifactId> - </exclusion> - <exclusion> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-component-api</artifactId> - </exclusion> - <exclusion> - <groupId>velocity</groupId> - <artifactId>velocity</artifactId> - </exclusion> - </exclusions> - </dependency> - <!-- dependencies to mojo annotations --> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> @@ -485,56 +460,36 @@ <dependency> <groupId>org.apache.maven.plugin-testing</groupId> <artifactId>maven-plugin-testing-harness</artifactId> - <version>1.3</version> + <version>3.3.0</version> <scope>test</scope> <exclusions> - + <!--evil plexus container--> <exclusion> <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-archiver</artifactId> - </exclusion> - - <exclusion> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-http-lightweight</artifactId> - </exclusion> - - <exclusion> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-file</artifactId> + <artifactId>plexus-container-default</artifactId> </exclusion> + </exclusions> + </dependency> - <exclusion> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-ssh</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-http-shared</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-http</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-webdav-jackrabbit</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-ssh-external</artifactId> - </exclusion> + <dependency> + <groupId>org.eclipse.sisu</groupId> + <artifactId>org.eclipse.sisu.plexus</artifactId> + <version>0.3.3</version> + <scope>provided</scope> + </dependency> - <exclusion> - <groupId>org.apache.maven.reporting</groupId> - <artifactId>maven-reporting-api</artifactId> - </exclusion> - <!--<exclusion>--> - <!--<groupId>org.apache.maven</groupId>--> - <!--<artifactId>maven-core</artifactId>--> - <!--</exclusion>--> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-aether-provider</artifactId> + <version>${mavenVersion}</version> + <scope>provided</scope> + </dependency> - </exclusions> + <dependency> + <groupId>org.eclipse.aether</groupId> + <artifactId>aether-api</artifactId> + <version>1.1.0</version> + <scope>provided</scope> </dependency> <dependency> -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.