0

I am using maven on a project that has no java code, just a few files that need versioning and artifactory deployment. My directory looks like

$ ll
drwxr-xr-x  12 david  staff   408B Mar 20 13:41 .
drwxr-xr-x  46 david  staff   1.5K Mar 20 10:33 ..
drwxr-xr-x  13 david  staff   442B Mar 20 13:42 .git
-rw-r--r--   1 david  staff    23B Mar 20 11:04 .gitignore
-rw-r--r--   1 david  staff   393B Mar 20 10:43 README.md
-rw-r-----@  1 david  staff   8.8M Mar  6 18:42 file_1
-rw-r--r--   1 david  staff   581B Mar 20 10:59 file_2
-rwxr-xr-x   1 david  staff   143B Mar  5 11:23 file_3
-rw-r--r--   1 david  staff   6.7K Mar 20 11:54 pom.xml

In my pom:

<?xml version="1.0"?>
<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>com.example</groupId>
    <artifactId>my-stuff</artifactId>
    <version>1.1.0</version>
    <packaging>pom</packaging>
    <name>my-stuff</name>

    <scm>
        ...
    </scm>

    <repositories>
       ... 
    </repositories>

    <distributionManagement>
       ...
    </distributionManagement>

    <profiles>
        <profile>
            <id>my-stuff</id>
                <activation>
                    <activeByDefault>true</activeByDefault>
                </activation>
               <build>
                   <plugins>
                       <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-antrun-plugin</artifactId>
                           <executions>
                               <execution> 
                                    // make a tarball for artifactory here
    ...
</project>

But when I mvn clean package I do not see a target dir, and my final tarball is not produced. What am I doing wrong here?

David Williams
  • 8,388
  • 23
  • 83
  • 171
  • 1
    I believe it is because you specified a packaging of type `pom`. I don't have much experience, but you could have a look in [Maven Package-specific Lifecycles](http://books.sonatype.com/mvnref-book/reference/lifecycle-sect-package-specific.html) for additional info. – watery Mar 20 '15 at 21:28
  • I'll just use the `jar` packaging, eventually by modifying some of its [parameters](http://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html) – watery Mar 20 '15 at 21:31
  • Could you show what's inside `make a tarball for artifactory here` ? – S. Pauk Mar 21 '15 at 01:45
  • 1
    Providing a build log will be also helpful. – S. Pauk Mar 21 '15 at 01:47

0 Answers0