|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Getting the artifacts in execute for fxcopHi, I need some help in getting the artifact files in a MavenProject.
When working with the fxcop plugin Ive looked on how the other 0.16 plugins works. The DotnetTestMojo.getTestAssemblyName() method uses project.getArtifact().getFile() to get the File for the artifact, but that seems to only be working when I run "mvn test". If I run "mvn org.apache.maven.dotnet.plugins:maven-dotnet-test-plugin:test" then I get a NPE: [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] null [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.NullPointerException at org.apache.maven.dotnet.plugin.nunit.DotnetTestMojo.getTestAssemblyName(DotnetTestMojo.java:158) at org.apache.maven.dotnet.plugin.nunit.DotnetTestMojo.execute(DotnetTestMojo.java:86) So how should I get the artifacts for the project? Is there any way to initialize all fields in the MavenProject object? The 0.14 fxcop is concatenating artifactid and the packaging extension (without the version string), but that doesnt feel right. regards //Erik |
|
|
Re: Getting the artifacts in execute for fxcopOn Mon, Jun 9, 2008 at 1:12 PM, Erik Ramfelt <eramfelt@...> wrote:
> Hi, I need some help in getting the artifact files in a MavenProject. > When working with the fxcop plugin Ive looked on how the other 0.16 > plugins works. The DotnetTestMojo.getTestAssemblyName() method uses > project.getArtifact().getFile() to get the File for the artifact, but > that seems to only be working when I run "mvn test". If I run "mvn > org.apache.maven.dotnet.plugins:maven-dotnet-test-plugin:test" then I > get a NPE: > > [ERROR] FATAL ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] null > [INFO] > ------------------------------------------------------------------------ > [INFO] Trace > java.lang.NullPointerException > at > org.apache.maven.dotnet.plugin.nunit.DotnetTestMojo.getTestAssemblyName(DotnetTestMojo.java:158) > at > org.apache.maven.dotnet.plugin.nunit.DotnetTestMojo.execute(DotnetTestMojo.java:86) Definitely a bug: the test plugin should be able to run independently. Create a JIRA issue to make sure that we don't lose track. The fix won't be hard. > > > > So how should I get the artifacts for the project? Is there any way to > initialize all fields in the MavenProject object? > > The 0.14 fxcop is concatenating artifactid and the packaging extension > (without the version string), but that doesnt feel right. 0.14 does not use version in the artifact filename, so that's why fxcop is not using version here. For 0.16, we need the version info. Thanks, Shane > > > regards > //Erik > |
|
|
Re: Getting the artifacts in execute for fxcopOn Mon, Jun 9, 2008 at 10:31 PM, Shane Isbell <shane.isbell@...> wrote:
> > > On Mon, Jun 9, 2008 at 1:12 PM, Erik Ramfelt <eramfelt@...> wrote: >> >> Hi, I need some help in getting the artifact files in a MavenProject. >> When working with the fxcop plugin Ive looked on how the other 0.16 >> plugins works. The DotnetTestMojo.getTestAssemblyName() method uses >> project.getArtifact().getFile() to get the File for the artifact, but >> that seems to only be working when I run "mvn test". If I run "mvn >> org.apache.maven.dotnet.plugins:maven-dotnet-test-plugin:test" then I >> get a NPE: >> >> [ERROR] FATAL ERROR >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] null >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] Trace >> java.lang.NullPointerException >> at >> org.apache.maven.dotnet.plugin.nunit.DotnetTestMojo.getTestAssemblyName(DotnetTestMojo.java:158) >> at >> org.apache.maven.dotnet.plugin.nunit.DotnetTestMojo.execute(DotnetTestMojo.java:86) > > > Definitely a bug: the test plugin should be able to run independently. > Create a JIRA issue to make sure that we don't lose track. The fix won't be > hard. Done, NMAVEN-141 How would the fix look like? Will it build up the artifact file name manually? I wonder where the Artifact.setFile() is called? >> So how should I get the artifacts for the project? Is there any way to >> initialize all fields in the MavenProject object? >> >> The 0.14 fxcop is concatenating artifactid and the packaging extension >> (without the version string), but that doesnt feel right. > > 0.14 does not use version in the artifact filename, so that's why fxcop is > not using version here. For 0.16, we need the version info. Ok, so I should use the 0.14 way of manually building the artifact file name and just add the version info? Thanks //Erik > > Thanks, > Shane >> >> regards >> //Erik > > |
| Free embeddable forum powered by Nabble | Forum Help |