maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tommy Svensson <to...@natusoft.se>
Subject Re: No class files!!
Date Sun, 21 Jul 2013 18:10:36 GMT
I found the problem:
________________________________________________________________

Tommys-MacBook-Pro:APSOpenJPAProvider tommy$ echo $cp
/Users/tommy/.m2/repository/se/natusoft/osgi/aps/aps-apis/0.9.2/aps-apis-0.9.2.jar:/Users/tommy/.m2/repository/se/natusoft/osgi/aps/aps-tools-lib/0.9.2/aps-tools-lib-0.9.2.jar:/Users/tommy/.m2/repository/org/osgi/org.osgi.core/4.2.0/org.osgi.core-4.2.0.jar:/Users/tommy/.m2/repository/org/osgi/org.osgi.compendium/4.2.0/org.osgi.compendium-4.2.0.jar:/Users/tommy/.m2/repository/org/osgi/org.osgi.enterprise/4.2.0/org.osgi.enterprise-4.2.0.jar:/Users/tommy/.m2/repository/org/apache/openjpa/openjpa-all/2.2.0/openjpa-all-2.2.0.jar:/Users/tommy/.m2/repository/se/natusoft/tools/xob/xob/5.0/xob-5.0.jar

Tommys-MacBook-Pro:APSOpenJPAProvider tommy$ /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/bin/javac
-classpath $cp -d target/classes -s target/generated-sources/annotations `find src/main/java
-type f`

Tommys-MacBook-Pro:APSOpenJPAProvider tommy$ ls -l target/classes/
total 0
drwxr-xr-x  3 tommy  staff  102 21 Jul 19:36 META-INF
drwxr-xr-x  4 tommy  staff  136 21 Jul 19:36 lib
________________________________________________________________

Damn you Oracle!

/Tommy


21 jul 2013 kl. 19:06 skrev Tommy Svensson <tommy@natusoft.se>:

> Hello, 
> 
> Can someone please inform me why maven-compiler-plugin is clearly saying that it is compiling
12 classes into my target/classes directory but after build there are only resources and no
classes there!
> 
> Here is the output of a build:
> _______________________________________________________________
> 
> Tommys-MacBook-Pro:APSOpenJPAProvider tommy$ mvn -version
> Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
> Maven home: /usr/share/maven
> Java version: 1.7.0_21, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre
> Default locale: sv_SE, platform encoding: UTF-8
> OS name: "mac os x", version: "10.8.4", arch: "x86_64", family: "mac"
> 
> Tommys-MacBook-Pro:APSOpenJPAProvider tommy$ mvn clean
> [INFO] Scanning for projects...
> [INFO]                                                                         
> [INFO] ------------------------------------------------------------------------
> [INFO] Building APS OpenJPA Provider 0.9.2
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ aps-openjpa-provider ---
> [INFO] Deleting /Users/tommy/Development/Projects/OSGi/OSGiApplicationPlatformServices/APS-Data/APSOpenJPAProvider/target
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 0.294s
> [INFO] Finished at: Sun Jul 21 18:43:08 CEST 2013
> [INFO] Final Memory: 6M/131M
> [INFO] ------------------------------------------------------------------------
> 
> Tommys-MacBook-Pro:APSOpenJPAProvider tommy$ ls -l 
> total 24
> -rw-r--r--  1 tommy  staff  2218 21 Jul 18:37 aps-openjpa-provider.iml
> drwxr-xr-x  8 tommy  staff   272 21 Jul 12:17 docs
> -rw-r--r--  1 tommy  staff  5469 21 Jul 18:37 pom.xml
> drwxr-xr-x  3 tommy  staff   102 21 Jul 12:17 src
> 
> Tommys-MacBook-Pro:APSOpenJPAProvider tommy$ find src/main/java -type f -print
> src/main/java/se/natusoft/osgi/aps/jpa/APSOpenJPAProviderActivator.java
> src/main/java/se/natusoft/osgi/aps/jpa/service/APSOpenJPAServiceProvider.java
> src/main/java/se/natusoft/osgi/aps/jpa/service/ContextCache.java
> src/main/java/se/natusoft/osgi/aps/jpa/service/ContextEntityManager.java
> src/main/java/se/natusoft/osgi/aps/jpa/service/ContextEntityManagerFactory.java
> src/main/java/se/natusoft/osgi/aps/jpa/service/ContextMetaModel.java
> src/main/java/se/natusoft/osgi/aps/jpa/service/ContextPersistenceUnitUtil.java
> src/main/java/se/natusoft/osgi/aps/jpa/service/MultiBundleClassLoader.java
> src/main/java/se/natusoft/osgi/aps/jpa/xml/Persistence.java
> src/main/java/se/natusoft/osgi/aps/jpa/xml/PersistenceUnit.java
> src/main/java/se/natusoft/osgi/aps/jpa/xml/Properties.java
> src/main/java/se/natusoft/osgi/aps/jpa/xml/Property.java
> 
> Tommys-MacBook-Pro:APSOpenJPAProvider tommy$ mvn install
> [INFO] Scanning for projects...
> [INFO]                                                                         
> [INFO] ------------------------------------------------------------------------
> [INFO] Building APS OpenJPA Provider 0.9.2
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ aps-openjpa-provider
---
> [debug] execute contextualize
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO] 
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ aps-openjpa-provider
---
> [INFO] Compiling 12 source files to /Users/tommy/Development/Projects/OSGi/OSGiApplicationPlatformServices/APS-Data/APSOpenJPAProvider/target/classes
> [INFO] 
> [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ aps-openjpa-provider
---
> [debug] execute contextualize
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory /Users/tommy/Development/Projects/OSGi/OSGiApplicationPlatformServices/APS-Data/APSOpenJPAProvider/src/test/resources
> [INFO] 
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ aps-openjpa-provider
---
> [INFO] No sources to compile
> [INFO] 
> [INFO] --- maven-surefire-plugin:2.10:test (default-test) @ aps-openjpa-provider ---
> [INFO] No tests to run.
> [INFO] Surefire report directory: /Users/tommy/Development/Projects/OSGi/OSGiApplicationPlatformServices/APS-Data/APSOpenJPAProvider/target/surefire-reports
> 
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> 
> Results :
> 
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> 
> [INFO] 
> [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ aps-openjpa-provider ---
> [INFO] Building jar: /Users/tommy/Development/Projects/OSGi/OSGiApplicationPlatformServices/APS-Data/APSOpenJPAProvider/target/aps-openjpa-provider-0.9.2.jar
> [INFO] 
> [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ aps-openjpa-provider
---
> [INFO] Installing /Users/tommy/Development/Projects/OSGi/OSGiApplicationPlatformServices/APS-Data/APSOpenJPAProvider/target/aps-openjpa-provider-0.9.2.jar
to /Users/tommy/.m2/repository/se/natusoft/osgi/aps/aps-openjpa-provider/0.9.2/aps-openjpa-provider-0.9.2.jar
> [INFO] Installing /Users/tommy/Development/Projects/OSGi/OSGiApplicationPlatformServices/APS-Data/APSOpenJPAProvider/pom.xml
to /Users/tommy/.m2/repository/se/natusoft/osgi/aps/aps-openjpa-provider/0.9.2/aps-openjpa-provider-0.9.2.pom
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.206s
> [INFO] Finished at: Sun Jul 21 18:43:21 CEST 2013
> [INFO] Final Memory: 13M/189M
> [INFO] ------------------------------------------------------------------------
> 
> Tommys-MacBook-Pro:APSOpenJPAProvider tommy$ ls -l target/classes/
> total 0
> drwxr-xr-x  3 tommy  staff  102 21 Jul 18:43 META-INF
> drwxr-xr-x  4 tommy  staff  136 21 Jul 18:43 lib
> 
> Tommys-MacBook-Pro:APSOpenJPAProvider tommy$ jar tvf target/aps-openjpa-provider-0.9.2.jar

>     0 Sun Jul 21 18:43:22 CEST 2013 META-INF/
>  1578 Sun Jul 21 18:43:20 CEST 2013 META-INF/MANIFEST.MF
>     0 Sun Jul 21 18:43:20 CEST 2013 lib/
> 6712450 Sun Jul 21 18:43:20 CEST 2013 lib/openjpa-all-2.2.0.jar
> 62978 Sun Jul 21 18:43:20 CEST 2013 lib/xob-5.0.jar
>     0 Sun Jul 21 18:43:22 CEST 2013 META-INF/maven/
>     0 Sun Jul 21 18:43:22 CEST 2013 META-INF/maven/se.natusoft.osgi.aps/
>     0 Sun Jul 21 18:43:22 CEST 2013 META-INF/maven/se.natusoft.osgi.aps/aps-openjpa-provider/
>  5469 Sun Jul 21 18:37:44 CEST 2013 META-INF/maven/se.natusoft.osgi.aps/aps-openjpa-provider/pom.xml
>   126 Sun Jul 21 18:43:22 CEST 2013 META-INF/maven/se.natusoft.osgi.aps/aps-openjpa-provider/pom.properties
> _______________________________________________________________
> 
> My pom looks like this:
> _______________________________________________________________
> 
> <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>se.natusoft.osgi.aps</groupId>
>    <artifactId>aps-openjpa-provider</artifactId>
>    <version>0.9.2</version>
>    <packaging>jar</packaging>
> 
>    <name>APS OpenJPA Provider</name>
> 
>    <description>
>        Provides an implementation of APSJPAService using OpenJPA.
>    </description>
> 
>    <properties>
>        <!--
>            Other
>        -->
>        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>    </properties>
> 
>    <dependencies>
>        <!--
>            APS
>        -->
>        <dependency>
>            <groupId>se.natusoft.osgi.aps</groupId>
>            <artifactId>aps-apis</artifactId>
>            <version>${project.version}</version>
>            <scope>provided</scope>
>        </dependency>
>        <dependency>
>            <groupId>se.natusoft.osgi.aps</groupId>
>            <artifactId>aps-tools-lib</artifactId>
>            <version>${project.version}</version>
>            <scope>provided</scope>
>        </dependency>
> 
>        <!--
>            Other
>        -->
>        <dependency>
>            <groupId>org.osgi</groupId>
>            <artifactId>org.osgi.enterprise</artifactId>
>            <version>4.2.0</version>
>            <scope>provided</scope>
>        </dependency>
> 
>        <dependency>
>            <groupId>org.apache.openjpa</groupId>
>            <artifactId>openjpa-all</artifactId>
>            <version>2.2.0</version>
>            <scope>compile</scope>
>        </dependency>
> 
>        <dependency>
>            <groupId>se.natusoft.tools.xob</groupId>
>            <artifactId>xob</artifactId>
>            <version>5.0</version>
>            <scope>compile</scope>
>        </dependency>
> 
>    </dependencies>
> 
>    <repositories>
>        <repository>
>            <id>maven-natusoft-se</id>
>            <name>
>                Natusofts maven repository
>            </name>
>            <url>http://maven.natusoft.se/</url>
>        </repository>
> 
>        <repository>
>            <id>chrel</id>
>            <name>codehaus-releases</name>
>            <url>https://nexus.codehaus.org/content/repositories/releases/</url>
>        </repository>
>    </repositories>
> 
>    <build>
>        <plugins>
> 
>            <!--
>                Force the jar plugin to use the maven-bundle-plugin generated manifest.
>            -->
>            <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-jar-plugin</artifactId>
>                <version>2.4</version>
>                <configuration>
>                    <archive>
>                        <!--manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile-->
>                        <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
>                    </archive>
>                </configuration>
>            </plugin>
> 
>        </plugins>
>    </build>
> 
> </project>
> _______________________________________________________________
> 
> This is really part of a larger multi module build, but I isolated it to troubleshoot.
It now builds using only this pom, but still does not produce any class files! 
> 
> This is just completely insane! It is driving me nuts!  Pleeeease, someone, explain to
me why I'm not getting any class files! 
> 
> I can add that I did get class files up to the point where I added the maven-shade-plugin
version 2.1. The first build with that plugin resulted in no class files. I removed the maven-shade-plugin
again, but it did not help. After that it has been 100% impossible to get class files. Could
the shade plugin have installed something somewhere that I need to remove ? I know this is
far fetched, but this whole problem is so completely ridiculous! Before this if someone had
told me that they had this problem i would say, "that is not possible!". Actually, I still
keep saying to myself, this is not possible! 
> 
> Regards,
> Tommy Svensson
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message