Maven is not downloading a plugin : jetspeed-unpack-maven-plugin

910 Views Asked by At

so I made this pom :

<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>fr.mssb.ocr</groupId>
    <artifactId>tesseractOcr</artifactId>
    <version>1.0</version>
    <packaging>jar</packaging>

    <build>
        <plugins>
            <!-- autorun unit tests during maven compilation -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12.4</version>
                <configuration>
                    <argLine>-Xmx1024m -XX:MaxPermSize=256m -XX:-UseSplitVerifier</argLine>
                    <skipTests>-DskipTests</skipTests>
                </configuration>
            </plugin>
            
            <!--  
            this extract the 32 bits dll and the tesseractdata folder to 
            the project root from tess4j.jar  
            -->
            <plugin>
                <groupId>org.apache.portals.jetspeed-2</groupId>
                <artifactId>jetspeed-unpack-maven-plugin</artifactId>
                <version>2.2.2</version>
                <configuration>
                    <unpack>
                        <artifact>net.sourceforge.tess4j:tess4j:jar</artifact>
                        <overwrite>true</overwrite>
                        <resources combine.children="append">
                            <resource>
                                <path>win32-x86</path>
                                <destination>${basedir}</destination>
                                <overwrite>true</overwrite>
                                <flat>true</flat>
                                <include>*</include>
                            </resource>
                            <resource>
                                <path>tessdata</path>
                                <destination>${basedir}</destination>
                                <overwrite>true</overwrite>
                                <flat>false</flat>
                                <include>*</include>
                            </resource>
                        </resources>
                    </unpack>
                    <verbose>true</verbose>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- 
        Log4j 2 is broken up in an API and an implementation (core), where the API 
        provides the interface that applications should code to. Strictly speaking 
        Log4j core is only needed at runtime and not at compile time.
        However, below we list Log4j core as a compile time dependency to improve 
        the startup time for custom plugins. 
        -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.1</version>
        </dependency>
        <!--
        Integration of tesseract OCR
        -->
        <dependency>
            <groupId>net.sourceforge.tess4j</groupId>
            <artifactId>tess4j</artifactId>
            <version>1.4.1</version>
        </dependency>
        
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>

mvn clean install and eclipse:eclipse both end up in a "SUCCESS" however the jeetspeed plugin does nothing, I don't see him doing anything in the console when building and he his not even in my local repository.

Yes, I added maven central to my maven conf file (http://repo1.maven.org/maven2/)

I'm using maven 3.2.1

What could I do?

Thanks

EDIT

mvn clean install

D:\!2015 repo\TTsXXJava>mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] capcha solver
[INFO] tesseract ocr project
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building capcha solver 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ parent ---
[INFO] Deleting D:\!2015 repo\TTsXXJava\target
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ parent ---
[INFO] Installing D:\!2015 repo\TTsXXJava\pom.xml to d:\.m2\fr\mssb\capcha\parent\1.0\parent-1.0.pom
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building tesseract ocr project 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ tesseractOcr ---
[INFO] Deleting D:\!2015 repo\TTsXXJava\capcha-solver\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ tesseractOcr ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ tesseractOcr ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to D:\!2015 repo\TTsXXJava\capcha-solver\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ tesseractOcr ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ tesseractOcr ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ tesseractOcr ---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ tesseractOcr ---
[INFO] Building jar: D:\!2015 repo\TTsXXJava\capcha-solver\target\tesseractOcr-1.0.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ tesseractOcr ---
[INFO] Installing D:\!2015 repo\TTsXXJava\capcha-solver\target\tesseractOcr-1.0.jar to d:\.m2\fr\mssb\capcha\tesseractOcr\1.0\tesseractOcr-1.0.jar
[INFO] Installing D:\!2015 repo\TTsXXJava\capcha-solver\pom.xml to d:\.m2\fr\mssb\capcha\tesseractOcr\1.0\tesseractOcr-1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] capcha solver ..................................... SUCCESS [  0.381 s]
[INFO] tesseract ocr project ............................. SUCCESS [  1.910 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.424 s
[INFO] Finished at: 2015-02-05T12:52:22+01:00
[INFO] Final Memory: 14M/231M
[INFO] ------------------------------------------------------------------------

mvn eclipse:eclipse

$ mvn eclipse:eclipse
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] capcha solver
[INFO] tesseract ocr project
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building capcha solver 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.5.1:eclipse (default-cli) @ parent >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.5.1:eclipse (default-cli) @ parent <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.5.1:eclipse (default-cli) @ parent ---
[INFO] Not running eclipse plugin goal for pom project
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building tesseract ocr project 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.5.1:eclipse (default-cli) @ tesseractOcr >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.5.1:eclipse (default-cli) @ tesseractOcr <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.5.1:eclipse (default-cli) @ tesseractOcr ---
[INFO] Using as WTP server : null
[INFO] Using source status cache: D:\!2015 repo\TTsXXJava\target\mvn-eclipse-cache.properties
[INFO] File D:\!2015 repo\TTsXXJava\capcha-solver\.project already exists.
       Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO] Wrote Eclipse project for "tesseractOcr" to D:\!2015 repo\TTsXXJava\capcha-solver.
[INFO]
       Javadoc for some artifacts is not available.
       List of artifacts without a javadoc archive:
         o com.sun.jna:jna:3.0.9
         o net.java.dev.jai-imageio:jai-imageio-core-standalone:1.2-pre-dr-b04-2011-07-04
         o log4j:log4j:1.2.15
         o commons-io:commons-io:1.3.1

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] capcha solver ..................................... SUCCESS [  0.962 s]
[INFO] tesseract ocr project ............................. SUCCESS [  0.406 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.698 s
[INFO] Finished at: 2015-02-05T12:42:36+01:00
[INFO] Final Memory: 7M/183M
[INFO] ------------------------------------------------------------------------

Parent pom in case you need it (I remove the parent reference in the originaly posted pom)

<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>fr.mssb.capcha</groupId>
    <artifactId>parent</artifactId>
    <packaging>pom</packaging>
    <version>1.0</version>
    <name>capcha solver</name>

    <modules>
        <module>capcha-solver</module>
    </modules>

    <build>
        <plugins>
            <!-- All project will be interpreted (source) and compiled (target) in java 7 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <!-- this will make eclipse:eclipse goal work and make the project Eclipse compatible -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                    <classpathContainers>
                        <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7</classpathContainer>
                    </classpathContainers>
                    <additionalBuildcommands>
                        <buildcommand>net.sf.eclipsecs.core.CheckstyleBuilder</buildcommand>
                    </additionalBuildcommands>
                    <additionalProjectnatures>
                        <projectnature>net.sf.eclipsecs.core.CheckstyleNature</projectnature>
                    </additionalProjectnatures>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
1

There are 1 best solutions below

0
On BEST ANSWER

It is not doing anything because you have not bound any execution of the plugin to a lifecycle phase. You need to add a block like this:

<plugin>
<executions>
  <execution>
  <id>unpack-step</id>
  <phase>package</phase>
  <goals>
     <goal>unpack</goal>
  </goals>
  <configuration>
   ...
  </configuration>
</executions>
</plugin>

See http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference for the possible lifecycle phases you can use.